Unable to connect to atlas cluster using compass.. no errors shown

No errors not do the databases load. I have followed all the steps in the lecture notes and provided the right user name and pwd. How to check what the issue is?

Hi Renuka_09544,

Please try doing these steps mentioned in this post.

For more troubleshooting on Compass, look here.

Let me know if it still don’t work.

Kanika

Thanks for the quick response but I still have the same issue "Could not connect to MongoDB on the provided host and port…

Please see the ping and tracert results

Hi Renuka_09544,

Please ensure you are using latest version of Compass i.e 1.16.1. If not, download the latest version.

Use “Primary preferred” as Read Preference and then restart compass and then try again.

Test that if you are able to connect from the shell and the problem is only with Compass. Run the following command from your terminal / command line:

 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

If you are able to connect and not from the compass even after restarting, let me know.

Kanika

Hi kanikasingla i ran the command it worked fine but still on connecting compass i am getting “could not connect to mongoDB on the provided host and port”

Hi Quazi_31756,

Please try troubleshooting steps for Compass mentioned here.

Make sure you have latest version i.e 1.16.1 and there is no special character in the fields. I would prefer typing host, username and password instead of copy/paste.

Kanika

Hi,

Thanks for the wonderful course.

When I try to connect via Compass, I get a “Server selection timed out after 10000 ms” error. I can ping the given cluster address. Don’t know where to post the query.

Hi @Jagadeesh_65947,

Welcome to M001: MongoDB Basics course :slightly_smiling_face:

As I can see in the screenshot, you have entered incorrect username. It should be m001-student.

In addition to this, you are using MongoDB Compass Community edition, which we don’t recommend in this course as it lacks some functionalities which we use in this course.

Please download Compass 1.19.12 (Stable) version from the Download Centre.

Screenshot 2019-10-09 at 12.33.41 AM.png

Hope it helps!

If you have any other issue please feel free to get back to us.

Happy Learning :slight_smile:

Thanks,
Shubham Rajan
Curriculum Support Engineer

Hi,

Thanks for the quick reply. I tried with m001-student first. Took screenshot in the wrong time I guess. :wink:

Trying with Compass Stable Release; hope it works!

Thank you so much once again.

Hi,

For clarification, please see the attached error that Compass community version throws.
:frowning:

Hi,

Sorry to bother again. Stable Release also shows the same error.

:frowning:

BTW, I could install a CE server and connect to the server from Terminal and Compass. Double checked the username and password too. Any help would be appreciated as I am new to MongoDB and don’t know any workaround.

Hi @Jagadeesh_65947,

It might be due to some network related issue.

Please verify that port 27017 is not blocked by clicking http://portquiz.net:27017

On some occasions, even though users are able to ping the cluster and the port is not blocked but network is still a problem. So please make sure you are not connected to any VPN network and Firewall/Antivirus is disabled. You can also try to connect from some other network such as your home network .

Hope it helps!

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

Thanks,
Shubham Ranjan
Curriculum Support Engineer

Hi,

I’m on my home network and running CentOS 8.
Port 27017 is enabled and no other apps are using the same. SeLinux context also has been added.

Checked the Portquiz method too. (Hid the IP as others might not appreciate it.)
Please see the attached screenshot.

Any help would be appreciated.

Thank you