Error dialing the worker, handshake request fails

Hello everyone,

I’m trying to connect to a postgres target using the following command:

boundary connect postgres -target-id $TARGETID -dbname $DBNAME -token=$TOKEN 

I get the following error:

Error dialing the worker: failed to WebSocket dial: failed to send handshake request: Get "MyDomain:9202/v1/proxy": dial tcp MyIP:9202: i/o timeout

psql: server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.

error fetching connection to send session teardown request to worker: Error dialing the worker: failed to WebSocket dial: failed to send handshake request: Get "MyDomain:9202/v1/proxy": dial tcp MyIP:9202: i/o timeout

P.S:

  • I’m not using dev mode
  • I’m using an ingress

I/O timeouts usually mean something like a firewall is dropping the traffic. Can you give more detail about your configuration?

This post was flagged by the community and is temporarily hidden.

The first thing that sticks out to me is you may need to use path rewriting to make that work with an ingress – but I’m also not sure that having a worker exposed via an L7 ingress will even work, because workers do layer-4 proxying. When I do workers in a Kubernetes cluster I expose them via NodePort services.

1 Like

Thanks @omkensey since I couldn’t find a way with an ingress, I ended up using a load balancer for it to work.

As @omkensey suggested, Layer 7 forwarding is not currently supported for Boundary workers; it must be Layer 4.

1 Like