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

IPv6 literal address causes problems for Quorum members

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.5.3
    • Fix Version/s: None
    • Component/s: quorum

      Description

      We're using ZK 3.5.3-beta.

      When using literal IPv6 addresses in the zoo.cfg.dynamic file, ZK fails to come up with the connection to the peer ZKs keeps getting reset.

      zookeeper.log indicates a badly formed address is the cause.

      <2018.03.01 15:14:30 163 -0500><E><sdn3></2001:db8:0:0:0:0:0:4:3888><org.apache.zookeeper.server.quorum.QuorumCnxManager> org.apache.zookeeper.server.quorum.QuorumCnxManager$InitialMessage$InitialMessageException: Badly formed address: 2001:db8:0:0:0:0:0:2:3888

      Our zoo.cfg.dynamic uses literal IPv6 addresses which according to ZOOKEEPER-1460 is supported.

      server.1=[2001:db8::2]:2888:3888
      server.2=[2001:db8::3]:2888:3888
      server.3=[2001:db8::4]:2888:3888

       

      Digging into QuorumCnxManager.java, InitialMessage.parse attemps to seperate the host portion from the port portion using ":" as a delimeter, which is a problem for IPv6 IPs.  And there's this comment:

      // FIXME: IPv6 is not supported. Using something like Guava's HostAndPort
      // parser would be good.

      So it looks like peers address:port is failing to be parsed if they are specified as literal IPv6 addresses.  To confirm a workaround, I replaced my zoo.cfg.dynamic with hostnames instead, and everything worked as expected.

       

       

       

       

        Attachments

          Activity

            People

            • Assignee:
              maoling maoling
              Reporter:
              rtrudeau Rick Trudeau
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2h 10m
                2h 10m