Lab - Configuration File - ... connection refused ... couldn't connect to server, connection attempted failed


vagrant@m103:~$ mongo --port 27000
MongoDB shell version v3.6.12
connecting to: mongodb://
2019-11-19T23:38:43.760+0000 W NETWORK [thread1] Failed to connect to, in(checking socket for error after poll), reason: Connection refused
2019-11-19T23:38:43.761+0000 E QUERY [thread1] Error: couldn’t connect to server, connection attempt failed :
exception: connect failed”

Why can’t I log in to mongo shell??


Hi @Guy_40794,

As I can see in the screenshot, I am guessing that you have provided incorrect parameter to the bindIp option in your configuration file and that’s why you are not able to connect to that mongod instance.

Please refer the Lecture: Configuration File to know more about how to bind the ips in your configuration file.

Hope it helps!

If the issue still persists then please feel free to get back to us.

Happy Learning :slight_smile:

Shubham Ranjan
Curriculum Support Engineer