Railway CLI
logs
Can't See Failed Deploy Logs
bloodyaugust
HOBBYOP

2 months ago

The Railway CLI logs command won't show logs from the Deploy tab. They're visible in the Railway UI, but not the CLI.

I also have a failing healthcheck similar to https://station.railway.com/questions/cannot-see-deploy-logs-if-health-check-9092d374, but I can't say for sure that that's the key part of the issue. It may be any failure causing the problem.

I can confirm that for another service in the same deployment, deploy logs are available in the CLI.

$10 Bounty

5 Replies

ilyassbreth
FREE

2 months ago

to fix this click the "observability" tab in your railway dashboard's top navigation. it'll show all your environment logs including the failed deployment ones

alternative: grab the deployment id from your dashboard (click the failed deployment, it's in the url), then run:

railway logs <deployment-id>

the logs are there, the cli just can't find them automatically when deployments fail. observability tab is your best bet

hope this help you slightly_smiling_face emoji


bloodyaugust
HOBBYOP

2 months ago

Thanks for the response! Like I stated in the OP, I verified that they can be seen in the Railway UI, however your workaround with railway logs <deployment-id> actually doesn't work, I specifically tested that as well. They still don't show up at all.

It's definitely a bug in the CLI, though I'm still unsure of whether or not having it fail due to a healthcheck factors in, as I'm not willing to remove the healthcheck for obvious reasons. slightly_smiling_face emoji Hopefully the Railway team can do a minimum repro.


ilyassbreth
FREE

2 months ago

it's definitely a cli bug. since the deployment id approach didn't work either, can you confirm you're on the latest cli version?

railway version
npm i -g @railway/cli

recent cli releases specifically added support for failed deployment logs, so if you're on an older version that might be why.

if you're already on the latest version, then honestly there's no cli workaround right now ,it's a bug railway needs to fix. the ui observability tab is the only way to access those logs currently


bloodyaugust
HOBBYOP

2 months ago

Yupp, on latest, which as of this writing is 4.23.2.

If this isn't the right forum for a bug report, lemme know and I'll go make a real one (and nominate you for the $10 by accepting). Otherwise... I think railway is keeping that $10. confused emoji


ilyassbreth
FREE

2 months ago

yes exactly


Loading...