Mongodb service won't start

后端 未结 12 1055
臣服心动
臣服心动 2020-12-15 03:32

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         


        
相关标签:
12条回答
  • 2020-12-15 03:56

    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.

    0 讨论(0)
  • 2020-12-15 03:57

    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.

    0 讨论(0)
  • 2020-12-15 03:57

    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.

    0 讨论(0)
  • 2020-12-15 04:00

    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 ;-)

    0 讨论(0)
  • 2020-12-15 04:01

    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]

    0 讨论(0)
  • 2020-12-15 04:09

    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).

    0 讨论(0)
提交回复
热议问题