0
votes

When i tape this command to show the status of mongodb

sudo service mongod status

i have this error output

● mongod.service - High-performance, schema-free document-oriented database

Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Thu 2017-07-06 12:57:03 CEST; 3min 52s ago Docs: https://docs.mongodb.org/manual Process: 6233 ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf (code=exited, status=100) Main PID: 6233 (code=exited, status=100)

Jul 06 12:57:03 ns3067256.ip-94-23-35.eu systemd[1]: Started High-performance, schema-free document-oriented database. Jul 06 12:57:03 ns3067256.ip-94-23-35.eu mongod[6233]: 2017-07-06T12:57:03.090+0200 I CONTROL [main] WARNING: Cannot detect if NUMA interleaving is enabled. Failed to pr Jul 06 12:57:03 ns3067256.ip-94-23-35.eu systemd[1]: mongod.service: Main process exited, code=exited, status=100/n/a Jul 06 12:57:03 ns3067256.ip-94-23-35.eu systemd[1]: mongod.service: Unit entered failed state. Jul 06 12:57:03 ns3067256.ip-94-23-35.eu systemd[1]: mongod.service: Failed with result 'exit-code'.

so what is the solution !?

1

1 Answers

0
votes

Go to /etc/mongod.conf and look for dbPath: /xyz/xyz

Use the following command to provide the rights to mongodb

sudo chown -R mongodb:mongodb /xyz/xyz