[jira] [Updated] (GEODE-10268) Peer-to-peer connection due to race condition overtakes the --server-port causing server to hang during startup

2022-05-02 Thread Jakov Varenina (Jira)


 [ 
https://issues.apache.org/jira/browse/GEODE-10268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jakov Varenina updated GEODE-10268:
---
Description: 
{color:#0e101a}The issue is reproduced 
({color}[^reproducedBindRejectedDueToPeerToPeer.txt]{color:#0e101a} ) with the 
patch at creating the acceptor that tries to bind the port already used in 
peer-to-peer connection. The problem is that distributed system starts before 
the client/server connection acceptor listener. Because of that, a peer-to-peer 
connection may take the port configured in the --server-port parameter. Also, 
it seems that these peer-to-peer connections take ports outside the range 
configured {color}*{color:#0e101a}with the membership-port-range{color}* 
{color:#0e101a}parameter:{color}
{code:java}
[vm1] membership-port-range=41000-61000{code}
The peer-to-peer connection:

{color:#0e101a}[vm1] [debug 2022/05/02 *11:15:57.968* {color}CEST server-1  tid=0x1a] starting peer-to-peer handshake on 
socket 
Socket[addr=/192.168.1.36,port=49913,{color:#de350b}*localport=37392*{color}]

Server try to create acceptor later on:
{code:java}
[vm1] exeption for java.net.BindException: Failed to create server socket on 
192.168.1.36[37392]
[vm1] [info 2022/05/02 11:16:00.421 CEST server-1  tid=0x1a] Got result: EXCEPTION_OCCURRED
[vm1] java.lang.RuntimeException: unable to start server
[vm1]     at 
org.apache.geode.test.junit.rules.ServerStarterRule.startServer(ServerStarterRule.java:225)
[vm1]     at 
org.apache.geode.test.junit.rules.ServerStarterRule.before(ServerStarterRule.java:99)
[vm1]     at 
org.apache.geode.test.dunit.rules.ClusterStartupRule.lambda$startServerVM$6d6c10c2$1(ClusterStartupRule.java:284)
[vm1]     at 
org.apache.geode.test.dunit.internal.IdentifiableCallable.call(IdentifiableCallable.java:41)
[vm1]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[vm1]     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[vm1]     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[vm1]     at java.lang.reflect.Method.invoke(Method.java:498)
[vm1]     at 
org.apache.geode.test.dunit.internal.MethodInvoker.executeObject(MethodInvoker.java:123)
[vm1]     at 
org.apache.geode.test.dunit.internal.RemoteDUnitVM.executeMethodOnObject(RemoteDUnitVM.java:78)
[vm1]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[vm1]     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[vm1]     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[vm1]     at java.lang.reflect.Method.invoke(Method.java:498)
[vm1]     at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
[vm1]     at sun.rmi.transport.Transport$1.run(Transport.java:200)
[vm1]     at sun.rmi.transport.Transport$1.run(Transport.java:197)
[vm1]     at java.security.AccessController.doPrivileged(Native Method)
[vm1]     at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
[vm1]     at 
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)
[vm1]     at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)
[vm1]     at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)
[vm1]     at java.security.AccessController.doPrivileged(Native Method)
[vm1]     at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)
[vm1]     at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[vm1]     at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[vm1]     at java.lang.Thread.run(Thread.java:748)
[vm1] Caused by: java.net.BindException: Failed to create server socket on 
192.168.1.36[37392]
[vm1]     at 
org.apache.geode.distributed.internal.tcpserver.ClusterSocketCreatorImpl.createServerSocket(ClusterSocketCreatorImpl.java:75)
[vm1]     at 
org.apache.geode.internal.net.SCClusterSocketCreator.createServerSocket(SCClusterSocketCreator.java:55)
[vm1]     at 
org.apache.geode.internal.net.SocketCreator.createServerSocket(SocketCreator.java:491)
[vm1]     at 
org.apache.geode.internal.cache.tier.sockets.AcceptorImpl.(AcceptorImpl.java:589)
[vm1]     at 
org.apache.geode.internal.cache.tier.sockets.AcceptorBuilder.create(AcceptorBuilder.java:291)
[vm1]     at 
org.apache.geode.internal.cache.CacheServerImpl.createAcceptor(CacheServerImpl.java:420)
[vm1]     at 
org.apache.geode.internal.cache.CacheServerImpl.start(CacheServerImpl.java:377)
[vm1]     at 
org.apache.geode.test.junit.rules.ServerStarterRule.startServer(ServerStarterRule.java:223)
{code}
 

  was:
{color:#0e101a}reaThe issue is reproduced 
({color}[^reproducedBindRejectedDueToPeerToPeer.txt]{color:#0e101a} ) with the 
patch at creating the acceptor that tries to bind the port already used in 
peer-to-peer connection. The 

[jira] [Updated] (GEODE-10268) Peer-to-peer connection due to race condition overtakes the --server-port causing server to hang during startup

2022-05-02 Thread Jakov Varenina (Jira)


 [ 
https://issues.apache.org/jira/browse/GEODE-10268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jakov Varenina updated GEODE-10268:
---
Description: 
{color:#0e101a}reaThe issue is reproduced 
({color}[^reproducedBindRejectedDueToPeerToPeer.txt]{color:#0e101a} ) with the 
patch at creating the acceptor that tries to bind the port already used in 
peer-to-peer connection. The problem is that distributed system starts before 
the client/server connection acceptor listener. Because of that, a peer-to-peer 
connection may take the port configured in the --server-port parameter. Also, 
it seems that these peer-to-peer connections take ports outside the range 
configured {color}*{color:#0e101a}with the membership-port-range{color}* 
{color:#0e101a}parameter:{color}
{code:java}
[vm1] membership-port-range=41000-61000{code}
The peer-to-peer connection:

{color:#0e101a}[vm1] [debug 2022/05/02 *11:15:57.968* {color}CEST server-1  tid=0x1a] starting peer-to-peer handshake on 
socket 
Socket[addr=/192.168.1.36,port=49913,{color:#de350b}*localport=37392*{color}]

Server try to create acceptor later on:
{code:java}
[vm1] exeption for java.net.BindException: Failed to create server socket on 
192.168.1.36[37392]
[vm1] [info 2022/05/02 11:16:00.421 CEST server-1  tid=0x1a] Got result: EXCEPTION_OCCURRED
[vm1] java.lang.RuntimeException: unable to start server
[vm1]     at 
org.apache.geode.test.junit.rules.ServerStarterRule.startServer(ServerStarterRule.java:225)
[vm1]     at 
org.apache.geode.test.junit.rules.ServerStarterRule.before(ServerStarterRule.java:99)
[vm1]     at 
org.apache.geode.test.dunit.rules.ClusterStartupRule.lambda$startServerVM$6d6c10c2$1(ClusterStartupRule.java:284)
[vm1]     at 
org.apache.geode.test.dunit.internal.IdentifiableCallable.call(IdentifiableCallable.java:41)
[vm1]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[vm1]     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[vm1]     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[vm1]     at java.lang.reflect.Method.invoke(Method.java:498)
[vm1]     at 
org.apache.geode.test.dunit.internal.MethodInvoker.executeObject(MethodInvoker.java:123)
[vm1]     at 
org.apache.geode.test.dunit.internal.RemoteDUnitVM.executeMethodOnObject(RemoteDUnitVM.java:78)
[vm1]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[vm1]     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[vm1]     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[vm1]     at java.lang.reflect.Method.invoke(Method.java:498)
[vm1]     at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
[vm1]     at sun.rmi.transport.Transport$1.run(Transport.java:200)
[vm1]     at sun.rmi.transport.Transport$1.run(Transport.java:197)
[vm1]     at java.security.AccessController.doPrivileged(Native Method)
[vm1]     at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
[vm1]     at 
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)
[vm1]     at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)
[vm1]     at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)
[vm1]     at java.security.AccessController.doPrivileged(Native Method)
[vm1]     at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)
[vm1]     at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[vm1]     at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[vm1]     at java.lang.Thread.run(Thread.java:748)
[vm1] Caused by: java.net.BindException: Failed to create server socket on 
192.168.1.36[37392]
[vm1]     at 
org.apache.geode.distributed.internal.tcpserver.ClusterSocketCreatorImpl.createServerSocket(ClusterSocketCreatorImpl.java:75)
[vm1]     at 
org.apache.geode.internal.net.SCClusterSocketCreator.createServerSocket(SCClusterSocketCreator.java:55)
[vm1]     at 
org.apache.geode.internal.net.SocketCreator.createServerSocket(SocketCreator.java:491)
[vm1]     at 
org.apache.geode.internal.cache.tier.sockets.AcceptorImpl.(AcceptorImpl.java:589)
[vm1]     at 
org.apache.geode.internal.cache.tier.sockets.AcceptorBuilder.create(AcceptorBuilder.java:291)
[vm1]     at 
org.apache.geode.internal.cache.CacheServerImpl.createAcceptor(CacheServerImpl.java:420)
[vm1]     at 
org.apache.geode.internal.cache.CacheServerImpl.start(CacheServerImpl.java:377)
[vm1]     at 
org.apache.geode.test.junit.rules.ServerStarterRule.startServer(ServerStarterRule.java:223)
{code}
 

  was:
{color:#0e101a}The issue is reproduced 
({color}[^reproducedBindRejectedDueToPeerToPeer.txt]{color:#0e101a} ) with the 
patch at creating the acceptor that tries to bind the port used in peer-to-peer 
connection. The problem 

[jira] [Updated] (GEODE-10268) Peer-to-peer connection due to race condition overtakes the --server-port causing server to hang during startup

2022-05-02 Thread Jakov Varenina (Jira)


 [ 
https://issues.apache.org/jira/browse/GEODE-10268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jakov Varenina updated GEODE-10268:
---
Description: 
{color:#0e101a}The issue is reproduced 
({color}[^reproducedBindRejectedDueToPeerToPeer.txt]{color:#0e101a} ) with the 
patch at creating the acceptor that tries to bind the port used in peer-to-peer 
connection. The problem is that distributed system starts before the 
client/server connection acceptor listener. Because of that, a peer-to-peer 
connection may take the port configured in the --server-port parameter. Also, 
it seems that these peer-to-peer connections take ports outside the range 
configured {color}*{color:#0e101a}with the membership-port-range{color}* 
{color:#0e101a}parameter:{color}
{code:java}
[vm1] membership-port-range=41000-61000{code}

The peer-to-peer connection:

{color:#0e101a}[vm1] [debug 2022/05/02 *11:15:57.968* {color}CEST server-1  tid=0x1a] starting peer-to-peer handshake on 
socket 
Socket[addr=/192.168.1.36,port=49913,{color:#de350b}*localport=37392*{color}]

Server try to create acceptor later on:
{code:java}
[vm1] exeption for java.net.BindException: Failed to create server socket on 
192.168.1.36[37392]
[vm1] [info 2022/05/02 11:16:00.421 CEST server-1  tid=0x1a] Got result: EXCEPTION_OCCURRED
[vm1] java.lang.RuntimeException: unable to start server
[vm1]     at 
org.apache.geode.test.junit.rules.ServerStarterRule.startServer(ServerStarterRule.java:225)
[vm1]     at 
org.apache.geode.test.junit.rules.ServerStarterRule.before(ServerStarterRule.java:99)
[vm1]     at 
org.apache.geode.test.dunit.rules.ClusterStartupRule.lambda$startServerVM$6d6c10c2$1(ClusterStartupRule.java:284)
[vm1]     at 
org.apache.geode.test.dunit.internal.IdentifiableCallable.call(IdentifiableCallable.java:41)
[vm1]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[vm1]     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[vm1]     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[vm1]     at java.lang.reflect.Method.invoke(Method.java:498)
[vm1]     at 
org.apache.geode.test.dunit.internal.MethodInvoker.executeObject(MethodInvoker.java:123)
[vm1]     at 
org.apache.geode.test.dunit.internal.RemoteDUnitVM.executeMethodOnObject(RemoteDUnitVM.java:78)
[vm1]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[vm1]     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[vm1]     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[vm1]     at java.lang.reflect.Method.invoke(Method.java:498)
[vm1]     at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
[vm1]     at sun.rmi.transport.Transport$1.run(Transport.java:200)
[vm1]     at sun.rmi.transport.Transport$1.run(Transport.java:197)
[vm1]     at java.security.AccessController.doPrivileged(Native Method)
[vm1]     at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
[vm1]     at 
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)
[vm1]     at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)
[vm1]     at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)
[vm1]     at java.security.AccessController.doPrivileged(Native Method)
[vm1]     at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)
[vm1]     at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[vm1]     at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[vm1]     at java.lang.Thread.run(Thread.java:748)
[vm1] Caused by: java.net.BindException: Failed to create server socket on 
192.168.1.36[37392]
[vm1]     at 
org.apache.geode.distributed.internal.tcpserver.ClusterSocketCreatorImpl.createServerSocket(ClusterSocketCreatorImpl.java:75)
[vm1]     at 
org.apache.geode.internal.net.SCClusterSocketCreator.createServerSocket(SCClusterSocketCreator.java:55)
[vm1]     at 
org.apache.geode.internal.net.SocketCreator.createServerSocket(SocketCreator.java:491)
[vm1]     at 
org.apache.geode.internal.cache.tier.sockets.AcceptorImpl.(AcceptorImpl.java:589)
[vm1]     at 
org.apache.geode.internal.cache.tier.sockets.AcceptorBuilder.create(AcceptorBuilder.java:291)
[vm1]     at 
org.apache.geode.internal.cache.CacheServerImpl.createAcceptor(CacheServerImpl.java:420)
[vm1]     at 
org.apache.geode.internal.cache.CacheServerImpl.start(CacheServerImpl.java:377)
[vm1]     at 
org.apache.geode.test.junit.rules.ServerStarterRule.startServer(ServerStarterRule.java:223)
{code}
 

  was:
{color:#0e101a}{color:#0e101a}The issue is reproduced 
({color}[^reproducedBindRejectedDueToPeerToPeer.txt]{color:#0e101a} ) with the 
patch at creating the acceptor that tries to bind the port used in peer-to-peer 
connection. The 

[jira] [Updated] (GEODE-10268) Peer-to-peer connection due to race condition overtakes the --server-port causing server to hang during startup

2022-05-02 Thread Jakov Varenina (Jira)


 [ 
https://issues.apache.org/jira/browse/GEODE-10268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jakov Varenina updated GEODE-10268:
---
Description: 
{color:#0e101a}{color:#0e101a}The issue is reproduced 
({color}[^reproducedBindRejectedDueToPeerToPeer.txt]{color:#0e101a} ) with the 
patch at creating the acceptor that tries to bind the port used in peer-to-peer 
connection. The problem is that distributed system starts before the 
client/server connection acceptor. Because of that, a peer-to-peer connection 
may take the port configured in the --server-port parameter. Also, it seems 
that these peer-to-peer connections take ports outside the range configured 
{color}*{color:#0e101a}with the membership-port-range{color}* 
{color:#0e101a}parameter:{color}{color}
{code:java}
[vm1] membership-port-range=41000-61000{code}
{color:#0e101a}The peer-to-peer connection:{color}

{color:#0e101a}[vm1] [debug 2022/05/02 *11:15:57.968* {color}CEST server-1  tid=0x1a] starting peer-to-peer handshake on 
socket 
Socket[addr=/192.168.1.36,port=49913,{color:#de350b}*localport=37392*{color}]

Server try to create acceptor later on:
{code:java}
 
{color:#0e101a}[vm1] Jale exeption for java.net.BindException: Failed to create 
server socket on 192.168.1.36[37392]
[vm1] [info 2022/05/02 11:16:00.421 CEST server-1  tid=0x1a] Got result: EXCEPTION_OCCURRED
[vm1] java.lang.RuntimeException: unable to start server
[vm1]     at 
org.apache.geode.test.junit.rules.ServerStarterRule.startServer(ServerStarterRule.java:225)
[vm1]     at 
org.apache.geode.test.junit.rules.ServerStarterRule.before(ServerStarterRule.java:99)
[vm1]     at 
org.apache.geode.test.dunit.rules.ClusterStartupRule.lambda$startServerVM$6d6c10c2$1(ClusterStartupRule.java:284)
[vm1]     at 
org.apache.geode.test.dunit.internal.IdentifiableCallable.call(IdentifiableCallable.java:41)
[vm1]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[vm1]     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[vm1]     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[vm1]     at java.lang.reflect.Method.invoke(Method.java:498)
[vm1]     at 
org.apache.geode.test.dunit.internal.MethodInvoker.executeObject(MethodInvoker.java:123)
[vm1]     at 
org.apache.geode.test.dunit.internal.RemoteDUnitVM.executeMethodOnObject(RemoteDUnitVM.java:78)
[vm1]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[vm1]     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[vm1]     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[vm1]     at java.lang.reflect.Method.invoke(Method.java:498)
[vm1]     at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
[vm1]     at sun.rmi.transport.Transport$1.run(Transport.java:200)
[vm1]     at sun.rmi.transport.Transport$1.run(Transport.java:197)
[vm1]     at java.security.AccessController.doPrivileged(Native Method)
[vm1]     at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
[vm1]     at 
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)
[vm1]     at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)
[vm1]     at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)
[vm1]     at java.security.AccessController.doPrivileged(Native Method)
[vm1]     at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)
[vm1]     at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[vm1]     at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[vm1]     at java.lang.Thread.run(Thread.java:748)
[vm1] Caused by: java.net.BindException: Failed to create server socket on 
192.168.1.36[37392]
[vm1]     at 
org.apache.geode.distributed.internal.tcpserver.ClusterSocketCreatorImpl.createServerSocket(ClusterSocketCreatorImpl.java:75)
[vm1]     at 
org.apache.geode.internal.net.SCClusterSocketCreator.createServerSocket(SCClusterSocketCreator.java:55)
[vm1]     at 
org.apache.geode.internal.net.SocketCreator.createServerSocket(SocketCreator.java:491)
[vm1]     at 
org.apache.geode.internal.cache.tier.sockets.AcceptorImpl.(AcceptorImpl.java:589)
[vm1]     at 
org.apache.geode.internal.cache.tier.sockets.AcceptorBuilder.create(AcceptorBuilder.java:291)
[vm1]     at 
org.apache.geode.internal.cache.CacheServerImpl.createAcceptor(CacheServerImpl.java:420)
[vm1]     at 
org.apache.geode.internal.cache.CacheServerImpl.start(CacheServerImpl.java:377)
[vm1]     at 
org.apache.geode.test.junit.rules.ServerStarterRule.startServer(ServerStarterRule.java:223){color}

 

{code}
 

 

  was:
{color:#0e101a}The issue is reproduced 
({color}[^reproducedBindRejectedDueToPeerToPeer.txt]{color:#0e101a} ) with the 
patch at the creation of the acceptor that 

[jira] [Updated] (GEODE-10268) Peer-to-peer connection due to race condition overtakes the --server-port causing server to hang during startup

2022-05-02 Thread Jakov Varenina (Jira)


 [ 
https://issues.apache.org/jira/browse/GEODE-10268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jakov Varenina updated GEODE-10268:
---
Description: 
{color:#0e101a}The issue is reproduced 
({color}[^reproducedBindRejectedDueToPeerToPeer.txt]{color:#0e101a} ) with the 
patch at the creation of the acceptor that tries to bind the port used in 
peer-to-peer connection. The problem is that distributed system starts before 
the client/server connection acceptor. Because of that, a peer-to-peer 
connection may take the port configured in the --server-port parameter.{color}

{color:#0e101a}The peer-to-peer connection:{color}

{color:#0e101a}[vm1] [debug 2022/05/02 *11:15:57.968* {color}CEST server-1  tid=0x1a] starting peer-to-peer handshake on 
socket 
Socket[addr=/192.168.1.36,port=49913,{color:#de350b}*localport=37392*{color}]

Server try to create acceptor later on:
{code:java}
 
{color:#0e101a}[vm1] Jale exeption for java.net.BindException: Failed to create 
server socket on 192.168.1.36[37392]
[vm1] [info 2022/05/02 11:16:00.421 CEST server-1  tid=0x1a] Got result: EXCEPTION_OCCURRED
[vm1] java.lang.RuntimeException: unable to start server
[vm1]     at 
org.apache.geode.test.junit.rules.ServerStarterRule.startServer(ServerStarterRule.java:225)
[vm1]     at 
org.apache.geode.test.junit.rules.ServerStarterRule.before(ServerStarterRule.java:99)
[vm1]     at 
org.apache.geode.test.dunit.rules.ClusterStartupRule.lambda$startServerVM$6d6c10c2$1(ClusterStartupRule.java:284)
[vm1]     at 
org.apache.geode.test.dunit.internal.IdentifiableCallable.call(IdentifiableCallable.java:41)
[vm1]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[vm1]     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[vm1]     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[vm1]     at java.lang.reflect.Method.invoke(Method.java:498)
[vm1]     at 
org.apache.geode.test.dunit.internal.MethodInvoker.executeObject(MethodInvoker.java:123)
[vm1]     at 
org.apache.geode.test.dunit.internal.RemoteDUnitVM.executeMethodOnObject(RemoteDUnitVM.java:78)
[vm1]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[vm1]     at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[vm1]     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[vm1]     at java.lang.reflect.Method.invoke(Method.java:498)
[vm1]     at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
[vm1]     at sun.rmi.transport.Transport$1.run(Transport.java:200)
[vm1]     at sun.rmi.transport.Transport$1.run(Transport.java:197)
[vm1]     at java.security.AccessController.doPrivileged(Native Method)
[vm1]     at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
[vm1]     at 
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)
[vm1]     at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)
[vm1]     at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)
[vm1]     at java.security.AccessController.doPrivileged(Native Method)
[vm1]     at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)
[vm1]     at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[vm1]     at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[vm1]     at java.lang.Thread.run(Thread.java:748)
[vm1] Caused by: java.net.BindException: Failed to create server socket on 
192.168.1.36[37392]
[vm1]     at 
org.apache.geode.distributed.internal.tcpserver.ClusterSocketCreatorImpl.createServerSocket(ClusterSocketCreatorImpl.java:75)
[vm1]     at 
org.apache.geode.internal.net.SCClusterSocketCreator.createServerSocket(SCClusterSocketCreator.java:55)
[vm1]     at 
org.apache.geode.internal.net.SocketCreator.createServerSocket(SocketCreator.java:491)
[vm1]     at 
org.apache.geode.internal.cache.tier.sockets.AcceptorImpl.(AcceptorImpl.java:589)
[vm1]     at 
org.apache.geode.internal.cache.tier.sockets.AcceptorBuilder.create(AcceptorBuilder.java:291)
[vm1]     at 
org.apache.geode.internal.cache.CacheServerImpl.createAcceptor(CacheServerImpl.java:420)
[vm1]     at 
org.apache.geode.internal.cache.CacheServerImpl.start(CacheServerImpl.java:377)
[vm1]     at 
org.apache.geode.test.junit.rules.ServerStarterRule.startServer(ServerStarterRule.java:223){color}

 

{code}
 

 

  was:Issue is reproduced with the patch at the creation of acceptor that trys 
to bind the port used in peer-to-peer connections.


> Peer-to-peer connection due to race condition overtakes the --server-port 
> causing server to hang during startup
> ---
>
> Key: GEODE-10268
> URL: 

[jira] [Updated] (GEODE-10268) Peer-to-peer connection due to race condition overtakes the --server-port causing server to hang during startup

2022-05-02 Thread Jakov Varenina (Jira)


 [ 
https://issues.apache.org/jira/browse/GEODE-10268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jakov Varenina updated GEODE-10268:
---
Description: Issue is reproduced with the patch at the creation of acceptor 
that trys to bind the port used in peer-to-peer connections.

> Peer-to-peer connection due to race condition overtakes the --server-port 
> causing server to hang during startup
> ---
>
> Key: GEODE-10268
> URL: https://issues.apache.org/jira/browse/GEODE-10268
> Project: Geode
>  Issue Type: Bug
>Reporter: Jakov Varenina
>Assignee: Jakov Varenina
>Priority: Major
> Attachments: reproducedBindRejectedDueToPeerToPeer.txt
>
>
> Issue is reproduced with the patch at the creation of acceptor that trys to 
> bind the port used in peer-to-peer connections.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)


[jira] [Updated] (GEODE-10268) Peer-to-peer connection due to race condition overtakes the --server-port causing server to hang during startup

2022-05-02 Thread Jakov Varenina (Jira)


 [ 
https://issues.apache.org/jira/browse/GEODE-10268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jakov Varenina updated GEODE-10268:
---
Attachment: reproducedBindRejectedDueToPeerToPeer.txt

> Peer-to-peer connection due to race condition overtakes the --server-port 
> causing server to hang during startup
> ---
>
> Key: GEODE-10268
> URL: https://issues.apache.org/jira/browse/GEODE-10268
> Project: Geode
>  Issue Type: Bug
>Reporter: Jakov Varenina
>Assignee: Jakov Varenina
>Priority: Major
> Attachments: reproducedBindRejectedDueToPeerToPeer.txt
>
>




--
This message was sent by Atlassian Jira
(v8.20.7#820007)


[jira] [Updated] (GEODE-10268) Peer-to-peer connection due to race condition overtakes the --server-port causing server to hang during startup

2022-04-29 Thread Anthony Baker (Jira)


 [ 
https://issues.apache.org/jira/browse/GEODE-10268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Anthony Baker updated GEODE-10268:
--
Labels:   (was: needsTriage)

> Peer-to-peer connection due to race condition overtakes the --server-port 
> causing server to hang during startup
> ---
>
> Key: GEODE-10268
> URL: https://issues.apache.org/jira/browse/GEODE-10268
> Project: Geode
>  Issue Type: Bug
>Reporter: Jakov Varenina
>Assignee: Jakov Varenina
>Priority: Major
>




--
This message was sent by Atlassian Jira
(v8.20.7#820007)


[jira] [Updated] (GEODE-10268) Peer-to-peer connection due to race condition overtakes the --server-port causing server to hang during startup

2022-04-29 Thread Jakov Varenina (Jira)


 [ 
https://issues.apache.org/jira/browse/GEODE-10268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jakov Varenina updated GEODE-10268:
---
Summary: Peer-to-peer connection due to race condition overtakes the 
--server-port causing server to hang during startup  (was: Peer-to-peer 
connection overtakes due to race condition overtakes the --server-port)

> Peer-to-peer connection due to race condition overtakes the --server-port 
> causing server to hang during startup
> ---
>
> Key: GEODE-10268
> URL: https://issues.apache.org/jira/browse/GEODE-10268
> Project: Geode
>  Issue Type: Bug
>Reporter: Jakov Varenina
>Priority: Major
>  Labels: needsTriage
>




--
This message was sent by Atlassian Jira
(v8.20.7#820007)