install mongoDB (child process failed, exited with error number 100) install mongoDB (child process failed, exited with error number 100) mongodb mongodb

install mongoDB (child process failed, exited with error number 100)


The data folders you created were very likely created with sudo, yes? They are owned by root and are not writable by your normal user. If you are the only user of your macbook, then change the ownership of the directories to you:

sudo chown juneyoungoh /datasudo chown juneyoungoh /data/dbsudo chown juneyoungoh /data/log

If you plan on installing this on a public machine or somewhere legit, then read more about mongo security practices elsewhere. I'll just get you running on your macbook.


I had a similar issue and it was not related to any 'sudo' problem. I was trying to recover from a kernel panic!

When I look at my data folder I found out a mongod.lock file was there. In my case this page helped a lot: http://docs.mongodb.org/manual/tutorial/recover-data-following-unexpected-shutdown/. As they explain,

if the mongod.lock is not a zero-byte file, then mongod will refuse to start.

I tested this solution in my environment and it works perfectly:

  1. Remove mongod.lock file.
  2. Repair the database: mongod --dbpath /your/db/path --repair
  3. Run mongod: mongod --dbpath /your/db/path


There was the same problem on my machine. In the log file was:

Mon Jul 29 09:57:13.689 [initandlisten] ERROR: Insufficient free space for journal file
Mon Jul 29 09:57:13.689 [initandlisten] Please make at least 3379MB available in /var/mongoexp/rs2/journal or use --smallfiles

It was solved by using mongod --smallfiles. Or if you start mongod with --config option than in a configuration file disable write-ahead journaling by nojournal=true (remove the beginning #). Some more disk space would also solve the above problem.