Exception in initAndListen: 12596 old lock file, terminating, fileexception
# Mongd-f/etc/mongodb. conf error reported
Monogdb. log analysis
Unclean shutdown detected.
Please visit http://dochub.mongodb.org/core/repair for recovery instructions .*************
Wed Nov 5 04:14:35. 951 [initandlisten] exception in initAndListen: 12596 old lock file, terminating
Wed Nov 5 04:14:35. 951 dbexit:
Wed Nov 5 04:14:35. 951 [initandlisten] shutdown: going to close listening sockets...
Wed Nov 5 04:14:35. 951 [initandlisten] shutdown: going to flush diaglog...
Wed Nov 5 04:14:35. 951 [initandlisten] shutdown: going to close sockets...
Wed Nov 5 04:14:35. 951 [initandlisten] shutdown: waiting for fs preallocator...
Wed Nov 5 04:14:35. 951 [initandlisten] shutdown: closing all files...
Wed Nov 5 04:14:35. 951 [initandlisten] closeAllFiles () finishe
Wed Apr 1 04:14:35. 951 dbexit: really exiting now
Prompt Error Analysis: There is a long history D. lock File
Root cause: the VM instance is shut down unexpectedly, and the database is not shut down normally.
Solution: Delete the mongod. lock file and restart the database again.
# Mv primary D. lock primary D. lock. bak
# Mongd-f/etc/mongodb. conf
Check for database exceptions
Subsequent job: We recommend that you execute the job if any exceptions exist.
> Db. repairDatabase ()