Sunday, April 6, 2014

MongoDB not able to start :cause of : exception in initAndListen: 12596 old lock file, terminating

Some times when you start the mongo db server then it is not able to start because of following exception:

exception in initAndListen: 12596 old lock file, terminating

Solution

In this case just use the mongo db "--repair" command fix this issue.

  1. Go to bin directory in mongo db folder i.e E:\MongoDB\bin
  2. Delete the mongod.lock file. (this step is optional)
  3. Now open the command prompt and run this command i.e. "E:\mongodb\bin>mongod.exe --repair --dbpath=E:\mongoData\data\db"
  4. Now start the mongo db service.
  5. Verify that mongo db is running successfully.

No comments:

Post a Comment