Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why am I getting a parser error on my YAML config in MongoDB --Install

Tags:

mongodb

I am trying to install the service for Mongodb. I am typing the following command in the cmd window, as administrator

c:/mongodb/bin/mongod.exe --config "C:\mongodb\mongod.cfg" --install, 

but I am getting the following error:

Error parsing YAML config file: YAML-cpp: error at line 2, column 13 : illegal map value

Here is the config file contents:

systemLog:
    destination: file
    path: c:\data\log\mongod.log
storage:
    dbPath: c:\data\db
like image 665
Paul T. Rykiel Avatar asked May 20 '16 17:05

Paul T. Rykiel


1 Answers

Well, Note that YAML doesn't really satisfy with tabs, then, use space instead before destination and storage. Don't forget to add a space after every ":" even in the lines systemLog and storage Finally, use quotes to enclose your pathes and double backslashes in these pathes.

Try then with :

systemLog:
 destination: file
 path: "c:\\data\\log\\mongod.log"
storage:
 dbPath: "c:\\data\\db"
like image 123
Jean-Luc Aubert Avatar answered Oct 19 '22 18:10

Jean-Luc Aubert