Mongodb – How to repair the mongodb


I can't seem to connect to Mongo DB, which I've installed as a Windows Service on my local machine. I've also built a little WPF application which communicates with MongoDB.
The errormessage:

Error: couldn't connect to server shell/mongo.js:8
exception: connect failed
Unclean shutdown detected.

Best Solution

You should launch it with --repair flag.

mongod --repair

After repair is finished, stop this one and launch it normally. Documentation on --repair option.

Related Question