We have moved to www.dataGenX.net, Keep Learning with us.

Monday, March 23, 2015

MongoDB is unable to start due to lock file

While starting MongoDB server, You are facing that MongoDB is not getting up with a exception says -

Sun Jan 18 12:27:03.884 [initandlisten] exception in initAndListen: 10310 Unable to lock file: /data/db/mongod.lock. Is a mongod instance already running?, terminating
Sun Jan 18 12:27:03.884 dbexit:

Normally, we are facing this issue due to 1. improper MongoDB server shutdown or 2. someone else is started the mongo server. In the second case, we dont have any issue, we can connect to out db without issue.