MongoDB keeps failing on startup with exit code, status=100

mongodbubuntu-18.04

Everytime I start MongoDB, it runs for about 1 second before crashing with the following error:

Active: failed (Result: exit-code) since Thu 2020-03-12 09:47:17 EDT; 6s ago
Docs: https://docs.mongodb.org/manual
Process: 1931 ExecStart=/usr/bin/mongod –config /etc/mongod.conf (code=exited, status=100)
Main PID: 1931 (code=exited, status=100)
Mar 12 09:47:14 myServer systemd[1]: Started MongoDB Database Server.
Mar 12 09:47:17 myServer systemd[1]: mongod.service: Main process exited, code=exited, status=100/n/a
Mar 12 09:47:17 myServer systemd[1]: mongod.service: Failed with result 'exit-code'.

Also, in the logs file:

Cannot start server with an unknown storage engine: mmapv1

I've tried reinstalling MongoDB, giving the mongodb user ownership of /var/lib/mongodb, and removing the mongodb.lock file, to no avail.

Any suggestions?

Best Answer

I solved the issue by changing the storage engine to wiredTiger. I did this by editing /etc/mongod.conf and adding "engine: wiredTiger" after "journal: enabled: true"

Related Topic