Mongodb – How to repair the mongodb

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 127.0.0.1 shell/mongo.js:8
4
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