M001: Chapter1-Lab2: connect to Sandbox fails from IDE

i was able to connect using command prompt.

Unable to connect to atlas since we have followed each and every step mentioned by your team please help us out

You are running the command in wrong area of IDE
Please run it in terminal area.It will work

If you are certain that you have the right sandbox name but you are still not able to connect make sure you hit enter in the terminal window after your command. Common mistake is to paste the string obtained into the terminal and clicking “Run Test” instead of hitting enter key in the terminal.

2 Likes

Thank you for your help. Kept typing the connection string on the connection.txt. page instead of the lower IDE.

saved my life, its been two days i wasn’t able to connect. i was hitting Run test instead of Enter Key, :frowning: . There should be Enter key too


Please help me out. Im stuck in this. Also pls tell me why people are hiding the text after Sandbox.

Typo in your command
It is mongo not mango
Sandbox is your own cluster and each user has unique cluster id
For security purpose they are erasing the cluster id part so that others cannot login to their cluster

Hii

I am stuck on chapter 1, ’ Lab: Connect to your Atlas Cluster’ and not able to connect Atlas cluster to MongoDB IDE.

I am not able to figure out what exactly the problem is… so please help me out.

I suspect it is related to the IP white list. The address of the VM running in the IDE is not the same as your PC. You should allow access from anywhere for the IDE to work.

3 Likes

Thanks a lot… It worked.

Hi @Uzair_Muhammad,

Thanks for sharing your thoughts. We are currently in the process of upgrading the IDE tool and we will definitely keep your feedback in consideration.

~ Shubham

Hii
This is Priyanka. I am facing this Problem from last two days in chap-01 Lab-2. Can any one help me how to solve it.

There is not a lot more to say than

Did you create a user named m001-student?

What is the name of the user? How did you connect?

I had the same issue with Shri_Biyani

I try to terminate and change the name of the cluster but is not feasible

If your cluster is named Cluster0 you have to enter Cluster0 where it asks to enter the cluster name.

