ERROR: child process failed, exited with error number 1

I am getting following error message while starting MongoDB. Can someone help me in this issue.  

[/home/admin]# mongod --dbpath=/var/lib/mongo --fork --logpath=/root/mongod.log
about to fork child process, waiting until server is ready for connections.
forked process: 1436
ERROR: child process failed, exited with error number 1

Posted by Andy on 2015-03-28 07:11:14.0

Try to run the same command without --fork, see the issue on the console. 

Posted by Navdeep on 2015-06-15 07:31:19.0

I have run mongod --dbpath=/var/lib/mongo --logpath=/root/mongod.log and following is the output for the same. Even you can see that I have tried to remove the /root/mongod.log but I got rm: cannot remove `/root/mongod.log': Read-only file system error message.

[[email protected]/home/analytics]# mongod --dbpath=/var/lib/mongo --logpath=/root/mongod.log
2015-06-15T16:25:36.775+0530 F CONTROL  Failed global initialization: FileRenameFailed Could not rename preexisting log file "/root/mongod.log" to "/root/mongod.log.2ppend or manually remove file: errno:30 Read-only file system

[[email protected]/home/admin]# rm -rf rm -rf /root/mongod.log
rm: cannot remove `/root/mongod.log': Read-only file system
[[email protected] ~]# mongod --dbpath=/var/lib/mongo --logpath=/root/mongod_1.log
2015-06-15T16:57:48.785+0530 F CONTROL  Failed global initialization: FileNotOpen Failed to open "/root/mongod_1.log"

Posted by Andy on 2015-06-15 07:33:42.0

Hi Andy,

Ideally, As it recommended by MongoDB that MongoDB server should not run as root user. that by we create a user and run the MongoDB with that user. (only in the case where we are not staring MongoDB server through services i.e. # service mongod start. Because service start MongoDB server with mongd user.). If someone by mistake start MongoDB manually with some user user then probably it cause these issue. 

But in your case, you are using root user, there sould not be any issue. your problem errno:30 Read-only file system. Seems like your Hard Disk Drive has been crashed. Please talk to you Hardware/Networking team and try to recover your hard-disk.

Good Luck !!


Posted by Navdeep on 2015-06-15 07:48:48.0