I am.facing an issue when we connecting to MongoDB

You should contact your system admin to see why your private server running on your private network is not running.

1 Like

My RS is deploy on Azure cloud. I want to connect this RS cluster using connection string to my local laptop.
But not able connect

Is your cluster Atlas or self managed?

What is the connection string you are using?

is not enough to know what is happening. Any error messages?

My RS with a 3 nodes is deploy on RedHat 8 .0 servers (using AWS cloud). Now I want to connect this cluster on Robomongo/MongoDB compass using Connection string (mongodb://Mysuperuserdb:1234@mymongo.demo0.com:27017,mymongo.demo1.com:27017,mymongo.demo2.com:27017/?replicaSet=replicaset01&authSource=admin")

I have install both MongoDB GUI tools on my personal laptop, I already configured my DNS into /etc/hosts file

See below connection string for Robomongo GUI tools

mongodb://superuserdb:1234@mymongo.demo0.com:27017,mymongo.demo1.com:27017,mymongo.demo2.com:27017/?replicaSet=replicaset01&authSource=admin

Can you ping mymongo.demo1.com and mymongo.demo2.com? Please post the output.

You have have 3 nodes in your replica set.

Can you share the output of rs.status()?

Can you connect with mongosh directly (that is without replicaSet= option) to all of the nodes one by one?

OutPut of rs.status()



ping result of “mymongo.demo0.com

ping result of “mymongo.demo1.com” & " mymongo.demo2.com"

Hi,
@steevej

I have tried to connect one by one node but not able to connect on MongoDB Compass/Robomongo

Most likely your 172.31.85.0 Network is not properly routed from your workstation. You need to adjust your routing tables. If you do not know how to do that ask your system admin. If they do not know how to do that use Atlas.