502 Bad Gateway: Edge proxy cannot route traffic to container (Service ID: 28b86baf-ac4a-450b-b77e-eff06fe6b6d9)
Anonymous
PROOP

2 months ago

Our backend service (AppGAS) in project 9c333718-e401-40e9-8021-562677dfe6b6d9 is returning 502 Bad Gateway errors.

The container deploys successfully, the server is listening on 0.0.0.0:8080, and all internal services (database, sync jobs) are operational. However, ZERO HTTP requests reach the application.

Evidence:

- Added request logging middleware at the first Express middleware layer

- When curling the endpoint, we get 502 but NO [HTTP] log entries appear

- Response header shows: x-railway-fallback: true

- Frontend service in same project/region works fine

We've tried:

- Switching from Nixpacks to Dockerfile

- Removing healthcheck config

- Verifying PORT=8080 binding

- Multiple redeploys

- All environment variables are correct

This appears to be a Railway edge proxy routing issue. The container is healthy but Railway's edge layer cannot route external traffic to it.

Solved$20 Bounty

Pinned Solution

ilyassbreth
FREE

2 months ago

try checking your domain's target port setting. go to service settings → networking → public networking, click the edit icon next to your domain. make sure the target port matches 8080 (what your app is actually listening on)

3 Replies

2 months ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open brody 2 months ago


ilyassbreth
FREE

2 months ago

try checking your domain's target port setting. go to service settings → networking → public networking, click the edit icon next to your domain. make sure the target port matches 8080 (what your app is actually listening on)


Status changed to Solved brody 2 months ago


ilyassbreth

try checking your domain's target port setting. go to service settings → networking → public networking, click the edit icon next to your domain. make sure the target port matches 8080 (what your app is actually listening on)

Anonymous
PROOP

2 months ago

You outperformed opus 4.5. Thank you sir.


Status changed to Awaiting Railway Response Railway 2 months ago


You outperformed opus 4.5. Thank you sir.

ilyassbreth
FREE

2 months ago

i'am always happy to help


Status changed to Solved brody 2 months ago


Loading...