I am unable to connect to database. The instructions do not indicate which database to connect to so I attempted the first one as well as created a “test” database. All fail connection.
ClusterName: Sandbox
DBUser: m001-student
IDE Text: bash-4.4# mongo “mongodb+srv://sandbox.8u18p.mongodb.net/sample_airbnb” --username m001-student --password m001-mongodb-basics
MongoDB shell version v4.0.5
connecting to: mongodb://sandbox-shard-00-00.8u18p.mongodb.net.:27017,sandbox-shard-00-01.8u18p.mongodb.net.:27017,sandbox-shard-00-02.8u18p.mongodb.net.:27017/sample_airbnb?authSource=admin&gssapiServiceName=mongodb&replicaSet=atlas-rhupcu-shard-0&ssl=true
2021-01-07T23:30:42.520+0000 I NETWORK [js] Starting new replica set monitor for atlas-rhupcu-shard-0/sandbox-shard-00-00.8u18p.mongodb.net.:27017,sandbox-shard-00-01.8u18p.mongodb.net.:27017,sandbox-shard-00-02.8u18p.mongodb.net.:27017
2021-01-07T23:30:43.035+0000 W NETWORK [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set atlas-rhupcu-shard-0
2021-01-07T23:30:43.035+0000 I NETWORK [ReplicaSetMonitor-TaskExecutor] Cannot reach any nodes for set atlas-rhupcu-shard-0. Please check network connectivity and the status of the set. This has happened for 1 checks in a row.
2021-01-07T23:30:44.220+0000 W NETWORK [js] Unable to reach primary for set atlas-rhupcu-shard-0
2021-01-07T23:30:44.220+0000 I NETWORK [js] Cannot reach any nodes for set atlas-rhupcu-shard-0. Please check network connectivity and the status of the set. This has happened for 2 checks in a row.
2021-01-07T23:30:45.398+0000 W NETWORK [js] Unable to reach primary for set atlas-rhupcu-shard-0
2021-01-07T23:30:45.398+0000 I NETWORK [js] Cannot reach any nodes for set atlas-rhupcu-shard-0. Please check network connectivity and the status of the set. This has happened for 3 checks in a row.
2021-01-07T23:30:46.572+0000 W NETWORK [js] Unable to reach primary for set atlas-rhupcu-shard-0
2021-01-07T23:30:46.572+0000 I NETWORK [js] Cannot reach any nodes for set atlas-rhupcu-shard-0. Please check network connectivity and the status of the set. This has happened for 4 checks in a row.
2021-01-07T23:30:47.750+0000 W NETWORK [js] Unable to reach primary for set atlas-rhupcu-shard-0
2021-01-07T23:30:47.750+0000 I NETWORK [js] Cannot reach any nodes for set atlas-rhupcu-shard-0. Please check network connectivity and the status of the set. This has happened for 5 checks in a row.
2021-01-07T23:30:48.926+0000 W NETWORK [js] Unable to reach primary for set atlas-rhupcu-shard-0
2021-01-07T23:30:48.926+0000 I NETWORK [js] Cannot reach any nodes for set atlas-rhupcu-shard-0. Please check network connectivity and the status of the set. This has happened for 6 checks in a row.
2021-01-07T23:30:50.088+0000 W NETWORK [js] Unable to reach primary for set atlas-rhupcu-shard-0
2021-01-07T23:30:50.088+0000 I NETWORK [js] Cannot reach any nodes for set atlas-rhupcu-shard-0. Please check network connectivity and the status of the set. This has happened for 7 checks in a row.
2021-01-07T23:30:51.249+0000 W NETWORK [js] Unable to reach primary for set atlas-rhupcu-shard-0
2021-01-07T23:30:51.249+0000 I NETWORK [js] Cannot reach any nodes for set atlas-rhupcu-shard-0. Please check network connectivity and the status of the set. This has happened for 8 checks in a row.
2021-01-07T23:30:52.431+0000 W NETWORK [js] Unable to reach primary for set atlas-rhupcu-shard-0
2021-01-07T23:30:52.432+0000 I NETWORK [js] Cannot reach any nodes for set atlas-rhupcu-shard-0. Please check network connectivity and the status of the set. This has happened for 9 checks in a row.
2021-01-07T23:30:53.594+0000 W NETWORK [js] Unable to reach primary for set atlas-rhupcu-shard-0
2021-01-07T23:30:53.594+0000 I NETWORK [js] Cannot reach any nodes for set atlas-rhupcu-shard-0. Please check network connectivity and the status of the set. This has happened for 10 checks in a row.
2021-01-07T23:30:54.756+0000 W NETWORK [js] Unable to reach primary for set atlas-rhupcu-shard-0
2021-01-07T23:30:54.756+0000 I NETWORK [js] Cannot reach any nodes for set atlas-rhupcu-shard-0. Please check network connectivity and the status of the set. This has happened for 11 checks in a row.
2021-01-07T23:30:55.924+0000 W NETWORK [js] Unable to reach primary for set atlas-rhupcu-shard-0
2021-01-07T23:30:57.101+0000 W NETWORK [js] Unable to reach primary for set atlas-rhupcu-shard-0
2021-01-07T23:30:57.101+0000 E QUERY [js] Error: connect failed to replica set atlas-rhupcu-shard-0/sandbox-shard-00-00.8u18p.mongodb.net.:27017,sandbox-shard-00-01.8u18p.mongodb.net.:27017,sandbox-shard-00-02.8u18p.mongodb.net.:27017 :
connect@src/mongo/shell/mongo.js:328:13
@(connect):1:6
exception: connect failed

image

I also tried in Compass. Same issue

mongodb://m001-student:m001-mongodb-basics@sandbox-shard-00-00-jxeqq.mongodb.net:27017/?authSource=admin&replicaSet=sandbox-shard-0&readPreference=primaryPreferred&appname=MongoDB%20Compass&ssl=true

Have you whitelisted your IP?

The connect string you are trying with Compass is Class cluster’s not your Sandbox
If you are trying to connect to Class cluster please check replicaSet part.It should be Cluster0 not sandbox

Always showing the same issue.
Tried Making the whole cluster 2-3 times still the error is same.
Kindly Help