Cant connect using COMPASS

Hi ,
I am unable to connect to DB using compass.

Getting below error

MongoDB not running on the provided host and port

Using host :cluster-shard-00-00-jxeqq.mongodb.net and port:27017 as per the lesson

tried to ping the host and got a result:

ping cluster0-shard-00-00-jxeqq.mongodb.net

Pinging ec2-34-195-121-130.compute-1.amazonaws.com [34.195.121.130] with 32 bytes of data:
Reply from 34.195.121.130: bytes=32 time=423ms TTL=46
Reply from 34.195.121.130: bytes=32 time=258ms TTL=46
Reply from 34.195.121.130: bytes=32 time=283ms TTL=46
Reply from 34.195.121.130: bytes=32 time=290ms TTL=46

Ping statistics for 34.195.121.130:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 258ms, Maximum = 423ms, Average = 313ms

Can anyone please help to know me where and what I am doing wrong?

Hi @Samita_65087,

Please share the screenshot with the parameters listed in Compass. Sometimes, a space/special character gets appended while copy/paste.

Also, try this command in your shell and share the output:

  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

Kanika

Are you signed into your MongoDB Atlas? If not the cluster may not be active…

Hi Kanika,

Attached is the screenshots of the failure when I tried to connect from compass and after running the command you asked to run .


3
Compass_failure

Thanks a lot for your input.

Hi Jordan,

Really sorry to ask the basic questions.
Can you please help me to know before installing Mongo compass what else I need to install to use compass.

Because i followed the instruction in course M001 and install the compas and got this error while trying to connect.

Thanks,
Samita

Hi @Samita_65087,

Everything is correct except Replica Set Name. Please set it to Cluster0-shard-0.

Here is my screenshot of Compass connection:

Kanika

Thanks a lot Kanika.

I am able to connect now.