502 Application failed to respond - deployment status COMPLETED, not ACTIVE
kornbread808
PROOP

a month ago

Node 22 / Express app. Build succeeds and the deployment reports

"Deployment successful" with status COMPLETED (not ACTIVE). All

requests to the public domain return 502 after a 15-second timeout.

Deploy logs show: Starting Container, npm running node src/server.js,

and my app's first startup console.log line - then nothing further.

My app.listen() log line never appears. Searching logs for

"listening" returns no results.

Already tried:

  • Redeploy (multiple times)
  • Set PORT=8080 as a service variable
  • Removed and regenerated the public domain with target port 8080
  • Confirmed no active incident on status.railway.com

This service worked normally earlier the same day with the same

code. A second service in the same project responds fine, so this

is not account-wide.

Start command: npm start -> node src/server.js

App listens on process.env.PORT

Request ID: aD0YJ5zqSt-BlmfFlt7tkg

Awaiting Conductor Response$10 Bounty

4 Replies

Railway
BOT

a month ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway • 26 days ago


Status changed to Solved kornbread808 • 26 days ago


kornbread808
PROOP

a month ago

Has not been resolved. Clicked resolved inadvertently


Status changed to Open Railway • 26 days ago


a month ago

Make sure you bind the address to 0.0.0.0 and not localhost or anything else


I'd check to make sure that when your app starts, it awaits and doesn't just run through the code. An online application should stay in an Active state instead of a Completed state.


kornbread808
PROOP

a month ago

Thank you greatly for your solution. Two variables were added shortly before the last known-good run ( both only read at startup). After the 502 started I added PORT=8080 and regenerated the domain with target port 8080 - neither changed anything. Your solution helped tremendously and it is greatly appreciated. Thanks again! Resolved!!


Status changed to Solved kornbread808 • 26 days ago


Status changed to Awaiting Conductor Response Railway • 25 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...