title: mongo: ERROR: child process failed, exited with error number 100
body: <p>I successfully created a replica set of three instances on mongodb. Each member of the replica set is instantiated using a config file. When I tested it, everything went well, and executed successfully without any errors. </p>
  
  <p>The next step, which is generating the error in the title is to Enable Internal Authentication. In order to do that, I followed the mongo documentation found in this page: </p>
  
  <p>[a] <a href="https://docs.mongodb.com/v3.0/tutorial/enable-internal-authentication/" rel="nofollow">https://docs.mongodb.com/v3.0/tutorial/enable-internal-authentication/</a></p>
  
  <p>First, I generated a keyfile using the two lines of code below</p>
  
  <pre><code>openssl rand -base64 755 &gt; &lt;path-to-keyfile&gt;
  chmod 400 &lt;path-to-keyfile&gt; 
  </code></pre>
  
  <p>I couldn't exeucte the lines without being root so I did it using root.</p>
  
  <p>then I added the keyfile inside the instance's config file. </p>
  
  <pre><code># Where and how to store data.
  storage:
    dbPath: /mon/data1/
  journal:
    enabled: true
  #engine:
  #mmapv1:
  #wiredTiger:
  
  #where to write logging data.
  systemLog:
    destination: file
    logAppend: true
    path: /var/log/mongodb/mongod1.log
  
  #network interfaces
  net:
    port: 27018
    bindIp: 127.0.0.1
  
  processManagement:
    fork: true
  
  security:
    keyFile: /etc/keyFiles
  
  replication:
    replSetName: "myRepl"
  </code></pre>
  
  <p>Now in order to start mongo again, I wrote the following command, which I use everytime</p>
  
  <pre><code>sudo mongod --config /etc/mongod1.config
  </code></pre>
  
  <p>and I got the error above. I made sure that everything was owned by root. the dbpath, the config file, and the keyfile. </p>
  
  <p>Then, I switched everything to be owned by a regular user and I tried to start mongod as a regular user (without sudo). I received the same error.</p>
  
  <p>What do you think is the solution?</p>