YAML File - illegal map value

i have attached my config file.
not sure why “illegal map value” error appears.

where as i can start mongod process with command line

can anyone help finding out issue.

Regards
Nehal

What is the name of the illegal map value?

Show the exact error message?

attached is error message screen

Make sure you have space after dbpath:
and
remove extra space between bindIP & colon
Please check other parameters too

2 Likes

The error message tells you that the value at line 3 is wrong.

You entered "file" with quotes.

If you look at the documentation for systemLog.destination at https://docs.mongodb.com/manual/reference/configuration-options/#systemlog-options you will see the value should be file or syslog. I would think that file with quotes should be fine. I would try 2 things. 1. like Ramachandra_37567 may be the space before the colon is wrong. 2. if 1 fails, try removing the quotes.

2 Likes

For all the options, fix the following:

  1. Remove any space before colon
  2. Add one space after colon
  3. fork is true (<boolean>) not “enabled” (<string>)
  4. Suggestion: look into the logAppend option

Lastly, be consistent.

NB: The quotes enclosing “file” should be fine because it’s a <string>. I put quotes around file sometimes.

1 Like

Hi @Nehal_89837,

As others have mentioned, there are quite a few errors in your config file. Please make the changes suggested by others. Let us know if the issue still persists.

~ Shubham