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.
Restoring MongoDB From a Backup There are basically two ways you can use a BSON format dump: Run mongod directly from the backup directory. Run mongorestore and restore the backup.
The main purpose of mongod is to manage all the MongoDB server tasks. For instance, accepting requests, responding to client, and memory management. mongo is a command line shell that can interact with the client (for example, system administrators and developers).
You should launch it with --repair
flag.
mongod --repair
After repair is finished, stop this one and launch it normally. Documentation on --repair option.
Quicker:
sudo rm /data/db/mongod.lock sudo mongod --dbpath /data/db --repair sudo mongod --dbpath /data/db
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With