MongoNetworkError: failed to connect to server - Mongo-Express keeps restarting

Hi all,
I am running into an issue connecting mongo-express to mongo db. Could any help me in heree if I am missing anything?

I have already asked here - MongoNetworkError: failed to connect to server - Mongo-Express keeps restarting

Thank you!

Check your connect string again
When you are connecting to your replica with replicaset name you have to pass all the 3 hostnames in your string

Hi @Ramachandra_Tummala,

I just tried adding all hostnames - ME_CONFIG_MONGODB_URL: mongodb://${MONGO_USERNAME}:${MONGO_PASSWORD}@mongo1:27017,mongo2:27017,mongo3:27017/?authSource=admin&replicaSet=replicaSetConfig

Anyway the startap still fails :confused:

Okay, found out the issue:

It was a missconfig with defined network. Just deleted that and added all hostnames to connectionString and everything seems to be okay from now on.

Thank you @Ramachandra_Tummala for your time and minly help! :slight_smile:

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.