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

Rob Trickey commented on SOLR-11620:
------------------------------------

It does sound familiar, if it helps at all, I have managed to get the log 
message from the CloudSolrClient just above where this nullpointer occurs, to 
hopefully shed some more light on the circumstances that lead to this:

Request to collection myCollectionName failed due to (0) 
java.net.SocketException: Connection reset, retry? 0

The collection mentioned definitely exists in the cluster, we have a v small 
number of unchanging collections, and one dedicated instance of CloudSolrClient 
for each one, so we shouldn't ever be in the position where we're trying to 
send updates to a non-existent collection.

This error suggests to me that there was some kind of network issue connecting 
to Solr, and the client is not handling it gracefully. IMO the existing retry 
logic is probably the desired behaviour in this scenario, but the nullPointer 
is preventing this from being executed.

> Occasional NullPointerException in CloudSolrClient 
> ---------------------------------------------------
>
>                 Key: SOLR-11620
>                 URL: https://issues.apache.org/jira/browse/SOLR-11620
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: SolrJ
>    Affects Versions: 6.6.1
>            Reporter: Rob Trickey
>            Priority: Minor
>
> When sending document updates to Solr, we occasionally see the following 
> error:
> java.lang.NullPointerException
>       at 
> org.apache.solr.client.solrj.impl.CloudSolrClient.requestWithRetryOnStaleState(CloudSolrClient.java:1182)
>       at 
> org.apache.solr.client.solrj.impl.CloudSolrClient.request(CloudSolrClient.java:1073)
>       at 
> org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:160)
>       at org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:173)
>       at org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:138)
>       at org.apache.solr.client.solrj.SolrClient.add(SolrClient.java:152)
> Looking at the code, there is a lack of null check on requestedCollections 
> around the for loop
> for (DocCollection ext : requestedCollections) 
> which causes the error. Wrapping this loop with if(requestedCollections != 
> null) would solve the problem.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to