[FAIL] "The server requires authentication"

Hi Team,

Launch a mongod instance in the IDE terminal with a configuration file:

1. Write the configuration file. There should be an empty configuration file in your IDE File Editor, where you can specify options in YAML.As a reminder, here are the requirements of your mongod instance:
** * run on port 27000**
** * authentication is enabled**

when i am doing lab test , im getting the following error.I have given mongod --port 27000 --auth in mongod.conf file.Am i missing something here in understanding the IDE terminal or the process to follow .Please help

3 total, 0 passed, 0 skipped:
[FAIL] “The server is running on localhost:27000”

Did you launch mongod on port 27000?

[FAIL] “The server requires authentication”

Don’t forget to launch mongod with authentication enabled!
You can do this using the configuration file.

[FAIL] “Mongod was started with a configuration file”

Did you launch mongod using a configuration file?


This question is related to MongoDB University course M103.

It is preferable to ask MongoDB University related question to the university specific forum.

Please post a screenshot of the issue. Most likely you did like few others and entered the mongod command in the file editor part of the IDE. Please revise the IDE presentation lesson to understand the different part of the IDE.

Hi Could you please provide me the link for university specific forum
Thank you



1 Like

That is not the correct syntax of mongod.conf file.
You must provide options in YAML format, eg.

 port : 27000
 authorization : enabled

You can refer to https://docs.mongodb.com/manual/reference/configuration-options/

And YAML is very sensible to indentation. That is why that you should enclosed your YAML, code, or JSON document between 2 lines of triple back ticks (```) to ensure that the formatting is preserved such as:

    port : 27000
    authorization : enabled
1 Like

Thanks, i didn’t know how to indent.