Not connectiong with mongodb compass

While connecting MongoDB IT SHOWS MongoDB not running on the provided host and port,

@Devi_P What is the error?

In each lab it should explicitly tell you the expectations of the MongoU team. They should tell you which hostname, port and database to connect on.

Can you please tell us which lab / exercise you’re working on? As in, please link to it directly.

Hi Devi_P,

I am sorry that you are having trouble connecting to compass. Here are few checks:

If you are able to connect through the command above, restart compass and try again.

Also, please check this post.


i can’t copy past from the atlas cluster to the command line it keeps saying error

Hi @Mihret_56857,

Can you please share the error message that you are getting on pasting the connection string in your command line ?

Shubham Ranjan
Curriculum Support Engineer

hi ! I.m facing this error
2019-12-02T20:00:51.030+0530 W NETWORK [js] Unable to reach primary for set Cluster0-shard-0
2019-12-02T20:00:51.030+0530 I NETWORK [js] Cannot reach any nodes for set Cluster0-shard-0. Please check network connectivity and the status of the set. This has happened for 1 checks in a row.
2019-12-02T20:00:51.138+0530 E QUERY [js] Error: connect failed to replica set Cluster0-shard-0/,, :
exception: connect failed

Hi @Ritik_20533,

I have responded to you here in this thread. You have mentioned that you were not able to open .

It means that the outgoing traffic to port 27017 is probably blocked on your local network . Please contact your IT department to see if there is a workaround or try to make the request from another location such as your home network .

Shubham Ranjan
Curriculum Support Engineer

it shows me error while connecting!

you have the wrong password

1 Like

Hi @Vara_Sajjanapu,

Why aren’t you using the connection string ?


~ Shubham