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

HostAndPort for replSetInitiate() no longer finds hostname for localhost

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 3.6.1, 3.7.1
    • 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

    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

              billy.donahue@mongodb.com Billy Donahue
              milkie@mongodb.com Eric Milkie
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: