Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-1954

StaticHostProvider loses IPv6 scope ID when resolving server addresses

    XMLWordPrintableJSON

Details

    • Bug
    • Status: In Progress
    • Minor
    • Resolution: Unresolved
    • 3.4.6
    • None
    • java client
    • None
    • Patch

    Description

      I have been getting constant failures of the ClientPortBindTest unit test (see ZOOKEEPER-1256) on my Macbook. I traced the problem to loss of the IPv6 scope ID on the address chosen for the loopback address in the unit test.

      The address chosen is: fe80:0:0:0:0:0:0:1%1. The scope ID here is 1, after the percent sign.

      The scope ID is lost in the resolveAndShuffle() method of StaticHostProvider. The method uses InetAddress.getByAddress() which apparently does not preserve the scope ID in the host string it is passed. Inet6Address.getByAddress() can, although you have to parse the scope ID out of the host string yourself and pass it as its own parameter.

      Attachments

        1. ZOOKEEPER-1954.patch
          2 kB
          Bill Havanki

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bhavanki Bill Havanki
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: