[
https://issues.apache.org/jira/browse/GEODE-7880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17059059#comment-17059059
]
Anilkumar Gingade edited comment on GEODE-7880 at 3/13/20, 9:28 PM:
--------------------------------------------------------------------
The Geode-6536 added/modified the borrowConnection.
In this case when we are unable to make a connection to a specific server; it
should not be throwing NoAvailableServersException (it has servers); as its
trying to get a connection to particular server; NoAvailableServersException is
thrown where there is no servers available to send a request.
was (Author: agingade):
This is caused by the checkin relating to: GEODE-6536.
commit sha: 86defd40c6ba558b53753c51176e05f009bb32c3
The Geode-6536 added/modified the borrowConnection.
In this case when we are unable to make a connection to a specific server; it
should not be throwing NoAvailableServersException (it has servers); as its
trying to get a connection to particular server; NoAvailableServersException is
thrown where there is no servers available to send a request.
> Null exception message causes NPE when calculating pool retries
> ---------------------------------------------------------------
>
> Key: GEODE-7880
> URL: https://issues.apache.org/jira/browse/GEODE-7880
> Project: Geode
> Issue Type: Bug
> Components: client/server
> Reporter: Dale Emery
> Assignee: Dale Emery
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> NPEs observed in testing, caused by:
> * {{ConnectionManagerImpl}} throws a {{NoAvailableServersException}} with no
> exception message.
> * {{PoolImpl.calculateRetryAttempts()}} attempts to examine the content of
> the exception message without first checking for {{null}}.
> This is caused by the checkin relating to: GEODE-6536 which added/modified
> the borrowConnection.
> commit sha: 86defd40c6ba558b53753c51176e05f009bb32c3
> There are two kinds of issues observed:
> 1. NPE
> Stack trace:
> {noformat}
> org.apache.geode.cache.execute.FunctionException:
> java.lang.NullPointerExceptionorg.apache.geode.cache.execute.FunctionException:
> java.lang.NullPointerException
> at
> org.apache.geode.internal.cache.execute.ServerRegionFunctionExecutor.executeOnServer(ServerRegionFunctionExecutor.java:215)
> at
> org.apache.geode.internal.cache.execute.ServerRegionFunctionExecutor.executeFunction(ServerRegionFunctionExecutor.java:156)
> at
> org.apache.geode.internal.cache.execute.AbstractExecution.execute(AbstractExecution.java:397)
> at
> org.apache.geode.internal.cache.execute.AbstractExecution.execute(AbstractExecution.java:402)
> at resumeTx.ResumeTxTest.begin(ResumeTxTest.java:455)
> at resumeTx.ResumeTxTest.doTransactions(ResumeTxTest.java:285)
> at resumeTx.ResumeTxTest.concTxWithFE(ResumeTxTest.java:146)
> at resumeTx.ResumeTxTest.HydraTask_concTxWithFE(ResumeTxTest.java:131)
> at hydra.TestTask.execute(TestTask.java:197)
> Caused by: java.lang.NullPointerException
> at
> org.apache.geode.cache.client.internal.PoolImpl.calculateRetryAttempts(PoolImpl.java:1610)
> at
> org.apache.geode.cache.client.internal.SingleHopClientExecutor.submitAllHA(SingleHopClientExecutor.java:124)
> at
> org.apache.geode.cache.client.internal.ExecuteRegionFunctionSingleHopOp.execute(ExecuteRegionFunctionSingleHopOp.java:88)
> at
> org.apache.geode.cache.client.internal.ServerRegionProxy.executeFunction(ServerRegionProxy.java:727)
> at
> org.apache.geode.internal.cache.execute.ServerRegionFunctionExecutor.executeOnServer(ServerRegionFunctionExecutor.java:206)
> org.apache.geode.cache.execute.FunctionException:
> java.lang.NullPointerExceptionorg.apache.geode.cache.execute.FunctionException:
> java.lang.NullPointerException
> Caused by: java.lang.NullPointerException
> {noformat}
> 2. NoAvailableServersException
> {noformat}
> Caused by: org.apache.geode.cache.execute.FunctionException:
> org.apache.geode.cache.client.NoAvailableServersException
> at
> org.apache.geode.internal.cache.execute.ServerRegionFunctionExecutor.executeOnServer(ServerRegionFunctionExecutor.java:215)
> at
> org.apache.geode.internal.cache.execute.ServerRegionFunctionExecutor.executeFunction(ServerRegionFunctionExecutor.java:158)
> at
> org.apache.geode.internal.cache.execute.AbstractExecution.execute(AbstractExecution.java:397)
> at
> org.apache.geode.internal.cache.execute.AbstractExecution.execute(AbstractExecution.java:402)
> at
> parReg.execute.HAExceptionHandlingTest.doRandomFunctionExecutions(HAExceptionHandlingTest.java:268)
> ... 9 more
> Caused by: org.apache.geode.cache.client.NoAvailableServersException
> at
> org.apache.geode.cache.client.internal.pooling.ConnectionManagerImpl.borrowConnection(ConnectionManagerImpl.java:332)
> at
> org.apache.geode.cache.client.internal.pooling.ConnectionManagerImpl.borrowConnection(ConnectionManagerImpl.java:70)
> at
> org.apache.geode.cache.client.internal.OpExecutorImpl.executeOnServer(OpExecutorImpl.java:329)
> at
> org.apache.geode.cache.client.internal.OpExecutorImpl.executeOn(OpExecutorImpl.java:303)
> at
> org.apache.geode.cache.client.internal.PoolImpl.executeOn(PoolImpl.java:834)
> at
> org.apache.geode.cache.client.internal.SingleHopOperationCallable.call(SingleHopOperationCallable.java:52)
> at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
> at
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
> at
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
> at java.base/java.lang.Thread.run(Thread.java:834)
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)