I’m at M001, trying to connect using the given online IDE.
I can’t seem to successfully connect…
I’m getting this error:
user@M001# mongo "mongodb+srv://sandbox.2pb0l.mongodb.net/test" --username m001-student -p m001-mongodb-basicsMongoDB shell version v4.0.5
connecting to: mongodb://sandbox-shard-00-01.2pb0l.mongodb.net.:27017,sandbox-shard-00-00.2pb0l.mongodb.net.:27017,sandbox-shard-00-02.2pb0l.mongodb.net.:27017/test?authSource=admin&gssapiServiceName=mongodb&replicaSet=atlas-zpqu3s-shard-0&ssl=true
2021-12-08T20:13:46.414+0000 I NETWORK [js] Starting new replica set monitor for atlas-zpqu3s-shard-0/sandbox-shard-00-01.2pb0l.mongodb.net.:27017,sandbox-shard-00-00.2pb0l.mongodb.net.:27017,sandbox-shard-00-02.2pb0l.mongodb.net.:27017
2021-12-08T20:13:49.085+0000 W NETWORK [js] Unable to reach primary for set atlas-zpqu3s-shard-0
2021-12-08T20:13:49.085+0000 I NETWORK [js] Cannot reach any nodes for set atlas-zpqu3s-shard-0. Please check network connectivity and the status of the set. This has happened for 1 checks in a row.
2021-12-08T20:13:53.577+0000 W NETWORK [js] Unable to reach primary for set atlas-zpqu3s-shard-0
2021-12-08T20:13:53.577+0000 I NETWORK [js] Cannot reach any nodes for set atlas-zpqu3s-shard-0. Please check network connectivity and the status of the set. This has happened for 2 checks in a row.
2021-12-08T20:13:57.743+0000 W NETWORK [js] Unable to reach primary for set atlas-zpqu3s-shard-0
2021-12-08T20:13:57.743+0000 I NETWORK [js] Cannot reach any nodes for set atlas-zpqu3s-shard-0. Please check network connectivity and the status of the set. This has happened for 3 checks in a row.
2021-12-08T20:14:01.968+0000 W NETWORK [js] Unable to reach primary for set atlas-zpqu3s-shard-0
2021-12-08T20:14:01.968+0000 I NETWORK [js] Cannot reach any nodes for set atlas-zpqu3s-shard-0. Please check network connectivity and the status of the set. This has happened for 4 checks in a row.
2021-12-08T20:14:01.968+0000 E QUERY [js] Error: connect failed to replica set atlas-zpqu3s-shard-0/sandbox-shard-00-01.2pb0l.mongodb.net.:27017,sandbox-shard-00-00.2pb0l.mongodb.net.:27017,sandbox-shard-00-02.2pb0l.mongodb.net.:27017 :
connect@src/mongo/shell/mongo.js:328:13
@(connect):1:6
exception: connect failed
*** IMPORTANT NOTE ***
I WAS ABLE TO SUCCESFULLY CONNECT using:
a) Windows Shell
b) MongoDB Compass
using the same URI, when the only difference was that I used mongosh instead of mongo.
The IDE is the only one giving me trouble.
Please help!