Reputation: 267
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:
ps. I have a cluster created, with mongoDB user and white-listed my IP.
pps. compass version is 1.20.5, windows 10
Upvotes: 11
Views: 11527
Reputation: 1681
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
Upvotes: 0
Reputation: 236
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.
Upvotes: 20
Reputation: 236
It could be a permissions thing, try running as administrator.
Upvotes: 2
Reputation: 365
I would recommend:
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
Then double check your IP is here (it will be indicated), otherwise click on "Add IP address".
Upvotes: 0