HostAndPort for replSetInitiate() no longer finds hostname for localhost

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 3.6.1, 3.7.1
    • Affects Version/s: None
    • Component/s: Networking
    • Fully Compatible
    • ALL
    • v3.6
    • 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".
    • Platforms 2017-11-13, Platforms 2017-12-04
    • 0
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Billy Donahue
            Reporter:
            Eric Milkie
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: