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

Dale Emery commented on GEODE-9622:
-----------------------------------

In this test class, the `startLocator()` method has this code:
{noformat}
Locator locator = Locator.startLocatorAndDS(locatorPort, locatorLog, 
bindAddress, config);
return locator.getPort();
{noformat}
{{locatorPort}} is a static variable. The first time this method is called in a 
VM, it starts a locator on an ephemeral port.

Some tests in this class later stop the locator, then attempt to restart it the 
same port. But because it's an ephemeral port, the OS can give it to some other 
process while the locator is stopped.

This test class should be edited to call {{AvailablePortHelper}} to get a port 
for the locator, rather than using an ephemeral port. And because some tests 
invoke older JVMs, the call to {{AvailablePortHelper}} must be made in the test 
JVM, not in child VMs.

> CI Failure: 
> ClientServerTransactionFailoverWithMixedVersionServersDistributedTest fails 
> with BindException
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: GEODE-9622
>                 URL: https://issues.apache.org/jira/browse/GEODE-9622
>             Project: Geode
>          Issue Type: Bug
>          Components: client/server, tests
>            Reporter: Kirk Lund
>            Priority: Major
>
> {noformat}
> org.apache.geode.internal.cache.ClientServerTransactionFailoverWithMixedVersionServersDistributedTest
>  > clientTransactionOperationsAreNotLostIfTransactionIsOnRolledServer FAILED
>     org.apache.geode.test.dunit.RMIException: While invoking 
> org.apache.geode.internal.cache.ClientServerTransactionFailoverWithMixedVersionServersDistributedTest$$Lambda$68/194483270.call
>  in VM 5 running on Host 
> heavy-lifter-2b8702f1-fe32-5895-9b14-832b7049b607.c.apachegeode-ci.internal 
> with 6 VMs
>         at org.apache.geode.test.dunit.VM.executeMethodOnObject(VM.java:631)
>         at org.apache.geode.test.dunit.VM.invoke(VM.java:473)
>         at 
> org.apache.geode.internal.cache.ClientServerTransactionFailoverWithMixedVersionServersDistributedTest.rollLocatorToCurrent(ClientServerTransactionFailoverWithMixedVersionServersDistributedTest.java:216)
>         at 
> org.apache.geode.internal.cache.ClientServerTransactionFailoverWithMixedVersionServersDistributedTest.setupPartiallyRolledVersion(ClientServerTransactionFailoverWithMixedVersionServersDistributedTest.java:171)
>         at 
> org.apache.geode.internal.cache.ClientServerTransactionFailoverWithMixedVersionServersDistributedTest.clientTransactionOperationsAreNotLostIfTransactionIsOnRolledServer(ClientServerTransactionFailoverWithMixedVersionServersDistributedTest.java:127)
>         Caused by:
>         java.net.BindException: Failed to create server socket on 
> heavy-lifter-2b8702f1-fe32-5895-9b14-832b7049b607.c.apachegeode-ci.internal/10.0.0.60[43535]
>             at 
> org.apache.geode.distributed.internal.tcpserver.ClusterSocketCreatorImpl.createServerSocket(ClusterSocketCreatorImpl.java:75)
>             at 
> org.apache.geode.internal.net.SCClusterSocketCreator.createServerSocket(SCClusterSocketCreator.java:55)
>             at 
> org.apache.geode.distributed.internal.tcpserver.ClusterSocketCreatorImpl.createServerSocket(ClusterSocketCreatorImpl.java:54)
>             at 
> org.apache.geode.distributed.internal.tcpserver.TcpServer.initializeServerSocket(TcpServer.java:196)
>             at 
> org.apache.geode.distributed.internal.tcpserver.TcpServer.startServerThread(TcpServer.java:183)
>             at 
> org.apache.geode.distributed.internal.tcpserver.TcpServer.start(TcpServer.java:178)
>             at 
> org.apache.geode.distributed.internal.membership.gms.locator.MembershipLocatorImpl.start(MembershipLocatorImpl.java:112)
>             at 
> org.apache.geode.distributed.internal.InternalLocator.startPeerLocation(InternalLocator.java:653)
>             at 
> org.apache.geode.distributed.internal.InternalLocator.startLocator(InternalLocator.java:394)
>             at 
> org.apache.geode.distributed.internal.InternalLocator.startLocator(InternalLocator.java:345)
>             at 
> org.apache.geode.distributed.Locator.startLocator(Locator.java:261)
>             at 
> org.apache.geode.distributed.Locator.startLocatorAndDS(Locator.java:207)
>             at 
> org.apache.geode.internal.cache.ClientServerTransactionFailoverWithMixedVersionServersDistributedTest.startLocator(ClientServerTransactionFailoverWithMixedVersionServersDistributedTest.java:180)
>             at 
> org.apache.geode.internal.cache.ClientServerTransactionFailoverWithMixedVersionServersDistributedTest.lambda$rollLocatorToCurrent$92d5d92a$1(ClientServerTransactionFailoverWithMixedVersionServersDistributedTest.java:216)
>             Caused by:
>             java.net.BindException: Address already in use (Bind failed)
>                 at java.net.PlainSocketImpl.socketBind(Native Method)
>                 at 
> java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387)
>                 at java.net.ServerSocket.bind(ServerSocket.java:390)
>                 at 
> org.apache.geode.distributed.internal.tcpserver.ClusterSocketCreatorImpl.createServerSocket(ClusterSocketCreatorImpl.java:72)
>                 ... 13 more
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to