Error parsing YAML config:

Colleagues,
Prompt in this connection there is such mistake when using mongod - f “/etc/mongod.conf”:

Error parsing YAML config: duplicate key: security.authorization(canonical key: security.authorization)

How to bypass it?
Big thanks

storage:
dbPath: “/data/db”
net:
bindIp : “127.0.0.1, 192.168.0.10”
port: “27000”
security:
authorization: “enabled”

You don’t bypass it, you fix the YAML file :slight_smile:

Apparently the “security.authorization” entry was made a second time inside the same file.

Mind you: why are you using “/etc/mongod.conf”?! I don’t recall the instructions telling you to do this. To be honest, you’ll be running six MongoD processes as well as a MongoS by the end of M103 and each will need its own config file. You’re better off making these config files in /home/vagrant and naming them uniquely (perhaps after the port they use :wink: ).

Thanks
Corrected a way to the file, but now it is not used settings which in it I wrote
It is connected to port by default instead of that which is specified in the file
At the same time he writes that the file uses
2018-11-17T18:44:51.419+0000 I CONTROL [initandlisten] options: { config: “27000.conf” }

file:
storage:
dbPath: “/data/db”
net:
bindIp : “127.0.0.1, 192.168.0.10”
port: “27000”

Prompt please

Right, it’s a bit of an odd situation. Could you please do the following to help us figure out what’s going on?

  1. Post the YAML configuration file that you edited/created in its entirety.
  2. Post both your MongoD command, it’s full list of parameters and the output it gives you.

When pasting those materials, please paste them inside a “code block”. That makes things a lot more readable. To do so, first click the button on the reply box that looks like </>. Then paste the text inbetween the markers. For example:

This is a codeblock