Below steps i performed in mongodb server
- stopped mongod.service
- changed mongodb db path from one directory to another directory
- changed mongodb log path from one directory to another directory
- changed the mongod.pid file from one directory to another directory
- modified the variable in /etc/mongod.conf
- changed the content of mongod.service and point to correct PID File
now when i tried to start mongod.service , below error appears
[mongod@ghsazevdcmsdcb1 ~]$ sudo systemctl start mongod.service
Job for mongod.service failed because the control process exited with error code. See "systemctl status mongod.service" and "journalctl -xe" for details
although i managed to start mongod via below command
mongod --config=/etc/mongod.conf
please help, how to fix mongod.service. Am i missing anything obvious?