Skip to content
railway ssh
fails for one service only — "An error occurred connecting to your service"
erp
OP

18 days ago

SSH into service enigma-server fails on every replica. Key authentication to ssh.railway.com succeeds, then the gateway returns "An error occurred connecting to your service. Please try again." and closes the connection. Other services in the same project and environment (celery, cdc-relay, adminer) connect fine with the same key. celery and cdc-relay are built from the same repo and Dockerfile.

  • Project: 2b3fa114-cb6e-4fce-be47-fc61adc5435b
  • Environment: production e81fb1bf-4b24-417e-b75c-7ffa11162b01
  • Service: enigma-server ff3c313e-b9ae-4804-8bd2-6e77be19c259
  • Current deployment: 5d849951-73d5-4050-81db-047714783595
  • CLI: 5.71.0; also fails with plain ssh <instance-id>@ssh.railway.com, with railway ssh -d <instance-id>, and with the domain as the username

Already tried, with no change: turned Serverless off and redeployed, scaled to 1 replica and back to 2, and fresh containers. The service is healthy (HTTP 200, 3 of 24 GB memory used).

While scaling down, the default railway ssh target returned "Your service's container is not running (status: exited)" for an instance that had just been removed, so the gateway seems to be routing this service to stale instances.

Solved

1 Reply

Status changed to Awaiting Railway Response Railway • 18 days ago


dizzydes90
EMPLOYEE

18 days ago

Thanks for the detail; a healthy service that SSH authenticates to and then drops before the command runs, while its siblings connect fine, has one cause to rule out first. Could you check whether Static Outbound IPs is enabled on enigma-server, under its Settings, Networking? SSH and the dashboard Console are not available on a service with that feature enabled: the connection is accepted at ssh.railway.com and then closed with exactly that error, and redeploying, scaling or re-registering a key doesn't change it, which matches everything you've already tried.

If it is on, the only ways to get a shell are to turn the feature off while you work and back on afterwards (the assigned addresses are released when it's off and may differ when re-enabled, so avoid this if an external allowlist depends on them), or to run the command from a service without it. If it is not on, reply here and we'll look at the instance routing you noticed; nothing will be restarted or changed on our side without you.


Status changed to Awaiting User Response Railway • 18 days ago


Railway
BOT

11 days ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway • 11 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...