Mongodb wont start ERROR: child process failed, exited with error number 100

Mongodb: Actual error is “Insufficient free space for journal files“.

Before discussing about the error, I will give you a short information about Mongodb. Mongodb is a free and open source software for platform document-oriented database.

A document-oriented database is a computer program designed for storing, retrieving, and managing document-oriented information. It also known as semi-structured data.

Here I got this error after successfully completing the installation process of MongoDB on a VPS. And finally found a solution. I like to share the steps I did to fix this error.

After complete the installation successfully, the ‘Mongodb’ shows some error with its restart. The error details are pasted below:

Starting mongod: about to fork child process, waiting until server is ready for connections.
ERROR: child process failed, exited with error number 100

Example:

[root@server ]# service mongod restart
Stopping mongod: [FAILED]
Starting mongod: about to fork child process, waiting until server is ready for connections.
forked process: 15602
all output going to: /var/log/mongo/mongod.log
ERROR: child process failed, exited with error number 100
[FAILED]
[root@server ]#

Log file details

[root@server ]# tailf /var/log/mongo/mongod.log
"ERROR: Insufficient free space for journal files"

Solution

Ist Step: At first, you need to run the follwing command before editing the configuration file(/etc/mongod.conf).

[root@server ]# mongod --smallfiles

IIInd Step: Change/Add/uncomment the value for the directive ‘nojournal’ in the configuration file(/etc/mongod.conf) to true

vi /etc/mongod.conf
-----
nojournal = true
-----

IIIrd Step: Save and restart the service:

[root@server ]# service mongod restart

That’s all.

 

Some interesting topics on Mongo

Dump Mongo DB and move it to an S3 bucket.

  • This includes the steps to dump Mongo DB.
  • AWS cli command to move to S3 bucket.
  • A simple bash script for automation purpose.

Dump Mongo DB collections and move it to an S3 bucket.

  • This includes the steps to dump Mongo DB collections.
  • AWS cli command to move to S3 bucket.
  • A simple bash script for automation purpose.

 

Post navigation

Arunlal A

Senior System Developer at Zeta. Linux lover. Traveller. Let's connect! Whether you're a seasoned DevOps pro or just starting your journey, I'm always eager to engage with like-minded individuals. Follow my blog for regular updates, connect on social media, and let's embark on this DevOps adventure together! Happy coding and deploying!

10 thoughts on “Mongodb wont start ERROR: child process failed, exited with error number 100

      1. Hi Arun Lal,

        We have faced the problem like(Starting mongod: about to fork child process, waiting until server is ready for connections.
        forked process),so we are followed the step 1 and step 2 like that ,but did not working this command ,so please help me ?

        Thanks
        senthilkumaran

          1. Hi,

            We are facing error follwoing this,

            Mon Aug 18 10:36:46.976 [initandlisten] MongoDB starting : pid=3547 port=27017 dbpath=/var/lib/mongo 32-bit host=srv01.nayasoft.local
            Mon Aug 18 10:36:46.976 [initandlisten]
            Mon Aug 18 10:36:46.976 [initandlisten] ** NOTE: This is a 32 bit MongoDB binary.
            Mon Aug 18 10:36:46.976 [initandlisten] ** 32 bit builds are limited to less than 2GB of data (or less with –journal).
            Mon Aug 18 10:36:46.976 [initandlisten] ** Note that journaling defaults to off for 32 bit and is currently off.
            Mon Aug 18 10:36:46.976 [initandlisten] ** See http://dochub.mongodb.org/core/32bit
            Mon Aug 18 10:36:46.976 [initandlisten]
            Mon Aug 18 10:36:46.976 [initandlisten] db version v2.4.9
            Mon Aug 18 10:36:46.976 [initandlisten] git version: 52fe0d21959e32a5bdbecdc62057db386e4e029c
            Mon Aug 18 10:36:46.976 [initandlisten] build info: Linux bs-linux32.10gen.cc 2.6.21.7-2.fc8xen #1 SMP Fri Feb 15 12:39:36 EST 2008 i686 BOOST_LIB_VERSION=1_49
            Mon Aug 18 10:36:46.976 [initandlisten] allocator: system
            Mon Aug 18 10:36:46.976 [initandlisten] options: { config: “/etc/mongod.conf”, dbpath: “/var/lib/mongo”, fork: “true”, logappend: “true”, logpath: “/var/log/mongo/mongod.log”, nojournal: “true”, pidfilepath: “/var/run/mongodb/mongod.pid” }

            thanks
            senthilkumaran

  1. hello sir,
    we are facing the errors on setting the replica set to the local server

    rsconf
    {
    “_id” : “rs0”,
    “members” : [
    {
    “_id” : 0,
    “host” : “system10:27017”
    }
    ]
    }
    > rs.initiate(rsconf)
    { “ok” : 0, “errmsg” : “server is not running with –replSet” }
    >

  2. Im getting same error in windows please i need that tutorial for widows user , if someone can help please comment

Leave a Reply

Your email address will not be published. Required fields are marked *