简体   繁体   中英

Mongo DB Cant Start

Evening we have had a mongodb running fine for a few weeks and all of sudden it has gone down.

We are unable to start it back up as it is complaining that the "dbpath (/data/db/) does not exist" I've tried routing through the documentation and have seen others suggest using the dbpath flag, however still no luck.

We are starting it with "sudo service mongodb start" and the config file dbpath config points to a directory with our db in.

Any advice would be greatly appreciated.

Thanks in advance. Gary

I would recommend trying running mongodb --config to ensure your config file is correct? Also have your recently updated your packages?

Step by Step:

  • set your mongo bin under the path
  • create a new folder under
  • your home directory eg. mkdir ~/db
  • go to your home directory eg. cd ~
  • start up your mongo db eg. mongod --dbpath ./db

If you are asking why /data/db/ this is gone, and I have no idea.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM