Wednesday, March 7, 2012

Unclean shutdown detected - MongoDB 2.0.2

If you are not able to start MongoDB server then log message says

Unclean shutdown detected.
*************
Wed Mar 7 15:17:41 [initandlisten] exception in initAndListen: 12596 old lock file, terminating
Wed Mar 7 15:17:41 dbexit:
Wed Mar 7 15:17:41 [initandlisten] shutdown: going to close listening sockets...
Wed Mar 7 15:17:41 [initandlisten] shutdown: going to flush diaglog...
Wed Mar 7 15:17:41 [initandlisten] shutdown: going to close sockets...
Wed Mar 7 15:17:41 [initandlisten] shutdown: waiting for fs preallocator...
Wed Mar 7 15:17:41 [initandlisten] shutdown: closing all files...
Wed Mar 7 15:17:41 [initandlisten] closeAllFiles() finished
Wed Mar 7 15:17:41 dbexit: really exiting now

One of the reason for this issue is lock file,So fix could be removing "mongod.lock"
File location could be /srv/db/mongodb/mongod.lock

Then restart MongoDB service
/etc/init.d/mongodb start

Hope it may help to solve unclean issue

No comments:

Post a Comment