Failed to Connect to a Master Node at Localhost:27017
December 31, 2012Everytime my server looses power, Mongo has trouble restarting. These commands fixes the problem.
sudo rm /var/lib/mongodb/mongod.lock
sudo -u mongodb mongod -f /etc/mongodb.conf --repair
sudo service mongodb restart