Sometimes (not many) MongoDB can’t start normally, if there isn’t any configuration change for your side, you can fix it using the following commands.


sudo rm /var/lib/mongo/mongod.lock
sudo mongod --repair -dbpath /var/lib/mongo
sudo service mongod start

Tags:#mongodb