[
https://issues.apache.org/jira/browse/ZOOKEEPER-1441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16682502#comment-16682502
]
Patrick Hunt commented on ZOOKEEPER-1441:
-----------------------------------------
I see in the most recent failures:
https://builds.apache.org/view/S-Z/view/ZooKeeper/job/ZooKeeper-trunk-java11/155/testReport/junit/org.apache.zookeeper.test/FollowerResyncConcurrencyTest/testResyncByDiffAfterFollowerCrashes/
The following sequence (extracted from the larger log):
{noformat}
2018-11-09 23:33:57,175 [myid:] - INFO [main:PortAssignment@85] - Assigned
port 27380 from range 27379 - 32764.
2018-11-09 23:33:57,221 [myid:] - INFO [main:QuorumUtil@116] - Creating
QuorumPeer 1; public port 27380
2018-11-09 23:33:57,287 [myid:] - INFO [main:NIOServerCnxnFactory@683] -
binding to port /127.0.0.1:27380
... some successful work....
2018-11-09 23:33:57,339 [myid:] - INFO [main:QuorumUtil@250] - Shutting down
quorum peer QuorumPeer
2018-11-09 23:33:57,343 [myid:] - INFO [main:QuorumUtil@259] - Waiting for
QuorumPeer to exit thread
...
2018-11-09 23:34:12,366 [myid:] - INFO [main:QuorumUtil@203] - Creating
QuorumPeer 1; public port 27380
2018-11-09 23:34:12,366 [myid:] - INFO [main:ServerCnxnFactory@161] - Using
org.apache.zookeeper.server.NIOServerCnxnFactory as server connection factory
2018-11-09 23:34:12,367 [myid:] - INFO [main:NIOServerCnxnFactory@670] -
Configuring NIO connection handler with 10s sessionless connection timeout, 2
selector thread(s), 32 worker threads, and 64 kB direct buffers.
2018-11-09 23:34:12,368 [myid:] - INFO [main:NIOServerCnxnFactory@683] -
binding to port /127.0.0.1:27380
2018-11-09 23:34:12,369 [myid:] - INFO
[main:JUnit4ZKTestRunner$LoggedInvokeMethod@98] - TEST METHOD FAILED
testResyncByTxnlogThenDiffAfterFollowerCrashes
java.net.BindException: Address already in use
{noformat}
I updated that job to not use parallel test threads and the issue still happens:
https://builds.apache.org/view/S-Z/view/ZooKeeper/job/ZooKeeper-trunk-java11/156/testReport/junit/org.apache.zookeeper.server/ZxidRolloverTest/testRolloverThenLeaderRestart/
so it's not related to "test.junit.threads=1"
It seems like it may be a real issue with some change in java11 semantics
around sockets?
Has anything else been updated that could be related? java10 with the same code
seems fine.
> 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)