Error reading config file: No such file or directory

Thanks . It worked.
I went ahead with next steps but get another error while doing below steps:
Create new data directory and try to launch mongod with a new port and dbpath, and also fork the process:
mkdir first_mongod
mongod --port 30000 --dbpath first_mongod --fork

The error is as below:
Please help.

Sorry for that i didn’t read the next step. It’s working till now. I will post another message when encounter any error.


Feel free to do so but I’d highly recommend that you re-watch the videos, do some research and use the mongod documentation before you post.

Hi ,

I encounter another error while doing the below step:
When you’re finished, run the following validation script in your vagrant and outside the mongo shell and enter the validation key you receive below. If you receive an error, it should give you some idea of what went wrong.
vagrant@m103:~$ validate_lab_launch_mongod

the error is as below:

Please help.

You have to read what the commands write to you.

In this case you got You need to specify db path /data/db. So please do that.

I did that in two different steps:
I tried with --dbpath as well as --logpath option but getting same error:

Second time:
When you told me to do that i did it but i was stuck in below error:

You did not.

Do you specify /data/db when you write –dbpath data? No. That why you get You need to specify db path /data/db.

You get unrecognised option '–dbpath’. You get that because you pass the option –dbpath to the mongo command. There are 2 commands mongod, the server, and mongo the shell. Please refer to the following links to see the differences.

One of the above links was already provided to you by 007_jb and it looks like you have not looked at it as I usually see a little counter next to a link that indicates how many time a link has been followed.

1 Like

Now, I tried what you said but still getting same error:

It appears that you’re not spending much time trying to decipher what’s wrong, and there’s also a knowledge gap in what has been taught in the lectures. Suggest that you re-watch the video again and pay closer attention.

1 Like

You type the same thing as before and you get the same error.

I will not post in this thread any further.

Hi Steevej-1495,
thanks for your help.
I went through video’s as well as documentation again and pass through that stage and got the validate code but i can’t enter it now.
Is there any way i can enter it in the lab as I pass through the end date which is march 03?


Deepak Rawat

Thanks to 007_jb as he was here first.

There is no way to enter code when date is passed.

Please let me know what to do next.
Should i wait for next scheduled date or move ahead? Even if i move ahead , this score will make me fail in entire course i.e. M103.
Please help and guide.


The best thing is to retake the course.

Thanks steevej-1495 for your help.

Hi Steevej-1495,
I am getting the error( chapter 1: lab Configuration File) as i have booted my VM just now and login to shell using vagrant ssh and then used below command:
mongod --config /shared/mongod.cfg
even i tried changing the switch to -f
mongod -f /shared/mongod.cfg

but same error. See screenshot below:
Please help.

It does not matter if you use --config or -f
Did you try without fork option as per message above?
It would have given the error why it is failing on your screen

or check mongod.log as suggested by Steeve in other post
Exited with error1 means most likely your dbpath dir is missing or wrong permissions or you are trying to start mongod on same port,dbpath while another instance is already running
Please review your config file and go step by step

Hi @Deepak_22705,

Please follow the instructions shared by @Ramachandra_37567 and @steevej-1495.