MongoDB

From iFixWiki
Revision as of 23:54, 18 February 2020 by Ifixadmin (talk | contribs) (Created page with "MongoDB is a database used to manage and create databases. = Issues = == MongoDB fails to start == When running the command ''sudo systemctl status mongod'' the MongoDB serve...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

MongoDB is a database used to manage and create databases.

Issues

MongoDB fails to start

When running the command sudo systemctl status mongod the MongoDB server will fail to start with the message (code=exited, status=62)

Solution Attempt to repair the MongoDB installation by running the command

sudo mongod --repair

If this command fails and it shows the error Data directory /data/db not found create the directory using this command:

sudo mkdir -p /data/db

Then restart mongodb:

sudo systemctl stop mongod sudo systemctl start mongod sudo systemctl status mongod