ERROR: child process failed, exited with error number 100

2,782 views
Skip to first unread message

ryanmor...@gmail.com

unread,
May 14, 2018, 7:02:30 PM5/14/18
to mongodb-user
Hey everyone, been working on this for days now and still can't solve it.

I'm working to set up a Docker instance of MongoDB.  I have a Dockerfile that works except for one nagging error.

I have a custom config file that I am attempting to use (rather than the default one via installation).  

At the end of my Dockerfile, the below command works:

CMD ["/usr/bin/mongod"]

However, obviously, it does not use the custom configuration file.  If I attempt to modify the command then the container exits.

CMD ["/usr/bin/mongod","run","--config","/data/db/mongod.conf"]

There is nothing being written to mongod.log or anything like that.

If I log in and run mongod everything starts up fine.  If I log in and run mongod --config /data/db/mongod.conf I receive the following:

about to fork child process, waiting until server is ready for connections.
forked process:  42
ERROR:  child process failed, exited with error number 100
To see additional information in this output, start without the "--fork" option.

If I remove the --fork option, it won't even execute.

Can anyone point me in right direction?

Thanks

Tiago Brito

unread,
May 20, 2018, 11:11:48 AM5/20/18
to mongodb-user
Hi 

Did you ever fix this?

1) Why do you have "run" inside your CMD command? Why not just CMD ["/usr/bin/mongod","--config","/data/db/mongod.conf"] ?

2) Can you show your config file here? Maybe that can help figure out what the issue is.

3) The reason it is telling you to remove the --fork option is to see the error in the standard output. Whatever that error is, you should be able to see it in the log file with the --fork option enabled. What does your logfile show after you run that command?

Cheers.
Tiago
Reply all
Reply to author
Forward
0 new messages