Skip to content

Commit

Permalink
Update Restate schemas and error descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
tillrohrmann committed Dec 19, 2023
1 parent 2158105 commit 8471a92
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 44 deletions.
69 changes: 35 additions & 34 deletions docs/references/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ slug: errors

This page contains the list of error codes emitted by Restate components.

## META0001
## META0001 {#META0001}

Bad service definition encountered while registering/updating a service.
When defining a service, make sure:
Expand All @@ -31,7 +31,7 @@ service HelloWorld {
}
```

## META0002
## META0002 {#META0002}

Bad key definition encountered while registering/updating a service.
When a service is keyed, for each method the input message must have a field annotated with `dev.restate.ext.field`.
Expand All @@ -51,57 +51,58 @@ message GreetingRequest {
}
```

## META0003
## META0003 {#META0003}

Cannot reach the endpoint to execute service discovery. Make sure:
Cannot reach the deployment to execute service discovery. Make sure:

* The provided `uri` is correct
* The service endpoint is up and running
* The Restate runtime can reach the service endpoint through the configured `uri`
* The provided `uri`/`arn` is correct
* The deployment is up and running
* Restate can reach the deployment through the configured `uri`/`arn`
* If additional authentication is required, make sure it's configured through `additional_headers`

## META0004
## META0004 {#META0004}

Cannot register the provided service endpoint, because it conflicts with the uri of an already registered service endpoint.
Cannot register the provided deployment, because it conflicts with the uri of an already registered deployment.

In Restate service endpoints have a unique uri and are immutable, thus it's not possible to discover the same endpoint uri twice.
Make sure, when updating a service endpoint, to assign it a new uri.
In Restate deployments have a unique uri/arn and are immutable, thus it's not possible to discover the same deployment twice.
Make sure, when updating a deployment, to assign it a new uri/arn.

You can force the override using the `"force": true` field in the discover request, but beware that this can lead in-flight invocations to an unrecoverable error state.

