Patrick Hunt commented on ZOOKEEPER-667:

turned out fixing this was a bit of a pita. java adds some %scope_id to the end 
of ipv6 addresses for getHostAddress() calls, however it does
not allow specifying an address with this scopeid (so the code needs to look 
for this and strip it).

re ben's comment on using [ipv6]:port the current patch on ZOOKEEPER-667 
doesn't have this. I currently have ipv6:port, where the code looks
for the trailing :# on the connect string to pull out the port number. I'm not 
convinced that [ipv6]:port is really the way to go

1) parsing the connect string is more complicated
2) anyone trying to generate the connect string (esp code) now has to handle 
this as a special case as well

if we just always require ipv{4|6}:port and our code looks for trailing :port I 
think we are fine. the only small discrepancy
is that we allow ipv4 w/o port, in which case we default the port to 2181. In 
the case of ipv6 we will always require
the user to specify ipv6:port (ie no default for port in this case).

what do you think? I don't want to change things later, so if you see a problem 
with this we should just switch to the
[ipv6]:port stuff now rather than change things for users later.

> java client doesn't allow ipv6 numeric connect string
> -----------------------------------------------------
>                 Key: ZOOKEEPER-667
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-667
>             Project: Zookeeper
>          Issue Type: Bug
>          Components: java client
>    Affects Versions: 3.2.2
>            Reporter: Patrick Hunt
>            Assignee: Patrick Hunt
>            Priority: Critical
>             Fix For: 3.3.0
> The java client doesn't handle ipv6 numeric addresses as they are colon (:) 
> delmited. After splitting the host/port on : we look for the port as the 
> second entry in the array rather than the last entry in the array.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

Reply via email to