logsCan't See Failed Deploy Logs
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.
5 Replies
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 
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.
Hopefully the Railway team can do a minimum repro.
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/clirecent 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
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. 
2 months ago
yes exactly