[Solved] Mongodb Error: NETWORK [thread1] Failed to connect to


rico@ubuntu:~$ mongo
MongoDB shell version: 3.2.17
connecting to: test
2017-11-16T23:48:59.362+0800 W NETWORK [thread1] Failed to connect to, in(checking socket for error after poll), reason: errno:111 Connection refused
2017-11-16T23:48:59.362+0800 E QUERY [thread1] Error: couldn’t connect to server, connection attempt failed :

exception: connect failed


sudo rm /var/lib/mongodb/mongod.lock
sudo mongod --repair --dbpath /var/lib/mongodb
sudo mongod --fork --logpath /var/lib/mongodb/mongodb.log --dbpath /var/lib/mongodb 
sudo service mongodb start


Similar Posts: