I am not sure why, and the service was working fine just yesterday, all of a sudden I can not get MongoDB to start up.
[root@purr ~]# service mongod start
St
When I ran mongod.exe from Windows Terminal I got a message Unrecognized option: mp
. There was an empty mp:
in the end of mongod.cfg
. Removing that solved the problem for me.
I solved this by executing C:\mongodb\bin\mongod.exe --repair
first. Then when I ran MongoDB again by C:\mongodb\bin\mongod.exe
, it successfully started.
It's all in your error message - seems like unclean shutdown was detected. See http://docs.mongodb.org/manual/tutorial/recover-data-following-unexpected-shutdown/ for detailed information.
In my expirience, usually it helps to run mongod.exe
with --repair
option ro repair DB.
I verified permissions but all was good (mongod:mongod). As I'm working on a large project and from a similar issue in our dev environment where we had a script consuming all available disk space, I could see in the error messages that mongod needs at least 3.7Gb free disk space to run..
I checked my own disk space only to see that less than 2Gb was remaining. After moving / erasing some data I can successfully start mongod again.
Hope this helps ;-)
For me, the reason for not starting turned out to be an orphaned lock file at /var/lib/mongo/mongo.lock When I deleted that file, mongo would then start up OK. My system had had some messy crashes prior to this. [Fedora 14]
it probably might be due to the mongod.lock file, but if the error persists even after deleting it check the paths in mongo.conf; it might be a simple issue such as the configured log Path or dbPath is not there (check the paths in mongo/conf/mongod.conf and check whether they exists, sometimes mongo cannot in its own create directory structures therefore you might have to create those directories manually before starting mongod).