Config File: End of map error at last line

Hello,

I am getting the following error

vagrant@m103:~$ mongod -f /shared/mongod.cfg

Error parsing YAML config file: yaml-cpp: error at line 15, column 1: end of map not found
try ‘mongod --help’ for more information

I have tried a lot of modifications in the config file
still can’t figured the problem

please help

What parameter is at line 15?
Could be indentation problem
space or invalid character
Don’t use tab,use space bar to create spaces

Ok so I have solved this mapping problem

And now it is giving a new error:

Aborted (core dumped)

I have tried with and without fork option
and in both case it is not running

It would have given you some error in mongod.log file with --fork option and error on your terminal without --fork option

aborted-core dump is mostly due to missing dirs,permissions or unable to create logfile
Does your dbapth,logpath dirs exist with required permissions?

With --fork option

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

And without __fork option

vagrant@m103:~$ mongod -f /shared/mongod.cfg
Aborted (core dumped)

Did it create mongod.log in 1st case?
If yes what does it show
You did not reply if dirs exist with required permissions
And on what port you are trying to bring up?
If you already have another instance running on the same port you cannot bring up one more mongod on same port

  1. no it did not create .log file with --fork option
  2. please tell me something more about dir permissions. I may have a problem with this.
  3. I am running it on port 27000.

Well it did say " Another mongod instance is already running on the /data/db/ directory". but I dont know how. Also this error came up when I removed the log path in config file
only after that it tried to run

It did not create logfile as permissions may be missing
Another instance is running because you would brought it up in previous lab/exercise with command line
Now you are trying to bringup mongod with configfile with same port.So it won’t work

Regarding dir permissions please go thru your lessons
Whatever dirs you define in your config file the vagrant id should be able to read/write.Else mongod will fail to start
Please review your steps and try again
Kill your earlier running mongods on same port
ps -ef|grep mongo
kill PID where PID is process id of mongod instance

Thank you very much Sir,

Finally got it.
I had to kill previous instance to run this.

Closing this thread as the issue has been resolved.