Mongod starts failed after server was shut down

5,740 views
Skip to first unread message

KP Tourism

unread,
Jul 19, 2019, 5:22:59 AM7/19/19
to mongodb-user
Hi there,
My mongodb server was suddenly down and now when I run command "sudo service mongod start" it gives me error. The error log is "
Job for mongod.service failed because the control process exited with error code. See "systemctl status mongod.service" and "journalctl -xe" for details

". When issue the command "systemctl status mongod.service" then it gives me the following error. Error:  Redirecting to /bin/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.

[root@localhost /]# systemctl status mongod.service
mongod.service - MongoDB Database Server
   
Loaded: loaded (/usr/lib/systemd/system/mongod.service; enabled; vendor preset: disabled)
   
Active: failed (Result: exit-code) since Fri 2019-07-19 20:59:31 PKT; 1min 34s ago
     
Docs: https://docs.mongodb.org/manual
 
Process: 3496 ExecStart=/usr/bin/mongod $OPTIONS (code=exited, status=100)
 
Process: 3493 ExecStartPre=/usr/bin/chmod 0755 /var/run/mongodb (code=exited, status=0/SUCCESS)
 
Process: 3490 ExecStartPre=/usr/bin/chown mongod:mongod /var/run/mongodb (code=exited, status=0/SUCCESS)
 
Process: 3488 ExecStartPre=/usr/bin/mkdir -p /var/run/mongodb (code=exited, status=0/SUCCESS)


Jul 19 20:59:31 localhost.localdomain systemd[1]: Starting MongoDB Database Server...
Jul 19 20:59:31 localhost.localdomain mongod[3496]: about to fork child process, waiting until server is ready for connections.
Jul 19 20:59:31 localhost.localdomain mongod[3496]: forked process: 3499
Jul 19 20:59:31 localhost.localdomain mongod[3496]: ERROR: child process failed, exited with error number 100
Jul 19 20:59:31 localhost.localdomain mongod[3496]: To see additional information in this output, start without the "--fork" option.
Jul 19 20:59:31 localhost.localdomain systemd[1]: mongod.service: control process exited, code=exited status=100
Jul 19 20:59:31 localhost.localdomain systemd[1]: Failed to start MongoDB Database Server.
Jul 19 20:59:31 localhost.localdomain systemd[1]: Unit mongod.service entered failed state.
Jul 19 20:59:31 localhost.localdomain systemd[1]: mongod.service failed.


Any help please. Thanks in advance!

John Clark

unread,
Jul 20, 2019, 1:21:32 PM7/20/19
to mongodb-user
Have a look at the mongodb.log (tail) which by default would be in /var/log/mongogdb/mongodb.log or similar.  You may have a permissions error or possibly the /tmp.mongo.lock should be deleted.  As I understand, this file may still be there after a server failure i.e. where mongo did not come down cleanly.  You should be able to delete it and try to start again.

Regards

John
Reply all
Reply to author
Forward
0 new messages