Chapter 01 Lab 2 : Configuration file Error

configuration file:

net:
bindIp:localhost
port:27000
security:
authentication:enabled

The command I am executing -

mongod --config mongod.conf

Error I got -

Unrecognized option: net

What’s wrong??

I tried this configuration file

storage:
dbPath: “/data/db”
replication:
replSetName: M103
net:
port: 27000
security:
authorization: enabled

after creating the user using the command given in the lab I did run test

It shows,
3 total, 1 passed, 0 skipped:
[PASS] “The server is running on localhost: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”

Can anyone help me with this?

Hi @Junaid_Shaikh,

Kindly post the screenshot that shows how you did the above?

~ Kushagra

1 Like

Hello Kushagra, I figured it out. Thank you.

Hi @Junaid_Shaikh,

We are glad to hear that. :sparkles:
Wishing you Good Luck with the rest of the course.

In case of any queries/doubts, please feel free to reach out.

Regards,
Kushagra