Railway SSH - Error: Session error
alex-bytes
PROOP

2 years ago

I've just updated the cli using:

npm i -g @railway/cli

And after logging in, linking, connecting etc we arrive here:

Project: CCVI Infrastructure
Environment: staging
Service: Laravel App
PS C:\Users\aless\Dev\CCVI\laravel-backend> railway ssh
  Connected to interactive shell                                                                                                                     
Error: Session error```

I've tried logging back out, then in again but nothing works. Where am I going wrong?
Closed

25 Replies

alex-bytes
PROOP

2 years ago

cdf1815d-d3de-4820-866b-7fea03248e92


alex-bytes
PROOP

2 years ago

I have not set up account tokens if this is an issue. Also, I'm embarassed to say I don't fully understand their setup.


alex-bytes
PROOP

2 years ago

Hello?


alex-bytes
PROOP

2 years ago

😦


2 years ago

try linking the project again


2 years ago

and just to make sure, what is your CLI version?


alex-bytes
PROOP

2 years ago

cdf1815d-d3de-4820-866b-7fea03248e92


alex-bytes
PROOP

2 years ago

The latest. I made sure to use the install command


2 years ago

I’m out of ideas… I wonder if its how the image is built 🤔


2 years ago

Is it using a Dockerfile?


alex-bytes
PROOP

2 years ago

No, nixpacks


alex-bytes
PROOP

2 years ago

Tried again and got the following error:

> Open the browser? Yes
Logged in as Alessandro Parini (alessandroparini@hotmail.com)                                                                                                                                                                                                   
PS C:\Users\aless\Dev\CCVI\laravel-backend> railway link
> Select a workspace CCVI Infrastructure
> Select a project CCVI Infrastructure
> Select an environment staging
> Select a service  Laravel App

Project CCVI Infrastructure linked successfully! 🎉
PS C:\Users\aless\Dev\CCVI\laravel-backend> railway ssh
Expected welcome message, received: error                                                                                                                                                                                                                       
PS C:\Users\aless\Dev\CCVI\laravel-backend> 

2 years ago

are you able to SSH into any other service?


alex-bytes
PROOP

2 years ago

NOW it works. I have literally changed nothing


alex-bytes
PROOP

2 years ago

Super glad it does. Missing this feature has caused me so much unnecessary work


alex-bytes
PROOP

2 years ago

But clearly the issue was at railway then


alex-bytes
PROOP

2 years ago

Well now it stopped working, though I ran the exact same commands


alex-bytes
PROOP

2 years ago

> Select service Laravel App
No supported database found in service
PS C:\Users\aless\Dev\CCVI\laravel-backend> railway ssh
Expected welcome message, received: error                                                                                                                                                                                                              
PS C:\Users\aless\Dev\CCVI\laravel-backend> ```


echohack
EMPLOYEE

2 years ago

@Alessandro Are you using a service that has Serverless enabled? if the container is asleep you won't be able to ssh into it


echohack
EMPLOYEE

2 years ago

This leads me to believe that your container might be falling asleep


alex-bytes
PROOP

2 years ago

:/

1359491838309957752


alex-bytes
PROOP

2 years ago

I don't use serverless in any service currently


echohack
EMPLOYEE

2 years ago

Hey there @Alessandro

I was able to confirm that railway ssh works for your Laravel App service. I think the issue may lie in your configuration.

Can you try explicitly using your projectID, service, and environmentID to confirm?

railway ssh --project=cdf1815d-d3de-4820-866b-7fea03248e92 --environment=c78560a7-98ec-4264-9b77-000a99c91588 --service=fe442047-6e50-4169-a683-877176bf38c7

Apologies for the slow response, we're all at an event together so response times will be slower.


bgroble14
PRO

a year ago

i have the exact same issue and its driving me nuts. sometimes randomly works. I have tried explicitly saying "railway ssh --project=cdf1815d-d3de-4820-866b-7fea03248e92 --environment=c78560a7-98ec-4264-9b77-000a99c91588 --service=fe442047-6e50-4169-a683-877176bf38c7" this method using my correct project environemnt and service names. has anyone figure this out?


alex-bytes
PROOP

a year ago

I am sadly still experiencing these errors. Sometimes it works, but mostly it doesn't. And I'm not doing anything differently when it works


Welcome!

Sign in to your Railway account to join the conversation.

Loading...