bindIp Problem for lab "Launching Mongod"

I launch mongod using a config file:

vagrant@m103:~$ mongod --config chapter1.conf
about to fork child process, waiting until server is ready for connections.
forked process: 2093
child process started successfully, parent exiting

My config file looks like this:

vagrant@m103:~$ cat chapter1.conf
dbPath: “/data/db”

path: “/data/mongod.log”
destination: “file”

port: 27000
bindIp: “,”

authorization: “enabled”

fork: true

I can see the bind settings in the log file:

2019-08-21T14:37:45.250+0000 I CONTROL [initandlisten] options: { config: “chapter1.conf”, net: { bindIp: “,”, port: 27000 }, processManagement: { fork: true }, security: { authorization: “enabled” }, storage: { dbPath: “/data/db” }, systemLog: { destination: “file”, path: “/data/mongod.log” } }
2019-08-21T14:37:45.250+0000 I - [initandlisten] Detected data files in /data/db created by the ‘wiredTiger’ storage engine, so setting the active storage engine to ‘wiredTiger’.

But I get an error when I run the validate script:

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

So why? How can I start to resolve this?

Hey @dgiffin

Try without the space. I am pretty sure I have seen that cause this error before.

bindIp: ","
1 Like

That fixed it, thanks so much…

Seriously though, YAML for the configuration file? It’s picky, wondering why you don’t use JSON? :slight_smile:

1 Like

Hey @dgiffin

My guess would be the ability to include comments in a .yml file. And they are claimed to be a bit more human readable.

I guess that’s where the name comes from Yet Another Markup Language. lol