I am facing a weird problem.
I am unable to start mongod using systemd but when I sudo mongodb and try to start the daemon it works fine. We have checked the permissions of all files, namely dbpath, pid and logs files, and they all belong to the user mongodb.
[root@cm-db-1 mongo]# systemctl status mongod.service
● mongod.service - High-performance, schema-free document-oriented database
Loaded: loaded (/usr/lib/systemd/system/mongod.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2018-12-05 21:41:11 UTC; 56s ago
Process: 6991 ExecStart=/usr/bin/mongod $OPTIONS run (code=exited, status=100)
Main PID: 24086 (code=exited, status=0/SUCCESS)
-bash-4.2$ /usr/bin/mongod --quiet -f /etc/mongod.conf run
about to fork child process, waiting until server is ready for connections.
forked process: 30878
child process started successfully, parent exiting