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

After changing the mongod.config file for lab, I ran “validate_lab_configuration_file”, but I am getting this back "You need to bind the IP address to 127.0.0.1 or localhost" …why? is it an error?

Here is my config file:

mongod.conf

for documentation of all options, see:

http://docs.mongodb.org/manual/reference/configuration-options/

Where and how to store data.

storage:
dbPath: “/data/db”
journal:
enabled: true

engine:

mmapv1:

wiredTiger:

where to write logging data.

systemLog:
destination: file
logAppend: true
path: “/data/log.mongod.log”

network interfaces

net:
port: 27000
bindIp : “192.168.103.100, 127.0.0.1”

how the process runs

processManagement:
fork : true

#security:

#operationProfiling:

#replication:

#sharding:

Enterprise-Only Options:

#auditLog:

#snmp:

security:
authorization: enabled

~

Same error as many others. Try to consult previous thread before starting a new one.

The problem is: space between the 2 addresses for bindIp:

1 Like

got you…yes, that is the problem and it is fixed!

In that case there is an error in the example in Chapter 1: The Mongod - Lecture: Configuration File. It has a space between the IP’s after the comma.

eg: bindIp : “127.0.0.1, 192.168.0.10”

So in reality this should be:

bindIp : “127.0.0.1,192.168.0.10”

Any chance that it will be corrected for future reference?

2 Likes

Hi Sandor_34399,

Thanks for the note. We will soon update the lecture notes.

Kanika

1 Like

Thank you @Kanika

Actually, the video still contains the space character. I’m not that a C&P guy, but type the commands by myself, to absorb them better. I actually should have taken a look in the descriptions below the video. But now, it took me an hour of fiddeling and searching before I found this thread.

Please update the video “M103 Lecture: Configuration File” or at least make a good visibility hint, to prevent future students from that pit trap.

Hi @Nico_75327,

I can understand your frustration :pensive:

However, sometimes even after having space between Bind IPs, mongod process starts using configuration file.

I will definitely check if using space causes an issue and update the lecture notes accordingly.

Please let me know, if you have any questions.

Thanks,
Sonali

1 Like

Everything’s fine. Such things happen and my only motivation to give you that feedback, is to help improving your courses, which are already pretty damn good.

1 Like