Lab: Logging to a Different Facility what problem with ide

Hi there,
I have conf file
dbPath: /var/mongodb/logs/mongod.log
path: /var/mongodb/logs/mongod.log
destination: “file”
logAppend: true
bindIp: localhost
port: 27000
authorization: enabled
fork : true
slowOpThresholdMs: 50

I run command: mongod --logpath /var/mongodb/logs/mongod.log
mongod -f mongod.conf
about to fork child process, waiting until server is ready for connections.
forked process: 410
ERROR: child process failed, exited with error number 100
To see additional information in this output, start without the “–fork” option.
I have same problem in some lab, how to resolve that :frowning:

Please check your config file
dbpath and logpath cannot be same and we don’t specify any *.log for dbpath

1 Like

Did you start 2 mongod? You are supposed to start only 1 and you are supposed to use the configuration. The first one does not use the configuration file.

1 Like

Hi @Thuong_38265,

This :point_down:

and this :point_down:

If you want to read more about what are the use of some of the options that you have specified in your configuration file then please refer our documentation on Configuration file options.

If you have any other doubts then please feel free to ask.

~ Shubham

thank every body

Hi @Thuong_38265,

Let us know me know if your issue is resolved then I can close this thread.

~ Shubham

Hi, @Shubham_Ranjan
I am facing same issue but my config file is like this :
storage: dbPath: /var/mongodb/db systemLog: destination: file path: "/var/mongodb/logs/mongod.log" net: bindIp: localhost port: 27000 security: keyFile: "/data/keyfile" processManagement: fork: true
After this in terminal the first command that I used was :
mongod --dbpath /var/mongodb/db --fork --logpath /var/mongodb/logs/mongod.log

And it shown me : child process started successfully, parent exiting

After that I created a new user :
mongo admin --host localhost:27000 --eval ’
user: “m103-admin”,
pwd: “m103-pass”,
roles: [
{role: “root”, db: “admin”}

but it is not working and this time I don’t what the reason is ?
Please let me know where I am going work or missing a command.

Hi @Mitchell_Anthony,

As I can see your config file doesn’t contain all the essentials.

  authorization: enabled

  path: /var/mongodb/logs/mongod.log
  destination: "file"
  logAppend: true

and there is no logAppend in your config file.

Hope it helps…!


This is not how you start mongod with a configuration file. Revise lesson Lecture: Configuration File from Chapter 1.

It does not work because you are not using the configuration to start mongod, so mongod is not listening to port 27000.

1 Like

Yes, Thanks @Kushagra_Kesav it works.

1 Like

Yes, @steevej I realized that this command is not required.
I misinterpreted the reference document.

1 Like