Issues connecting from the IDE

Hello, I am tring to re-test the lab at:
https://university.mongodb.com/mercury/M001/2020_October_20/chapter/Chapter_1_What_is_MongoDB_/lesson/5f32dec404e9ffc0285d7076/problem

I was able to connect using the IDE last week, and successfully completed this lab, but I am trying it again this week and the connection is failing for some reason:
I am able to connect using the same command below using the Mongo Shell, but not through the IDE.

The command I am using is as follows (from Atlas):
mongo “mongodb+srv://sandbox.p3tyo.mongodb.net/” --username m001-student

the response is:

MongoDB shell version v4.0.5
Enter password:
connecting to: mongodb://sandbox-shard-00-01.p3tyo.mongodb.net.:27017,sandbox-shard-00-02.p3tyo.mongodb.net.:27017,sandbox-shard-00-00.p3tyo.mongodb.net.:27017/%3Cdbname%3E?authSource=admin&gssapiServiceName=mongodb&replicaSet=atlas-4j1t2p-shard-0&ssl=true
2020-10-28T18:35:06.016+0000 I NETWORK [js] Starting new replica set monitor for atlas-4j1t2p-shard-0/sandbox-shard-00-01.p3tyo.mongodb.net.:27017,sandbox-shard-00-02.p3tyo.mongodb.net.:27017,sandbox-shard-00-00.p3tyo.mongodb.net.:27017
2020-10-28T18:35:06.514+0000 W NETWORK [js] Unable to reach primary for set atlas-4j1t2p-shard-0
2020-10-28T18:35:06.514+0000 I NETWORK [js] Cannot reach any nodes for set atlas-4j1t2p-shard-0. Please check network connectivity and the status of the set. This has happened for 1 checks in a row.
2020-10-28T18:35:07.701+0000 W NETWORK [js] Unable to reach primary for set atlas-4j1t2p-shard-0
2020-10-28T18:35:07.701+0000 I NETWORK [js] Cannot reach any nodes for set atlas-4j1t2p-shard-0. Please check network connectivity and the status of the set. This has happened for 2 checks in a row.
##etc. through 11 checks
2020-10-28T18:35:19.421+0000 W NETWORK [js] Unable to reach primary for set atlas-4j1t2p-shard-0
2020-10-28T18:35:20.603+0000 W NETWORK [js] Unable to reach primary for set atlas-4j1t2p-shard-0
2020-10-28T18:35:20.604+0000 E QUERY [js] Error: connect failed to replica set atlas-4j1t2p-shard-0/sandbox-shard-00-01.p3tyo.mongodb.net.:27017,sandbox-shard-00-02.p3tyo.mongodb.net.:27017,sandbox-shard-00-00.p3tyo.mongodb.net.:27017 :
connect@src/mongo/shell/mongo.js:328:13
@(connect):1:6
exception: connect failed

Please help. I cannot find anything from the course material to help me.
Thanks.
Greg.

What is the status of this cluster when you check on Atlas?

As far as I can tell the connection is good. I am able to view Collections from my Atlas Cluster.
When I click Connect, it gives me different connection strings, but does not do anything else - not sure if that is the norm.
Thanks.

Have you tried with this new connection string?

I absolutely have no clue why the connection string would change.

@Greg_Taylor Have you configured network access to your Atlas cluster?

1 Like

@yulia_genkina happy cake day :slight_smile:

I had this exact issue, fixed it by setting up the connection security (it seems I hadn’t added the 0.0.0. IP address)

1 Like

Thanks all. Setting the 0.0.0 ip address fixed the issue. I am thinking that my Ip Address changed, that would be why it worked last week, but stopped working this week. Setting to 0.0.0.0 will make this easier, and I don’t need the training to be super secure.
:))
Greg.