Mongodb networking issue
smatte02
HOBBYOP

16 days ago

network connectivity issue between Backend and MongoDB. Both private domain and public TCP proxy are failing.

The two services cannot communicate reliably.

$10 Bounty

2 Replies

Status changed to Open Railway 16 days ago


What exactly is the error that you are getting?


15 days ago

If both private networking and the public TCP proxy are failing, I’d first test them separately, because they solve different things.

From a backend running inside Railway, use the private Mongo URL, not the public TCP proxy. The public proxy is mostly for connecting from outside Railway.

Check these first:

  • backend and MongoDB are in the same project + same environment
  • the backend is using Railway's generated Mongo variable, not an old copied URL
  • both services were redeployed after changing variables/networking
  • the Mongo URL includes authSource=admin and usually directConnection=true

The exact error matters a lot here:

ENOTFOUND = hostname/env/service reference problem

ECONNREFUSED = wrong host/port or service not listening

Authentication failed = wrong credentials/authSource

Timeout = networking/service readiness issue

Can you paste the exact driver error from the backend logs? That should narrow it down fast.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...