3 hours ago
Plan: Hobby
Project ID: laudable-simplicity
Environment: production
Region: Singapore (all services)
Setup: one app service (Dockerfile, Python/FastAPI, Debian-based image) and Postgres, all in the same project and environment, private networking enabled on all.
From inside the app container (getent ahosts, glibc resolver):
| name | result |
|-------------------------------------------------------|-------------------------------|
| railway.com | resolves |
| data-standardization-application.railway.internal (self) | resolves (fd12:1304:2fee:...) |
| kdsm-db.railway.internal (Postgres, created yesterday, region moved once, renamed from "postgres") | does not resolve |
| postgres.railway.internal (brand-new Postgres created today, never moved) | does not resolve |
What I tried: redeploying the app, redeploying the Postgres source image, renaming the Postgres service, creating a fresh Postgres in the same environment. The old Postgres is healthy and reachable through its public TCP proxy with correct credentials.
Question: why can the app resolve only its own private name, and what re-establishes private DNS for the other services in this environment?
3 Replies
3 hours ago
In your workspace, the laudable-simplicity project's production environment contains only the app service. The two Postgres services we can see each belong to a different project, and neither is named kdsm-db. Private networks are isolated per project and environment, so a service can only resolve *.railway.internal names for services in its own project and environment, which matches the app resolving only itself.
To use private networking, add the Postgres service inside the laudable-simplicity project's production environment, then connect with <service-name>.railway.internal from the app at runtime (private networking is not available during the build). See How Private Networking Works.
Status changed to Awaiting User Response Railway • about 3 hours ago
2 hours ago
Resolved: services were in different projects
Status changed to Awaiting Railway Response Railway • about 2 hours ago
Status changed to Solved Railway • about 2 hours ago
Railway
In your workspace, the laudable-simplicity project's production environment contains only the app service. The two Postgres services we can see each belong to a different project, and neither is named `kdsm-db`. Private networks are isolated per project and environment, so a service can only resolve `*.railway.internal` names for services in its own project and environment, which matches the app resolving only itself. To use private networking, add the Postgres service inside the laudable-simplicity project's production environment, then connect with `<service-name>.railway.internal` from the app at runtime (private networking is not available during the build). See [How Private Networking Works](https://docs.railway.com/networking/private-networking/how-it-works).
2 hours ago
thanks so much
Status changed to Awaiting Railway Response Railway • about 2 hours ago
Status changed to Solved Railway • about 2 hours ago