Cannot connect to Atlas

Hi,

I’m having issue when connecting to my Atlas cluster in the in-browser IDE and got the below message:

2021-07-14T10:10:40.706+0000 W NETWORK [ReplicaSetMonitor-TaskExecutor] Unable to reach primary for set atlas-jofnii-shard-0

2021-07-14T10:10:43.851+0000 W NETWORK [js] Unable to reach primary for set atlas-jofnii-shard-0

2021-07-14T10:10:54.132+0000 E QUERY [js] Error: connect failed to replica set atlas-jofnii-shard-0/m1-shard-00-00.vnbyl.mongodb.net.:27017,m1-shard-00-01.vnbyl.mongodb.net.:27017,m1-shard-00-02.vnbyl.mongodb.net.:27017 :
connect@src/mongo/shell/mongo.js:328:13
@(connect):1:6
exception: connect failed

I wonder why this is happening and how can I fix this? Thanks.

Hi @Wanqing_Wang,

Can you kindly share your connection string so, we can check it from our end?

Regards,
Kushagra

Your cluster seems to be setup correctly as the DNS information is correct.

Either you have a firewall or VPN preventing you from exiting your network on port 27017. Try going to http://portquiz.net:27017. If you cannot then it is the reason why you cannot reach Atlas.

The other thing might be the IP access list you set up. For this course it is safe to allow from anywhere.