Skip to content
Cannot connect to the console of my service - both via web interface and railway client
rbk001
OP

19 days ago

when trying to connect to the console of the service via web interfaces I am getting:

An error occurred connecting to your service. Please try again.

I am gettign the same error when using railway cli:

railway ssh --project=id --environment=id --service=id

An error occurred connecting to your service. Please try again.

Connection to ssh.railway.com closed.

Solved

9 Replies

Status changed to Awaiting Railway Response Railway • 19 days ago


dizzydes90
EMPLOYEE

19 days ago

SSH and the Console are failing because vicnezknihy has static outbound IPs enabled. The two don't work together right now: the container can't open its tunnel back to our SSH relay through the static-IP path, which is why the session drops after about 9 seconds even though your key is accepted. It isn't your image or configuration, and redeploying won't change it. We aim to have this fixed in the coming weeks and we'll reply here when it ships.

If you need a shell before then, turning static outbound IPs off and redeploying restores SSH, but the service's outbound IP changes, so only do that if nothing on your side allowlists the current IPs.


Status changed to Awaiting User Response Railway • 19 days ago


kylekeesling

19 days ago

After the recent incident I turned on static IPs so I could implement firewall rules for my database. Are you saying that if I want to do that I lose SSH functionality? If so are there any plans to support it at some time in the future? Are there any suggested workarounds?


Status changed to Awaiting Railway Response Railway • 19 days ago


dizzydes90
EMPLOYEE

19 days ago

Yes, for now that's the trade-off: while static outbound IPs are enabled on a service, SSH and the Console can't connect to it, so a database firewall that only allows those IPs means doing without a shell until we fix it. It's a bug on our side, not a design decision, and the fix is in progress. We aim to ship it in the coming weeks and we'll reply here when it's out.

The only workaround today is the one above: turn static outbound IPs off and redeploy, which restores SSH but changes the service's outbound IP, so your database firewall would need updating too. If you can live without a shell for a while, keeping static IPs on and waiting for the fix is the safer option for your firewall rules.


Status changed to Awaiting User Response Railway • 19 days ago


moizsaifee

16 days ago

Same Problem. Need an urgent fix


Status changed to Awaiting Railway Response Railway • 16 days ago


dizzydes90

Yes, for now that's the trade-off: while static outbound IPs are enabled on a service, SSH and the Console can't connect to it, so a database firewall that only allows those IPs means doing without a shell until we fix it. It's a bug on our side, not a design decision, and the fix is in progress. We aim to ship it in the coming weeks and we'll reply here when it's out. The only workaround today is the one above: turn static outbound IPs off and redeploy, which restores SSH but changes the service's outbound IP, so your database firewall would need updating too. If you can live without a shell for a while, keeping static IPs on and waiting for the fix is the safer option for your firewall rules.

moizsaifee

16 days ago

"Weeks" is just too long. Having static IPs for whitelisting is such a common need, and disabling them with no guarantee of getting the same IPs back is not workable.


16 days ago

We understand, and you're right that turning Static Outbound IPs off isn't a workable option when something allowlists your current addresses, since turning the feature back on doesn't guarantee the same IPs. We can't give a concrete date for when SSH and the console will work alongside Static Outbound IPs.

If your service has Static Outbound IPs enabled, the workaround that keeps them in place is to deploy a separate small service without Static Outbound IPs in the same project and environment and use it as a jumpbox. Note that the jumpbox alone doesn't open a shell inside the static-IP service, so it does require some setup on that service.


Status changed to Awaiting User Response Railway • 16 days ago


moizsaifee

16 days ago

Thanks for your reply, but shouldn't you give a guide on how to do that setup, rather than leaving customers to figure own on their own? I tried the jump box method, but was stuck due to SSH etc not being available in my "jumpbox". If you can't enable a feature which existed quickly, you should at least give an official guide on workaround.


Status changed to Awaiting Railway Response Railway • 16 days ago


15 days ago

Sorry about the dead end. Our last reply should have explained that part, so here is how the setup works.

The jumpbox can't open a shell inside the static-IP service by itself, because that service doesn't run an SSH server you can reach. To keep Static Outbound IPs on and still get a shell, the target service needs its own SSH server.

On the target service, add an SSH server to its image through your build configuration (for example your Dockerfile) and redeploy. You don't need a working SSH session to do this. Set up authentication, such as an authorized public key, and have the server listen on a port that is reachable over the project's private network. Run it alongside your application. Outbound traffic still uses your static IPs.

For the jumpbox, deploy a small separate service without Static Outbound IPs in the same project and environment, using an image that includes an SSH client. Connect to it with Railway SSH or the console, which work on that service, then SSH from there to the target's private network hostname on the port your SSH server listens on.

The jumpbox stalled earlier because it had no SSH client and the target had no SSH server to connect to. With both of those in place, the route works without changing your static IPs.


Status changed to Awaiting User Response Railway • 15 days ago


10 days ago

SSH should now work with Static Outbound IPs enabled. Please try connecting again and let us know if you still run into any issues.

Thank you for your patience.


Railway
BOT

3 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 • 3 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...