[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-667?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13397415#comment-13397415
 ] 

Gerben Kegel commented on ZOOKEEPER-667:
----------------------------------------

Nio in Java 6 under Windows 7 doesn't support IPv6.

You can create a server socket like this:
{code}
ServerSocket socket;
if (nioSupported(localEp)) {
  serverChannel = ServerSocketChannel.open();
  socket = serverChannel.socket();
} else {
  socket = new ServerSocket();
}

private boolean nioSupported(InetAddress localEp) {
  String os = System.getProperty("os.name");
  return !(localEp instanceof Inet6Address && os.equals("Windows 7"));
}
{code}
                
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to