Details
-
Improvement
-
Status: Closed
-
Major - P3
-
Resolution: Fixed
-
3.6.4
-
Minor Change
-
v4.0, v3.6
-
Platforms 2018-06-18
Description
mongod should properly handle a "poorly" formed bind_ip argument, for example when it contains whitespace.
mongod --dbpath /data/db --bind_ip "127.0.0.1, 192.168.36.100"
|
...
|
2018-05-18T21:46:45.481+0000 I NETWORK [initandlisten] getaddrinfo(" 192.168.36.100") failed: Temporary failure in name resolution
|
2018-05-18T21:46:45.481+0000 W NETWORK [initandlisten] Found no addresses for 192.168.36.100
|
...
|
2018-05-18T21:46:46.018+0000 I NETWORK [initandlisten] waiting for connections on port 27017
|
However, the process starts, listening on 127.0.0.1
1) Starting the process, without one of the IP the user specified, should abort.
2) since the most common issue is having a space in the config or cmd-line argument, mongod should start by triming the spaces.