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

Michael Han commented on ZOOKEEPER-1441:
----------------------------------------

PortAssignment itself could also be more flaky under Java 11 because it can't 
guarantee atomicity between the time of allocation of a port and the time of 
actually binding the port inside a ZK server. I remember [~lvfangmin] mentioned 
that in FB they improved PortAssignment by using random ports rather than 
sequential port, which might help here. Alternatively we could also let ZK 
server to atomically allocate and bind a port inside it and then return the 
binded port number to caller, for testing purpose, rather than having to pass a 
port in, which will fix the root cause of the issue.

> Some test cases are failing because Port bind issue.
> ----------------------------------------------------
>
>                 Key: ZOOKEEPER-1441
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1441
>             Project: ZooKeeper
>          Issue Type: Test
>          Components: server, tests
>            Reporter: kavita sharma
>            Assignee: Michael Han
>            Priority: Major
>              Labels: flaky, flaky-test
>
> very frequently testcases are failing because of :
> java.net.BindException: Address already in use
>       at sun.nio.ch.Net.bind(Native Method)
>       at 
> sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:126)
>       at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
>       at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:52)
>       at 
> org.apache.zookeeper.server.NIOServerCnxnFactory.configure(NIOServerCnxnFactory.java:111)
>       at 
> org.apache.zookeeper.server.ServerCnxnFactory.createFactory(ServerCnxnFactory.java:112)
>       at 
> org.apache.zookeeper.server.quorum.QuorumPeer.<init>(QuorumPeer.java:514)
>       at 
> org.apache.zookeeper.test.QuorumBase.startServers(QuorumBase.java:156)
>       at org.apache.zookeeper.test.QuorumBase.setUp(QuorumBase.java:103)
>       at org.apache.zookeeper.test.QuorumBase.setUp(QuorumBase.java:67)
> may be because of Port Assignment so please give me some suggestions if 
> someone is also facing same problem.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to