Unable to connect to Cluster

connection string got from the connect section in atlas. This is on 4.2 version
mongo “mongodb+srv://cluster0-ehtiu.mongodb.net/test” --username m001-student


Hi @sandeepkarumuri,

Are you connected to any corporate/VPN network ?

I’m able to connect to your cluster using this connection string :

mongo "mongodb+srv://cluster0-ehtiu.mongodb.net/test" --username m001-student --password m001-mongodb-basics

Log into your atlas account and select the connection string for mongo shell version 3.4 or earlier and try to connect using that connection string.

Hope it helps!

Please let me know if the issue still persists.

Shubham Ranjan
Curriculum Services Engineer

Hi Shubham,

Thanks for your reply.

I am trying to connect from my personal computer and its not connect to any corporate/VPN network. I am still getting the same error.

I tried connecting to mongo by selecting 3.4 or earlier version and I got the below screen.

I whitelisted the IP’s in atlas.

just for your FYI, I tried doing just mongo in my command prompt and I got the below reply.

Please help in solving this.

Sandeep Karumuri

I can connect to your cluster.

Did you try --tls option as suggested in your snapshot?
Most likely firewall issues/antivirus blocking your connection
Please try some other internet connection like mobile hotspot

Hi @sandeepkarumuri,

In addition to @Ramachandra_37567,

I’m also able to connect to your cluster. Can you please make sure you are able to ping the nodes in the cluster ?

ping cluster0-shard-00-00-ehtiu.mongodb.net

ping cluster0-shard-00-01-ehtiu.mongodb.net

ping cluster0-shard-00-02-ehtiu.mongodb.net

Please make sure that firewall/anti-virus on your system is not blocking the request.

Were you able to connect to the class atlas cluster from the mongo shell ?

mongo "mongodb://cluster0-shard-00-00-jxeqq.mongodb.net:27017,cluster0-shard-00-01-jxeqq.mongodb.net:27017,cluster0-shard-00-02-jxeqq.mongodb.net:27017/test?replicaSet=Cluster0-shard-0" --authenticationDatabase admin --ssl --username m001-student --password m001-mongodb-basics

Shubham Ranjan
Curriculum Services Engineer