5
votes

Every time I try to connect to MongoDB Atlas cluster, Compass gets stuck in some never-stop-loading bug.
There is no error of any kind, not even in dev-tools.
If I try to connect to localhost, everything works fine.
Atlas connection string is never recognized automatically, if that means something.
I need to paste it manually, and after I click connect, white overlay is shown and that's it.
I disabled firewall, reinstalled mongoDb from my computer, tried to restart service couple of times ...nothing helps.

White overlay after clicking on connect:

enter image description here

ps. I have a cluster created, with mongoDB user and white-listed my IP.
pps. compass version is 1.20.5, windows 10

4
Click on the menu "View > Toggle DevTools" and see whether there's any specific error messages that you're able to post here.Wan Bachtiar
no errors in dev toolskl123

4 Answers

15
votes

Sorry I just figured it out.

  • You need to go to "Connect" in Atlas, go to "Connect Your Application" (NOT "Connect with MongoDB Compass")

  • Change Node.js version to "2.2.12 or later"

  • Copy connection string as normal, replace password and paste in Compass

Edit: I've come up with even more details - the underlying problem could be your DNS. Try to replace it with the Google DNS for example (8.8.8.8) to see if it fixes the issue and continue using the up-to-date connection string.

1
votes

It could be a permissions thing, try running as administrator.

0
votes

I would recommend:

  • Uninstalling/Installing the latest MongoDB Compass version
  • Double checking workstation authorizes MongoDB port outgoing requests (27017 by default, but it shouldn't be needed as you disabled your firewall)
  • Double checking your IP address is indeed in the IP whitelist (that would be my first guess)
  • Double checking your user has read permission in the cluster
  • Double checking the connection string, in MongoDB Atlas click on "Connect", indicate Atlas and copy/paste

For the IP whitelist, just to be sure you can check it by going to MongoDB Atlas https://account.mongodb.com/, click in the left column on Security > Network

MongoDB Atlas left column

Then double check your IP is here (it will be indicated), otherwise click on "Add IP address".

enter image description here

0
votes

I am using the 4.4.6 version Following these steps may help you,

Network access : 0.0.0.0/0 (or your personal IP)

Database access : readWriteAnyDatabase

Choose connect to your application

you will get a string like :

mongodb+srv://admin:@sickcluster.a87o5.mongodb.net/myFirstDatabase?retryWrites=true&w=majority

change the admin, Password with brackets<>, and myFirstDatabase values {database name is optional}

now paste this URL in your MongoDb compass and application