Internal DNS resolution failing for postgres.railway.internal
shubhamait
HOBBYOP

a month ago

Environment: Production (ID: 9c510fd2-bf6a-4a4c-bf08-xxxxxxxxxxx)
Region: us-west2 (US West California)

Issue: Backend service cannot resolve postgres.railway.internal
Error: getaddrinfo ENOTFOUND postgres.railway.internal

Both services (backend and postgres) are in the same environment and region.
Internal DNS should work but doesn't.

Workaround: Using public URL (gondola.proxy.rlwy.net:xxxxx) works fine.

Expected: Internal DNS postgres.railway.internal should resolve from backend service.
Solved

1 Replies

Railway
BOT

a month ago

Your backend service is in the "Backend-API" project while your postgres service is in the "DBService" project. Private networking only works between services within the same project and environment, so postgres.railway.internal cannot be resolved from a service in a different project. To use internal DNS, both services need to be in the same project.


Status changed to Awaiting User Response Railway about 1 month ago


Status changed to Solved shubhamait about 1 month ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...