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

Andor Molnar commented on ZOOKEEPER-1441:
-----------------------------------------

"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"

How is that possible? If all tests are using PortAssigment (which I believe is 
the case), they should get different numbers, because PortAssigment maintains 
that. I never actually got why PortAssigment tries to bind the port before 
returns, because technically other test should not get the same number. Though 
there could be other processes running on the same server which binds that 
port, so it does make sense actually.

> 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