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

Flavio Junqueira commented on ZOOKEEPER-1256:
---------------------------------------------

I've dug a bit deeper and found that the issue is in 
{{StaticHostProvider.resolveAndShuffle}}. This call:

{noformat}
InetAddress.getByAddress(address.getHostString(), resolvedAddress.getAddress())
{noformat}

produces this InetAddress:

{noformat}
fe80:0:0:0:0:0:0:1%lo0/fe80:0:0:0:0:0:0:1
{noformat}

This address format apparently confuses my mac and connecting fails (but note 
that as I said above the 4lw command works in the same execution):

{noformat}
2016-07-09 18:24:43,482 [myid:fe80:0:0:0:0:0:0:1%lo0:11222] - ERROR 
[main-SendThread(fe80:0:0:0:0:0:0:1%lo0:11222):ClientCnxnSocketNIO@287] - 
Unable to open socket to fe80:0:0:0:0:0:0:1%lo0/fe80:0:0:0:0:0:0:1:11222
{noformat}

I tried replacing that line with the following two:

{noformat}
InetAddress.getByAddress(resolvedAddress.getAddress());
InetAddress.getByName(resolvedAddress.getHostAddress());
{noformat}

which gives me the following respectively:

{noformat}
/fe80:0:0:0:0:0:0:1
/fe80:0:0:0:0:0:0:1%lo0
{noformat}

The first one also fails, but the second works. It looks like it doesn't work 
without the scope id.

> ClientPortBindTest is failing on Mac OS X
> -----------------------------------------
>
>                 Key: ZOOKEEPER-1256
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1256
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: tests
>         Environment: Mac OS X
>            Reporter: Daniel Gómez Ferro
>            Assignee: Flavio Junqueira
>             Fix For: 3.5.3, 3.6.0
>
>         Attachments: ClientPortBindTest.log, ZOOKEEPER-1256.patch, 
> ZOOKEEPER-1256.patch, ZOOKEEPER-1256.patch
>
>
> ClientPortBindTest is failing consistently on Mac OS X.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to