Error in node1.conf not successful

vagrant@m103:~$ mongod -f node1.conf
about to fork child process, waiting until server is ready for connections.
forked process: 2623
ERROR: child process failed, exited with error number 100
To see additional information in this output, start without the “–fork” option.

What to do?

Help me
Thank you.

This is also error.

vagrant@m103:~/mongodb$ sudo mkdir -p /var/mongodb/pki/
vagrant@m103:~/mongodb$ sudo chown vagrant:vagrant /var/mongodb/pki/
vagrant@m103:~/mongodb$ openssl rand -base64 741 > /var/mongodb/pki/m103-keyfile
-bash: /var/mongodb/pki/m103-keyfile: Permission denied

Your first question: any and all error messages can be found in the Mongo log file that you configured in the configuration file. So, go ahead and check the error log :slight_smile:

This one is down to basic Linux-experience. The output redirection fails, because redirection (">") uses your own account’s permissions. So it will work if you do:

openssl rand -base64 741 > /tmp/m103-keyfile
sudo mv /tmp/m103-keyfile /var/mongodb/pki/
sudo chown -R vagrant:vagrant /var/mongodb/pki/

Using sudo on your original command would not help, because sudo only applies to the command and not to redirection.

1 Like