-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
ALL
A server had a failure in the middle of the night that caused a hard-reboot (nothing to do with Mongo) but then after boot the MongoDB service never started up again (turning the 1-minute of downtime into most of the night until a human would intervene.)
The issue was that the Mongo server would not start up unless all locks are cleared, this was in the log:
-
-
-
-
-
-
-
-
-
-
-
-
-
old lock file: /data/db/mongod.lock. probably means unclean shutdown
recommend removing file and running --repair
see: http://dochub.mongodb.org/core/repair for more information
*************
-
-
-
-
-
-
-
-
-
-
-
-
This seems great if you are restarting and really bad for a fresh-start when Mongo is not currently running. My startup script now has a clause for:
mv /data/db/mongod.lock /data/db/mongod.lock.old
But this is a hack - the Mongo server should just ignore the locks and start-up if there is no server currently active.