简体   繁体   中英

Error while connecting Mongo to localhost

I have Robo 3T-1.3 installed on my ubuntu 16.4 LTS. It is showing me the following error:

`Cannot connect to the MongoDB at localhost:27017.

Error: Network is unreachable. Reason: couldn't connect to server localhost:27017, connection attempt failed: SocketException: Error connecting to localhost:27017 (127.0.0.1:27017):: caused by:: Connection refused`

How to solve it?

Firstly check your mongo status via this command.

sudo systemctl status mongod

OR

You can follow this link. https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-ubuntu-16-04

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM