fly ssh console --pty -C “/rails/bin/rails console” --app lokal-production
Error: ssh: can’t build tunnel for lokal: websocket: failed to WebSocket dial: failed to send handshake request: Get “https://jnb1.gateway.6pn.dev:443/”: dial tcp 102.67.165.132:443: connect: operation timed out
I keep getting this error. This was running perfectly yesterday and the las 2 years working with it.
This are the docs from which i configured the command: Running Tasks & Consoles · Fly Docs.
I re-tested on March 5, 2026 and it is still failing with the same error.
What I verified:
fly status --app lokal-production works
fly doctor -o lokal fails at the WireGuard gateway step
exact failure is timeout to https://jnb1.gateway.6pn.dev:443/
it fails on both my normal network and phone hotspot
fly agent restart, fly wireguard reset lokal, and fly wireguard websockets enable did not fix it
forcing machine/region still fails: fly ssh console -a lokal-production -r iad --machine 0801672a346378 --pty -C "echo ok"
LOG_LEVEL=debug shows GraphQL/app lookup succeeds and peer validation succeeds; the failure only happens when opening the gateway websocket
This looks like a Fly-side gateway/peer assignment issue rather than a local network problem. Can someone inspect or clear the org’s WireGuard/gateway assignment?
No VPN involved, and it fails on multiple networks including phone hotspot. fly wireguard reset still fails the same way, so I can’t clear the peer myself.
Any update on the health of this gateway or the jnb assignment?
in what way does fly wg reset fail? what is the exact error message?
does curl -kv https://jnb1.gateway.6pn.dev work? it works for me. if it doesn’t work, could you please provide a mtr: mtr -rwbzo "LSD NABVW" jnb1.gateway.6pn.dev
? Select Organization: Lokal (lokal)
Error: websocket: failed to WebSocket dial: failed to send handshake request: Get "https://jnb1.gateway.6pn.dev:443/": dial tcp 102.67.165.132:443: connect: operation timed out
curl -kv https://jnb1.gateway.6pn.dev:
Host jnb1.gateway.6pn.dev:443 was resolved.
IPv6: (none)
IPv4: 102.67.165.132
Trying 102.67.165.132:443…
connect to 102.67.165.132 port 443 from 192.168.100.200 port 58779 failed: Operation timed out
Failed to connect to jnb1.gateway.6pn.dev port 443 after 75377 ms: Couldn’t connect to server
Closing connection
curl: (28) Failed to connect to jnb1.gateway.6pn.dev port 443 after 75377 ms: Couldn’t connect to server
thanks, I’ll ask our provider why this might be happening. in the meantime, could you try connecting with FLY_AGENT_WG_REGION environment variable set to a different region nearby?
Quick update: forcing a fresh Fly agent to iad worked for the WireGuard checks.
The earlier FLY_AGENT_WG_REGION=gru/gig/iad fly doctor -o lokal attempts did not change anything because the existing background Fly agent was still running and still using jnb.
When I restarted the agent with the env var set:
fly agent stop
FLY_AGENT_WG_REGION=iad fly agent start
fly agent ping
fly doctor -o lokal
I got: PID : 26288 Version : 0.4.19 Background: true Testing authentication token… PASSED Testing flyctl agent… PASSED Testing local Docker instance… Nope Pinging WireGuard gateway (give us a sec)… PASSED Testing WireGuard DNS… PASSED Testing WireGuard Flaps… PASSED
I can access the Rails console using the FLY_AGENT_WG_REGION=iad: