Getting error on mongod process

vagrant@m103:~$ mongod --port 27000 --dbpath /data/db --logpath /data/log/mongod.log --fork --replSet “M103” --keyFile /data/keyfile --bind_ip “,” --sslMode requireSSL --sslCAFile “/etc/ssl/SSLCA.pem” --sslPEMKeyFile “/etc/ssl/ssl.pem”
about to fork child process, waiting until server is ready for connections.
forked process: 4111
ERROR: child process failed, exited with error number 1
To see additional information in this output, start without the “–fork” option.

Please tell me why i’m getting this error

Hi Gunasekaran_94357,

Which Lab you are working on? I mean its strange to see --sslMode requireSSL --sslCAFile “/etc/ssl/SSLCA.pem” --sslPEMKeyFile “/etc/ssl/ssl.pem” options here,

And also, as suggested by the error message, please run the command without --fork option. You will see detailed explanation.

Also, make sure you don’t have mongod running on 27000 port.

 killall mongod


1 Like

Its working
Thank you

What is not working? mongo, mongod, validate* scripts …

Like @Kanika wrote, none of the labs in M103 requires any of the SSL options. Restart mongod without these options.

1 Like

I have removed ssl related options. if i try to shutdown the mongod that process is not runing its saying Eventhough i’m getting the same error.

Lets go step by step. Please follow the steps:

  1. You need a directory where the data files and log files will be stored. So, create a directory(any directory) like repl_dir/1, or create any and use it here

    vagrant@m103:~$ mkdir -p repl_dir/1
  2. You need to have the following options: dbPath, port, logPath, replSet name, bind_ip. Copy/Paste this command in your terminal:

    mongod --port 27000 --dbpath repl_dir/1 --logpath repl_dir/1/mongod.log --replSet “M103”--bind_ip “,” 

Let me know what is the output.



Thank you so much i have tried below command but still its saying connecting only please tell me what is the issue

vagrant@m103:~ mongod --port 27000 --dbpath /data/db --logpath /data/log/mongod.log --bind_ip "," vagrant@m103:~ mongo --port 27000
MongoDB shell version v3.6.9
connecting to: mongodb://

Hi Gunasekaran_94357m

It means it worked! :slight_smile: You will be able to see the Mongo Shell now.

Now, you can use --fork option with it and you can use the same command line.



Thank you for your support. but time is not there :slight_smile: only 42 minutes Even though i got to know what to do Once againg thank you

I also notice that there is a space between the 2 addresses of the --bind_ip command line option.

1 Like

Now where to use --fork option still its saying connection only

If there is no time, I would say open one Tab and run mongod and then open another tab, vagrant ssh and run validation command.

And yes, if there is space between 2 IPs in mongod, then stop it, remove the whitespace and then run mongod.

     mongod --port 27000 --dbpath /data/db --logpath /data/log/mongod.log --bind_ip ","


1 Like

I have removed that space

1 Like


You have to create a user also. Run the following command while mongod is running:

mongo admin --host localhost:27000 --eval '
user: "m103-admin",
pwd: "m103-pass",
roles: [
  {role: "root", db: "admin"}


1 Like