See the [versioning documentation](https://docs.restate.dev/services/upgrades-removal) for more information.

## META0005
## META0005 {#META0005}

Cannot propagate endpoint/service metadata to Restate components. If you see this error when starting Restate, this might indicate a corrupted Meta storage.
Cannot propagate deployment/service metadata to Restate components. If you see this error when starting Restate, this might indicate a corrupted Meta storage.

We recommend wiping the Meta storage and recreate it by registering endpoints in the same order they were registered before.
We recommend wiping the Meta storage and recreate it by registering deployments in the same order they were registered before.

## META0006
## META0006 {#META0006}

Cannot register the newly discovered service revision in the provided service endpoint, because it conflicts with an already existing service revision.
Cannot register the newly discovered service revision in the provided deployment, because it conflicts with an already existing service revision.

When implementing a new service revision, make sure that:

* The service instance type and the key definition, if any, is exactly the same as of the previous revisions.
* The service instance type and the key definition, if any, are exactly the same as of the previous revisions.
* The Protobuf contract and message definitions are backward compatible.
* The new revision must implement all the methods of the previous revisions.

See the [versioning documentation](https://docs.restate.dev/services/upgrades-removal) for more information.

## META0007
## META0007 {#META0007}

Bad input message field annotation encountered while registering/updating a service.

You can have at most one field in a message definition annotated with the same `dev.restate.ext.field` annotation.

## META0008
## META0008 {#META0008}

Bad type for input message field annotated with either `EVENT_PAYLOAD` or `EVENT_METADATA`.

Fields annotated with `(dev.restate.ext.field) = EVENT_PAYLOAD` can have only `bytes` or `string` types.
Fields annotated with `(dev.restate.ext.field) = EVENT_METADATA` can have only `map<string, string>` type.

## META0009
## META0009 {#META0009}

The provided subscription is invalid. Subscriptions should have:

Expand All @@ -111,32 +112,32 @@ The provided subscription is invalid. Subscriptions should have:

Please look at the [Kafka documentation page](https://docs.restate.dev/services/sdk/kafka) for more details on subscriptions and event handlers.

## RT0001
## RT0001 {#RT0001}

The invocation response stream was aborted due to the timeout configured in `worker.invoker.response_abort_timeout`.
The invocation response stream was aborted due to the timeout configured in `worker.invoker.abort_timeout`.
This timeout is fired when Restate has an open invocation, and it's waiting only for response messages, but no message is seen for the configured time.

Suggestions:

* Check for bugs in your code. Most likely no message was sent to Restate because your code is blocked and/or reached a deadlock.
* If your code is supposed to not send any message to Restate for longer than the configured timeout, because for example is doing a blocking operation that takes a long time, change the configuration accordingly.

## RT0002
## RT0002 {#RT0002}

Cannot start Restate because the configuration cannot be parsed. Check the configuration file and the environment variables provided.

For a complete list of configuration options, and a sample configuration, check https://docs.restate.dev/restate/configuration

## RT0003
## RT0003 {#RT0003}

The invocation failed because the invoker received a message from a service endpoint larger than the `worker.invoker.message_size_limit`.
The invocation failed because the invoker received a message from a service larger than the `worker.invoker.message_size_limit`.

Suggestions:

* Check in your code whether there is a case where a very large message can be generated, such as a state entry being too large, a request payload being too large, etc.
* Increase the limit by tuning the `worker.invoker.message_size_limit` config entry, eventually tuning the memory of your operating system/machine where Restate is running.

## RT0004
## RT0004 {#RT0004}

Failed starting process because it could not bind to configured address.
This happens usually if another process has already bound to this address.
Expand All @@ -147,7 +148,7 @@ Suggestions:
* Stop the process that has bound to the specified address.
* Make sure you have the permissions to bind to the configured port. Some operating systems require admin/root privileges to bind to ports lower than 1024.

## RT0005
## RT0005 {#RT0005}

Failed opening RocksDB, because the db file is currently locked.
This happens usually if another process still holds the lock.
Expand All @@ -157,24 +158,24 @@ Suggestions:
* Check no other Restate process is running and using the same db file.
* Configure a different RocksDB storage directory via `worker.storage_rocksdb.path`.

## RT0006
## RT0006 {#RT0006}

An error occurred while invoking the service endpoint.
An error occurred while invoking the service deployment.
This is a generic error which can be caused by many reasons, including:

* Transient network or storage errors
* Misconfiguration of the service endpoint and/or of the Restate runtime
* Misconfiguration of the deployment and/or of the Restate runtime
* Non-deterministic user code execution
* Restate runtime and/or SDK bug

We suggest checking the service endpoint logs as well to get any hint on the error cause.
We suggest checking the service and/or deployment logs as well to get any hint on the error cause.

## RT0007
## RT0007 {#RT0007}

A retry-able error was received from the service endpoint while processing the invocation.
A retry-able error was received from the service deployment while processing the invocation.

Suggestions:

* Check the service endpoint logs to get more info about the error cause, like the stacktrace.
* Check the service/deployment logs to get more info about the error cause, like the stacktrace.
* Look at the https://docs.restate.dev/services/sdk/error-handling for more info about error handling in services.

16 changes: 8 additions & 8 deletions static/schemas/config_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"aws_profile": null
}
},
"tmp_dir": "/tmp/invoker-018c643db86e77aabbf01537673fc85a"
"tmp_dir": "/var/folders/tw/68_ctnh50rn41q721zt5pwfc0000gn/T/invoker-018c82c591827ca19d1f9fd029aa9964"
},
"kafka": {
"clusters": {}
Expand Down Expand Up @@ -319,7 +319,7 @@
},
"proxy_uri": {
"title": "Proxy URI",
"description": "A URI, such as `http://127.0.0.1:10001`, of a server to which all invocations should be sent, with the `Host` header set to the service endpoint URI. HTTPS proxy URIs are supported, but only HTTP endpoint traffic will be proxied currently. Can be overridden by the `HTTP_PROXY` environment variable.",
"description": "A URI, such as `http://127.0.0.1:10001`, of a server to which all invocations should be sent, with the `Host` header set to the deployment URI. HTTPS proxy URIs are supported, but only HTTP endpoint traffic will be proxied currently. Can be overridden by the `HTTP_PROXY` environment variable.",
"default": null,
"type": [
"string",
Expand All @@ -330,12 +330,12 @@
},
"Http2KeepAliveOptions": {
"title": "HTTP/2 Keep alive options",
"description": "Configuration for the HTTP/2 keep-alive mechanism, using PING frames.\n\nPlease note: most gateways don't propagate the HTTP/2 keep-alive between downstream and upstream hosts. In those environments, you need to make sure the gateway can detect a broken connection to the upstream service endpoint(s).",
"description": "Configuration for the HTTP/2 keep-alive mechanism, using PING frames.\n\nPlease note: most gateways don't propagate the HTTP/2 keep-alive between downstream and upstream hosts. In those environments, you need to make sure the gateway can detect a broken connection to the upstream deployment(s).",
"type": "object",
"properties": {
"interval": {
"title": "HTTP/2 Keep-alive interval",
"description": "Sets an interval for HTTP/2 PING frames should be sent to keep a connection alive.\n\nYou should set this timeout with a value lower than the `response_abort_timeout`.",
"description": "Sets an interval for HTTP/2 PING frames should be sent to keep a connection alive.\n\nYou should set this timeout with a value lower than the `abort_timeout`.",
"default": "40s",
"type": "string"
},
Expand Down Expand Up @@ -467,7 +467,7 @@
"aws_profile": null
}
},
"tmp_dir": "/tmp/invoker-018c643db86f74ce922f05651d8051e9"
"tmp_dir": "/var/folders/tw/68_ctnh50rn41q721zt5pwfc0000gn/T/invoker-018c82c5918376c3823c7e25a9dcb86f"
},
"$ref": "#/definitions/InvokerOptions"
},
Expand Down Expand Up @@ -741,15 +741,15 @@
},
"message_size_warning": {
"title": "Message size warning",
"description": "Threshold to log a warning in case protocol messages coming from service endpoint are larger than the specified amount.",
"description": "Threshold to log a warning in case protocol messages coming from a service are larger than the specified amount.",
"default": 10485760,
"type": "integer",
"format": "uint",
"minimum": 0.0
},
"message_size_limit": {
"title": "Message size limit",
"description": "Threshold to fail the invocation in case protocol messages coming from service endpoint are larger than the specified amount.",
"description": "Threshold to fail the invocation in case protocol messages coming from a service are larger than the specified amount.",
"default": null,
"type": [
"integer",
Expand All @@ -761,7 +761,7 @@
"tmp_dir": {
"title": "Temporary directory",
"description": "Temporary directory to use for the invoker temporary files. If empty, the system temporary directory will be used instead.",
"default": "/tmp/invoker-018c643db86f7855b8a3c1cee7a6fa91",
"default": "/var/folders/tw/68_ctnh50rn41q721zt5pwfc0000gn/T/invoker-018c82c591847eda9cf5c24d62ac5553",
"type": "string"
},
"concurrency_limit": {
Expand Down
Loading

0 comments on commit 8471a92

Please sign in to comment.