Error validate lab configuration file

Hello everyone, I have problems executing the command “validate_lab_configuration_file” I get the following message and I don’t know how to make it work.

Welcome @Freddy_41032

I don’t think I can put it any better than the error message. The Configuration File lecture explains this way of starting up mongod.

hi @007_jb
I wanted to clarify that this corresponds to This corresponds to “Lab-Configuration-file” and that previously I had already executed the following instruction in my cmd


Could you tell me what I could have done wrong

My configuration file is as follows

Your config file needs to specify only the options related to this requirement:

Any other unrelated option should be deleted. And although the log part wasn’t specified, leave it in (i.e. leave the systemLog section).

You also need to figure out how to satisfy the 4th requirement. Here’s the full reference for config file options.

By the way, let me see the output of the following Linux command:
ps -ef | grep [m]ongo

1 Like

Thank for your reply
The output for this command “ps -ef | grep [m]ongo” is:

Ok. What that command does is show you what processes containing the word “mongo” are running. It was mentioned in one of lectures so keep it handy.

You need to login to that running server and shut it down:

# login
mongo --port 27000

#switch to the admin db and shut down the server
use admin

Then, carry on with what I mentioned in my last post.

Hi @Freddy_41032,

The configuration file which you have shared is present in one of our Lecture notes and clearly this is not what you are expected to use in the Lab - Configuration-file.

I will recommend you to watch the Lecture: Configuration File again and understand the basics of it.

Please refer our documentation on how to specify the required options in your configuration file.

Hope it helps!

If you have any other query then please feel free to get back to us.

Happy Learning :slight_smile:

Shubham Ranjan
Curriculum Support Engineer

I could already connect but when executing the command again it shows me the following message
“Client experienced a timeout when connecting to the database - check that mongod is running on the correct port, and that your user was created with the correct settings.”

Is there something I am doing wrong?

Let me see the output of:
ps -ef | grep [m]ongo

And also show us how you’re connecting.

Hi @007_jb:

It shows me the following result

And I am connecting as follows:

mongo --port 27000 -u ‘m103-admin’ -p ‘m103-pass’

Does your config file specify the right option to enable authentication?

You created the user in the wrong test database. It needs to be created on the admin database, so remember to switch to the admin db before you create the user.

Unfortunately, you’ll need to shutdown the server again, delete and recreate the data directory and restart mongod. Then connect to it and create the user the right way. :+1:

PS: Reminder again, your config file must meet all requirements.

The fourth requirement I put it this way at the end of my config.conf file


I will do the steps you indicated.

Thank you

:cowboy_hat_face: :+1:

Thanks for the help provided
The user if it was created within the admin database.
What I did in the end was to stop the mongod server and restart it.
Then I connected as follows:
mongo --port 27000 -u ‘m103-admin’ -p ‘m103-pass’

I finally opened another cmd and executed the command:
and showed me the key that was needed.

Thanks for the help @007_jb and @Shubham_Ranjan
Best regards

Glad to hear @Freddy_41032

One more thing. Did you actually use exactly this or did you add an additional option or parameter you to this? Can you share a screenshot of the command and the output?

Of course I share my screen


Cheers @Freddy_41032. Don’t worry, I was thinking about a different problem.
Everything is good! :slight_smile:

Hii @Freddy_41032,

I’m glad your issue got resolved. Please feel free to get back to us if you have any other questions.

Happy Learning :slight_smile:

Shubham Ranjan
Curriculum Support Engineer