Bill Havanki created ZOOKEEPER-1954:
---------------------------------------
Summary: StaticHostProvider loses IPv6 scope ID when resolving
server addresses
Key: ZOOKEEPER-1954
URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1954
Project: ZooKeeper
Issue Type: Bug
Components: java client
Reporter: Bill Havanki
Priority: Minor
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.
--
This message was sent by Atlassian JIRA
(v6.2#6252)