You need to bind the IP address to `127.0.0.1` or `localhost`

I get the above error when I use the command: validate_lab_launch_mongod in vagrant environment.
mongod is running and mongo is connected to it on port 27000. The m103-admin user has been created successfully.
Please advise.

The error message is a pretty good hint. Suggest watching the Configuration File lecture again.

Hi @Vimala_Devi_40248,

Please read the instructions mentioned in the Lab very carefully. The error message says that you have not binded the IPs.

If you need more help then please refer our documentation on how to use these options with the mongod command in the command line.

Hope it helps!

Thanks,
Shubham Ranjan
Curriculum Support Engineer

Hi Team,

i’m getting below error when i’m trying to create new connection

The most likely cause is that mongod is not running on the given host and port.

Hi @steevej-1495,

there is an error with connecting with server. it seems server(192.168.103.100) is not working

1 Like

That is why I wrote the previous message.

When mongod is not running on a given host and port, you must start it in order to be able to connect to it.

Thanks a tonne Shubham!! I was able to resolve the error by binding the IP’s using --bind_ip in the mongod command.

Hi @Naga_Venu_Babu_54836,

As @steevej-1495 mentioned, please make sure you have a mongod instance running on the port 27000 and you have binded the IPs.

If things are still not clear then I would recommend you to watch the Lecture: The Mongod again.

In addition to this, please refer our documentation for more information on how to use mongod with command line options.

Hope it helps!

Thanks,
Shubham Ranjan
Curriculum Support Engineer

Please note - that the link to ‘Lecture: The Mongod’ is not valid and does not work.

The current video of m103 The Mongod does not discuss binding IPs or any instruction on authentication - - but the quiz that immediately follows the video asks for these parameters to be included in the mongod launch… without instructions or examples on the syntax this has become difficult to get past.

1 Like

Hi @James_58604,

The Lecture: The Mongod shows how to use the command line options with mongod. Once you understand the basics then you can refer the documentation read more about the MongoDB server in the mongod documentation.

The documentation contains detailed explanation on each command line options including the ones which you are required to use in the Lab.

Hope it helps!

Thanks,
Shubham Ranjan
Curriculum Support Engineer

Hello Instructors.

So i am getting similar error as below.

vagrant@m103:~$ validate_lab_launch_mongod
You need to bind the IP address to 192.168.103.100.

I see following in the mongod.log :-

2019-12-10T00:29:57.224+0000 I CONTROL [initandlisten] options: { net: { bindIp: “localhost, 192.168.103.100”, port: 27000 }, processManagement: { fork: true }, storage: { dbPath: “/data/db” }, systemLog: { destination: “file”, path: “/data/log/mongod.log” } }
2019-12-10T00:29:57.224+0000 I - [initandlisten] Detected data files in /data/db created by the ‘wiredTiger’ storage engine, so setting the active storage engine to ‘wiredTiger’…

I have tried to run this several combinations like giving the 192 ip first than localhost, or even using just the ip’s… Yet same issue.

Can someone pls help me.

PS :- IMHO, i think this lab is mis-placed in the course and if it requires referenc eto configuration option, it should be place after the configuration section.

TIA,

Samir

NM

i tried it with below combination and now the validate recognizes and gives me the required info…

–bind_ip 192.168.103.100,localhost

Issue is i was trying it with below option when i was getting error…
–bind_ip “127.0.0.1, 192.168.103.100”

Also when i tried with no quotes around, it was erroring on fork part… below is the one i am talking of…
…–bind_ip 127.0.0.1, 192.168.103.100 --fork

about to fork child process, waiting until server is ready for connections.
forked process: 3580
ERROR: child process failed, exited with error number 1
To see additional information in this output, start without the “–fork” option.

Could you please supply the additional information you got

It was when I did this course, it seems to have been moved around… @James_58604 also confirmed the same. There’s a bit more explanation on some mongod options but all you actually need is the mongod documentation like @Shubham_Ranjan mentioned:

And from the look of things, @Samir_29862 has actually resolved the issue.

Hi @Samir_29862,

I’m glad you were able to figure it out. Please feel free to get back to us if you have any other questions.

Thanks,
Shubham Ranjan
Curriculum Support Engineer

Specifically about the first lab. The lecture covered the following options to start mongod; dbpath, port, fork, and logpath.

Continuing on immediately into the subsequent lab, the course appears to assume that classmates have been introduced to the parameter bind_ip already. I had to look it up, no issue there.

Just wondering if there’s a module missing, or if the intent was to introduce binding ips for the first time in the lab, and have us research for a solution.

In my instance of the course bind_ip was covered in Chapter 1 - Lecture Configuration File. This is the lecture just before the Lab Launching Mongod. In the video at around 2:23 the option bind_ip and just a little bit after the configuration file equivalent is also shown. In the lecture notes both appears. I hope they did not remove that part because it was helpful.

@steevej-1495, I agree, that lecture was helpful too and it was my first suggestion. They’ve not removed it but they’ve shuffled things around, so now the mongod lab comes before the config file lecture. Ideally the common mongod options should have been discussed in the mongod lecture.

Hi @Jon_67889,

The mongod command comes with a lot of command line options. We cannot cover all of them in the lectures but we want our learners to explore and learn about all these powerful mongod command line options.

We have also provided a link to the documentation in our lecture notes of Chapter 1: The Mongod video lecture.

Hope it helps!

Thanks,
Shubham Ranjan
Curriculum Support Engineer