Cant connect to db

Hi guys,
I cant connect to db.
All the parameters are correct, i followed all the instructions on the sticky post (Compass Connection [Solution]) etc.
i can tracert , i can load all good.
still getting a “Could not connect to MongoDB on the provided host and port”

so whats next?

Maybe you entered the wrong password. Check it again

not the case, checked several times…
also can be stated on the log:

Hi @mnunes,
As I can see in the screenshots,

  1. You are able to ping the cluster, so firewall is not an issue.
  2. Your port 27017 is also not blocked.

Use this connection string to connect to the class atlas cluster from the mongo shell.

mongo “mongodb://,,” --authenticationDatabase admin --ssl --username m001-student --password m001-mongodb-basics

Please refer this great post by @Kanika on Compass connection issue.

If the issue still persists, feel free to get back to us. Happy Learning :slight_smile:

Shubham Ranjan
Curriculum Support Engineer

Still getting issues, maybe some firewall rules preventing it… i will try later from another connection.

Hi @mnunes,

It looks like you are not able to connect to any of the node of the replica set.
There might be a possibility of firewall blocking the connection. If you are using work laptop, try removing the firewall and also disconnect any vpn connected.

Also, you can give it a try in your home network.

Please let me know, if the problem persists.


yeah i will try at home, theres plenty of firewall rules on the office

Hi @mnunes,

Sure, Good Luck for the course!!

Please feel free to posts any questions/doubts here.


so just a following… it does work form another connection. so probably only firewall rules preventing traffic on the 27017 port