sdk-core icon indicating copy to clipboard operation
sdk-core copied to clipboard

[Feature Request] Friendly connection error messages

Open lorensr opened this issue 2 years ago • 2 comments

Errors I currently get from a Worker, and proposed new messages, to go along with @cretz's new error codes:

unknown domain

worker:start: TransportError: tonic::transport::Error(Transport, hyper::Error(Connect, ConnectError("dns error", Custom { kind: Uncategorized, error: "failed to lookup address information: nodename nor servname provided, or not known" })))

Unable to connect to the Server connection URL you provided, server.foo.com:7233, since according to DNS, the domain server.foo.com does not exist. Perhaps there's a typo, or you haven't yet set it up with your domain registrar.

If domain is *.tmprl.cloud, then:

Unable to connect to the Server connection URL you provided, loren.temporal-dev.tmprl.cloud:7233, since the loren.temporal-dev namespace does not exist. To get the correct URL, visit cloud.temporal.io/namespaces, click your namespace, and copy the gRPC address from the namespace detail page.

valid domain, no frontend running on the port

worker:dev: TransportError: tonic::transport::Error(Transport, hyper::Error(Connect, ConnectError("tcp connect error", Os { code: 61, kind: ConnectionRefused, message: "Connection refused" })))
worker:dev:     at Function.connect (/Users/me/gh/samples-typescript/food-delivery/node_modules/@temporalio/worker/src/connection.ts:51:15)

Unable to connect to the Server connection URL you provided, server.foo.com:7233, since there is no Temporal Server accepting connections on port 7233. Verify the domain is correct. If it is, ensure that the Server is running on 7233.

wrong cert

worker:start: TransportError: Failed to call GetSystemInfo: status: Unknown, message: "transport error", details: [], metadata: MetadataMap { headers: {} }
worker:start:     at Function.connect (/Users/me/gh/samples-typescript/food-delivery/node_modules/@temporalio/worker/lib/connection.js:55:23)

The connection [key/cert] you provided failed verification with the Server. Make sure it's the correct one, compatible with the CA certificate that server.foo.com has. For more info, see t.mp/T111

If domain is *.tmprl.cloud, then:

The connection [key/cert] you provided failed verification with Temporal Cloud. Make sure it's the correct one, compatible with the CA certificate that is uploaded to cloud.temporal.io/namespaces/loren.a2dd6. For more info, see t.mp/T222

lorensr avatar May 01 '23 20:05 lorensr

related: expired cert https://github.com/temporalio/features/issues/9

lorensr avatar May 01 '23 20:05 lorensr

Got the transport error again due to cert not matching, wish I had remembered this issue 😄

lorensr avatar Jan 17 '24 06:01 lorensr