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

mongos should allow --port 0

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 7.1.0-rc0, 5.0.22, 7.0.3, 4.4.26, 6.0.12
    • Affects Version/s: None
    • Component/s: None
    • None
    • Service Arch
    • Fully Compatible
    • ALL
    • v7.0, v6.0, v5.0, v4.4
    • Hide

      mongos --port 0

      Show
      mongos --port 0
    • Service Arch 2023-07-10

      mongos, unlike mongod, does not allow listening on an arbitrary OS-assigned port by specifying --port 0.

      In ancient times (2010), validation for --port was added to the server.

      Then, in slightly less ancient times (2013), this validation was split into separate validation code for mongod and mongos.

      And then, in not-even-all-that-long-ago times (2017), the validation for mongod was updated to allow port 0, but no such update was done for the corresponding mongos argument validation.

      We should apply that update there as well.

            Assignee:
            amirsaman.memaripour@mongodb.com Amirsaman Memaripour
            Reporter:
            anna.henningsen@mongodb.com Anna Henningsen
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: