Can't run the config file in Vagrant

Error reading config file: no such directory or file.
Can’t find the place to save the config file according to this.

In lab of Configuration File.

are you trying to load any script file?

No I’m just trying to run the config file as required in the lab.

I don’t recall seing any lab asking to run a config file. Labs ask to run mongod with a config file as a parameter. What is the command you are running?

mongod --config
mongod -f

Well, you need to tell it which config file to load silly :slight_smile: just give it the full path to the file.

Hi Chetna_Khapre,

Adding to @Tess_Sluijter’s reply, one example would be:

 $ mongod -f /home/vagrant/example_config.conf

Where example_config.conf is mongod configuration file.




That simply means you need to create the config file in the directory you are mentioning or you need to give the path of where you have your config file present.


1 Like