Starting mongod fork, ERROR: child process failed, exited with error number 1 Starting mongod fork, ERROR: child process failed, exited with error number 1 unix unix

Starting mongod fork, ERROR: child process failed, exited with error number 1


I had the same thing and it turned out to be a permissions issue. If the owner of the child process cannot access the log path or the log path does not exist, it will fail.

What I did was put the log directory in my home directory:

mkdir ~/logmongod --fork --logpath ~/log/mongodb.log

If you really want to put it in your /var/log directory, just change the permissions.


I also had the same error, however I used sudo it and ran sudo mongod --fork --logpath /var/log/mongodb.log. As @jryancanty mentioned, it's simply a permissions error.


For anyone else running into this error [even if you run it with sudo] make sure that you state the filename of the log file as in: /var/log/mongodb.log. I had just the directory path as in /var/log/ since I miss read the mongo docs.