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

Barrett Oglesby commented on GEODE-9043:
----------------------------------------

There are a couple ways to address this, but the easiest looks like to add the 
ServerRefusedConnectionException to QueueManagerImpl.initializeConnections here:
{noformat}
    for (ServerLocation server : servers) {
      Connection connection = null;
      try {
        connection = factory.createClientToServerConnection(server, true);
        exToLog = null;
->    } catch (GemFireSecurityException | GemFireConfigException | 
ServerRefusedConnectionException e) {
        throw e;
      } catch (Exception e) {
        exToLog = e;
      }
{noformat}
That matches what happens with GemFireSecurityException or 
GemFireConfigException and causes an exception like:
{noformat}
Exception in thread "main" 
org.apache.geode.cache.client.ServerRefusedConnectionException: 
nn.nnn.nnn.nn(9838)<v1>:41001(version:GEODE 1.13.0) refused connection: Peer or 
client version with ordinal 121 not supported. Highest known version is 1.13.0 
Client: /nn.nnn.nnn.nn:65532.
        at 
org.apache.geode.internal.cache.tier.sockets.Handshake.readMessage(Handshake.java:331)
        at 
org.apache.geode.cache.client.internal.ClientSideHandshakeImpl.handshakeWithServer(ClientSideHandshakeImpl.java:233)
        at 
org.apache.geode.cache.client.internal.ConnectionImpl.connect(ConnectionImpl.java:107)
        at 
org.apache.geode.cache.client.internal.ConnectionConnector.connectClientToServer(ConnectionConnector.java:75)
        at 
org.apache.geode.cache.client.internal.ConnectionFactoryImpl.createClientToServerConnection(ConnectionFactoryImpl.java:118)
        at 
org.apache.geode.cache.client.internal.QueueManagerImpl.initializeConnections(QueueManagerImpl.java:456)
        at 
org.apache.geode.cache.client.internal.QueueManagerImpl.start(QueueManagerImpl.java:293)
{noformat}

> A register interest attempt from a newer client to an older server throws a 
> NoSubscriptionServersAvailableException instead of a 
> ServerRefusedConnectionException
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: GEODE-9043
>                 URL: https://issues.apache.org/jira/browse/GEODE-9043
>             Project: Geode
>          Issue Type: Bug
>          Components: client/server
>            Reporter: Barrett Oglesby
>            Priority: Major
>
> The exception in the register interest case is a bit confusing.
> If a 1.13.2 client attempts to connect to a 1.13.0 server and do a put, it 
> throws this ServerRefusedConnectionException with the exact cause:
> {noformat}
> Exception in thread "main" 
> org.apache.geode.cache.client.NoAvailableServersException: 
> org.apache.geode.cache.client.ServerRefusedConnectionException: 
> nn.nnn.nnn.nn(3047)<v3>:41001(version:GEODE 1.13.0) refused connection: Peer 
> or client version with ordinal 121 not supported. Highest known version is 
> 1.13.0 Client: /nn.nnn.nnn.nn:64123.
>       at 
> org.apache.geode.cache.client.internal.pooling.ConnectionManagerImpl.createPooledConnection(ConnectionManagerImpl.java:200)
>       at 
> org.apache.geode.cache.client.internal.pooling.ConnectionManagerImpl.borrowConnection(ConnectionManagerImpl.java:273)
>       at 
> org.apache.geode.cache.client.internal.OpExecutorImpl.execute(OpExecutorImpl.java:128)
>       at 
> org.apache.geode.cache.client.internal.PoolImpl.execute(PoolImpl.java:796)
>       at org.apache.geode.cache.client.internal.PutOp.execute(PutOp.java:91)
> {noformat}
> If the client attempts to registerInterest, it throws this 
> NoSubscriptionServersAvailableException:
> {noformat}
> Exception in thread "main" 
> org.apache.geode.cache.NoSubscriptionServersAvailableException: 
> org.apache.geode.cache.NoSubscriptionServersAvailableException: Could not 
> initialize a primary queue on startup. No queue servers available.
>       at 
> org.apache.geode.cache.client.internal.QueueManagerImpl.getAllConnections(QueueManagerImpl.java:190)
>       at 
> org.apache.geode.cache.client.internal.OpExecutorImpl.executeOnQueuesAndReturnPrimaryResult(OpExecutorImpl.java:432)
>       at 
> org.apache.geode.cache.client.internal.PoolImpl.executeOnQueuesAndReturnPrimaryResult(PoolImpl.java:870)
>       at 
> org.apache.geode.cache.Region.registerInterestForAllKeys(Region.java:1657)
> {noformat}
> The log does contain a message like below so it can be determined the exact 
> cause, buts not in the exception:
> {noformat}
> [warn 2021/03/15 11:59:04.100 PDT client <main> tid=0x1] Could not create a 
> new connection to server: nn.nnn.nnn.nn(9838)<v1>:41001(version:GEODE 1.13.0) 
> refused connection: Peer or client version with ordinal 121 not supported. 
> Highest known version is 1.13.0 Client: /nn.nnn.nnn.nn:65323.
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to