Lab: Connect to your Atlas Cluster

I follow as instructed Unable to connect to db from IDE. got below error. Please help.

bash-4.4# mongo “mongodb+srv://sandbox.te2ie.mongodb.net/test” --username m001-student
MongoDB shell version v4.0.5
Enter password:
connecting to: mongodb://sandbox-shard-00-00.te2ie.mongodb.net.:27017,sandbox-shard-00-01.te2ie.mongodb.net.:27017,sandbox-shard-00-02.te2ie.mongodb.net.:27017/test?authSource=admin&gssapiServiceName=mongodb&replicaSet=atlas-wnop69-shard-0&ssl=true
2020-11-13T20:09:56.782+0000 I NETWORK [js] Starting new replica set monitor for atlas-wnop69-shard-0/sandbox-shard-00-00.te2ie.mongodb.net.:27017,sandbox-shard-00-01.te2ie.mongodb.net.:27017,sandbox-shard-00-02.te2ie.mongodb.net.:27017
2020-11-13T20:09:56.942+0000 W NETWORK [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set atlas-wnop69-shard-0
2020-11-13T20:09:56.942+0000 I NETWORK [ReplicaSetMonitor-TaskExecutor] Cannot reach any nodes for set atlas-wnop69-shard-0. Please check network connectivity and the status of the set. This has happened for 1 checks in a row.
2020-11-13T20:09:57.491+0000 W NETWORK [js] Unable to reach primary for set atlas-wnop69-shard-0
2020-11-13T20:09:57.491+0000 I NETWORK [js] Cannot reach any nodes for set atlas-wnop69-shard-0. Please check network connectivity and the status of the set. This has happened for 2 checks in a row.
2020-11-13T20:09:58.032+0000 W NETWORK [js] Unable to reach primary for set atlas-wnop69-shard-0
2020-11-13T20:09:58.032+0000 I NETWORK [js] Cannot reach any nodes for set atlas-wnop69-shard-0. Please check network connectivity and the status of the set. This has happened for 3 checks in a row.
2020-11-13T20:09:58.581+0000 W NETWORK [js] Unable to reach primary for set atlas-wnop69-shard-0
2020-11-13T20:09:58.581+0000 I NETWORK [js] Cannot reach any nodes for set atlas-wnop69-shard-0. Please check network connectivity and the status of the set. This has happened for 4 checks in a row.
2020-11-13T20:09:59.120+0000 W NETWORK [js] Unable to reach primary for set atlas-wnop69-shard-0
2020-11-13T20:09:59.120+0000 I NETWORK [js] Cannot reach any nodes for set atlas-wnop69-shard-0. Please check network connectivity and the status of the set. This has happened for 5 checks in a row.
2020-11-13T20:09:59.660+0000 W NETWORK [js] Unable to reach primary for set atlas-wnop69-shard-0
2020-11-13T20:09:59.660+0000 I NETWORK [js] Cannot reach any nodes for set atlas-wnop69-shard-0. Please check network connectivity and the status of the set. This has happened for 6 checks in a row.
2020-11-13T20:10:00.209+0000 W NETWORK [js] Unable to reach primary for set atlas-wnop69-shard-0
2020-11-13T20:10:00.209+0000 I NETWORK [js] Cannot reach any nodes for set atlas-wnop69-shard-0. Please check network connectivity and the status of the set. This has happened for 7 checks in a row.
2020-11-13T20:10:00.749+0000 W NETWORK [js] Unable to reach primary for set atlas-wnop69-shard-0
2020-11-13T20:10:00.749+0000 I NETWORK [js] Cannot reach any nodes for set atlas-wnop69-shard-0. Please check network connectivity and the status of the set. This has happened for 8 checks in a row.
2020-11-13T20:10:01.289+0000 W NETWORK [js] Unable to reach primary for set atlas-wnop69-shard-0
2020-11-13T20:10:01.289+0000 I NETWORK [js] Cannot reach any nodes for set atlas-wnop69-shard-0. Please check network connectivity and the status of the set. This has happened for 9 checks in a row.
2020-11-13T20:10:01.829+0000 W NETWORK [js] Unable to reach primary for set atlas-wnop69-shard-0
2020-11-13T20:10:01.829+0000 I NETWORK [js] Cannot reach any nodes for set atlas-wnop69-shard-0. Please check network connectivity and the status of the set. This has happened for 10 checks in a row.
2020-11-13T20:10:02.369+0000 W NETWORK [js] Unable to reach primary for set atlas-wnop69-shard-0
2020-11-13T20:10:02.369+0000 I NETWORK [js] Cannot reach any nodes for set atlas-wnop69-shard-0. Please check network connectivity and the status of the set. This has happened for 11 checks in a row.
2020-11-13T20:10:02.908+0000 W NETWORK [js] Unable to reach primary for set atlas-wnop69-shard-0
2020-11-13T20:10:03.448+0000 W NETWORK [js] Unable to reach primary for set atlas-wnop69-shard-0
2020-11-13T20:10:03.987+0000 W NETWORK [js] Unable to reach primary for set atlas-wnop69-shard-0
2020-11-13T20:10:04.527+0000 W NETWORK [js] Unable to reach primary for set atlas-wnop69-shard-0
2020-11-13T20:10:05.068+0000 W NETWORK [js] Unable to reach primary for set atlas-wnop69-shard-0
2020-11-13T20:10:05.607+0000 W NETWORK [js] Unable to reach primary for set atlas-wnop69-shard-0
2020-11-13T20:10:06.147+0000 W NETWORK [js] Unable to reach primary for set atlas-wnop69-shard-0
2020-11-13T20:10:06.687+0000 W NETWORK [js] Unable to reach primary for set atlas-wnop69-shard-0
2020-11-13T20:10:07.226+0000 W NETWORK [js] Unable to reach primary for set atlas-wnop69-shard-0
2020-11-13T20:10:07.767+0000 W NETWORK [js] Unable to reach primary for set atlas-wnop69-shard-0
2020-11-13T20:10:07.767+0000 I NETWORK [js] Cannot reach any nodes for set atlas-wnop69-shard-0. Please check network connectivity and the status of the set. This has happened for 21 checks in a row.
2020-11-13T20:10:08.307+0000 W NETWORK [js] Unable to reach primary for set atlas-wnop69-shard-0
2020-11-13T20:10:08.847+0000 W NETWORK [js] Unable to reach primary for set atlas-wnop69-shard-0
2020-11-13T20:10:09.387+0000 W NETWORK [js] Unable to reach primary for set atlas-wnop69-shard-0
2020-11-13T20:10:09.926+0000 W NETWORK [js] Unable to reach primary for set atlas-wnop69-shard-0
2020-11-13T20:10:10.465+0000 W NETWORK [js] Unable to reach primary for set atlas-wnop69-shard-0
2020-11-13T20:10:11.004+0000 W NETWORK [js] Unable to reach primary for set atlas-wnop69-shard-0
2020-11-13T20:10:11.544+0000 W NETWORK [js] Unable to reach primary for set atlas-wnop69-shard-0
2020-11-13T20:10:11.544+0000 E QUERY [js] Error: connect failed to replica set atlas-wnop69-shard-0/sandbox-shard-00-00.te2ie.mongodb.net.:27017,sandbox-shard-00-01.te2ie.mongodb.net.:27017,sandbox-shard-00-02.te2ie.mongodb.net.:27017 :
connect@src/mongo/shell/mongo.js:328:13
@(connect):1:6
exception: connect failed
bash-4.4#

Hi @Senthilkumar_Balakrishnan !

  • Connect with your string (fails)
  • Ping servers (works)

Then, one of the possible issues, is your IP is blacklisted.

Open Atlas UI and go to “Network” on the left panel.

It should look like this:

If it doesn’t, edit to look the same.

1 Like

Hi @Senthilkumar_Balakrishnan,

Let us know if you are still facing any issues.

~ Shubham