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

Handle differently a badly formed bindIp argument

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.6.4
    • Fix Version/s: 3.6.6, 4.0.1, 4.1.1
    • Component/s: Networking
    • Labels:

      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.

        Attachments

          Activity

            People

            • Votes:
              5 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: