Recovering from: 'std::exception: old lock file, terminating' on a MongoDB server.
If a server running MongoDB crashed or MongoDB did not get to shut down cleanly for some other reason, you may not be able to start Mongo again, getting "exception in initAndListen std::exception: old lock file, terminating" error in Mongo error log. Fix is actually pretty easy, you just need to locate mongod.lock file and remove it. On a Debian server installed from the mongodb-10gen repository it is usually located at: /var/lib/mongodb/mongod.lock.
If it is not there in your installation, check the "dbpath" configuration variable in mongodb.conf file (typically: /etc/mongodb.conf). Lock file should be under the folder indicated by dbpath.