Are you logged into your MongoDB Atlas, if your are not; the cluster is not active and you wont be able to connect.
Also you shouldn’t need to specify the Replica Set Name, it should just use an active replica.(I only mention this for debugging!)
Thanks for your prompt response.
How do i log into MongoDb Atlas ?
Apologies as i now relies that this is for a different chapter.
Try changing the Read Preference to Primary Preferred? Other than that looks good.
Again sorry for any confusion.
Tried “Primary Preferred”. Did not connect, the same issue.
Which version of compass you are using?
Any firewall issues
Are you able to connect with shell
Are you able to ping server?
Please check this
Still not connected.
Pinging ec2-34-195-121-130.compute-1.amazonaws.com [18.104.22.168] with 32 bytes of data:
Reply from 22.214.171.124: bytes=32 time=38ms TTL=46
Reply from 126.96.36.199: bytes=32 time=47ms TTL=46
Reply from 188.8.131.52: bytes=32 time=37ms TTL=46
Reply from 184.108.40.206: bytes=32 time=41ms TTL=46
Ping statistics for 220.127.116.11:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 37ms, Maximum = 47ms, Average = 40ms
am having similar issues
but i get this error “connection 7 to cluster0-shard-00-00-jxeqq.mongodb.net:27017 closed”
Is it stable version?
did you try to restart compass
Whitelist means it will allow you to login from anywhere
Please check our forums.Steps available with snapshots
Command to connect from shell
mongo mongodb://cluster0-shard-00-00-jxeqq.mongodb.net:27017,cluster0-shard-00-01-jxeqq.mongodb.net:27017,cluster0-shard-00-02-jxeqq.mongodb.net:27017/test?replicaSet=Cluster0-shard-0 --authenticationDatabase admin --ssl --username m001-student --password m001-mongodb-basics
Please check the following post for your issue:
Please follow these steps to whitelist IP:
Login into your Atlas account and Click on Network Access tab under Security Section
Then click “IP Whitelist” followed by “Add IP Address”. If there is already any IP address, click Edit under Actions setion.
Finally, click “Allow Access from Anywhere” and click “Confirm”.
Please let me know, if you are still facing any issue.
Please share the connection string you have used and also the complete screenshot of the error.
Thanks for the concern…I figured it out and is working now.
I am also got this issue. how I can fix this?
Did you try to restart compass?
Please check your connections parameters also
As mentioned by @Ramachandra_37567, please try to restart compass. If it doesn’t work, then share the screenshot of the compass connection parameters.
Are you able to connect using the mongo shell?
Did you try to restart compass and Pc
please check your connections parameters also
Having the same issue, cannot connect. Anyone sorted this out yet?
I can connect to my personal cluster, but I have not been able to connect to the cluster provided. Anyone connected yet? Pinged the host, ping is active.
Hi, I have also facing the same issue…