blog-nodejs container cannot resolve mysql.railway.internal via Private Networking
gitalffa
HOBBYOP

3 hours ago

Project: blog-nodejs (service: blog-nodejs)

Environment: production

Issue: The blog-nodejs container cannot resolve internal Private Networking

hostnames at all, even though Private Networking shows as active/ready in

the dashboard for both services.

Confirmed from inside the blog-nodejs container console:

$ getent hosts mysql.railway.internal

(no output)

$ node -e "require('dns').lookup('mysql.railway.internal',(err,addr) => console.log(err || addr))"

Error: getaddrinfo ENOTFOUND mysql.railway.internal

code: 'ENOTFOUND'

This started after:

  1. I disabled Public Networking on the MySQL service.

  2. Shortly after, MySQL auto-upgraded from 9.4.0 to 9.7.2 (as part of the

    scheduled CVE-2026-22009 patch flow) when I applied the pending

    MYSQL_PUBLIC_URL removal change.

  3. Since then, blog-nodejs has been unable to reach MySQL via

    mysql.railway.internal or the short alias "mysql", failing with

    ETIMEDOUT, then PROTOCOL_CONNECTION_LOST, and now consistently

    ENOTFOUND — confirmed to be unresolved DNS from inside the container

    itself, not an application-level issue.

I've already tried:

  • Restarting/redeploying both services multiple times

  • Using both the full internal hostname and the short "mysql" alias

  • Confirming Private Networking shows "Ready to talk privately" (green

    check) on the MySQL service

As a temporary workaround, I've re-enabled Public Networking on MySQL so

the app stays up, but I'd like to close that back down once Private

Networking is fixed.

Could you please check whether blog-nodejs's container is properly

attached to the project's private network mesh?

Awaiting User Response

1 Replies

Railway
BOT

3 hours ago

Your MySQL service and blog-nodejs service are in two separate projects (the MySQL is in "intuitive-fascination" and blog-nodejs is in "lucid-laughter"). Private networking is isolated per project and environment, so mysql.railway.internal only resolves inside the project where MySQL lives and will never be reachable from blog-nodejs in the other project.

To use private networking between the two, they need to be in the same project and environment. You can create a new MySQL service inside the blog-nodejs project (or move the app into the MySQL project), and it will resolve over mysql.railway.internal as expected. Until then, public networking on MySQL is the only way for blog-nodejs to reach it.


Status changed to Awaiting User Response Railway about 3 hours ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...