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

HostAndPort for replSetInitiate() no longer finds hostname for localhost

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.1, 3.7.1
    • Component/s: Networking
    • Labels:
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v3.6
    • Steps To Reproduce:
      Hide

      1. Start mongod on an empty dbpath with:
      ./mongod --replSet foo

      2. then start mongo and issue this command:
      rs.initiate()

      Expected: successful command.
      Actual: error about not being able to connect to ":27017".

      Show
      1. Start mongod on an empty dbpath with: ./mongod --replSet foo 2. then start mongo and issue this command: rs.initiate() Expected: successful command. Actual: error about not being able to connect to ":27017".
    • Sprint:
      Platforms 2017-11-13, Platforms 2017-12-04
    • Linked BF Score:
      0

      Description

      The function someHostAndPortForMe() in repl_set_commands.cpp used to find my hostname for localhost as defined by /etc/hosts; as of 3.5.13, it no longer does so. There is some crazy logic in that function that may have been broken by recent network changes.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              billy.donahue Billy Donahue
              Reporter:
              milkie Eric Milkie
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: