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

HostAndPort for replSetInitiate() no longer finds hostname for localhost

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.6.1, 3.7.1
    • Affects Version/s: None
    • Component/s: Networking
    • Labels:
    • 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

      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@mongodb.com Billy Donahue
            Reporter:
            milkie@mongodb.com Eric Milkie
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: