Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-35101

Handle differently a badly formed bindIp argument

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.6.6, 4.0.1, 4.1.1
    • Affects Version/s: 3.6.4
    • Component/s: Networking
    • Minor Change
    • v4.0, v3.6
    • Platforms 2018-06-18

      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.

            Assignee:
            adam.cooper@mongodb.com Adam Cooper (Inactive)
            Reporter:
            daniel.coupal@mongodb.com Daniel Coupal
            Votes:
            5 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: