Support Questions
Find answers, ask questions, and share your expertise

PutSolrContentStream Exception: Not enough nodes to handle the request.

Nifi PutSolrContentStream processor is throwing following exception.

2016-12-09 04:27:06,255 ERROR [Timer-Driven Process Thread-5] o.a.s.client.solrj.impl.CloudSolrClient Request to collection sko failed due to (510) org.apache.solr.common.SolrException: Not enough nodes to handle the request, retry? 0 2016-12-09 04:27:06,255 ERROR [Timer-Driven Process Thread-5] o.a.n.p.solr.PutSolrContentStream PutSolrContentStream[id=557fd04c-0158-1000-9b3b-fe6c668c5257] Failed to send StandardFlowFileRecord[uuid=37b79499-7dc1-4a91-bb88-9ed6b4752a84,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1481056244639-267, container=default, section=267], offset=0, length=236],offset=0,name=436773625064295,size=236] to Solr due to org.apache.solr.client.solrj.SolrServerException: org.apache.solr.common.SolrException: Not enough nodes to handle the request; routing to failure: org.apache.solr.client.solrj.SolrServerException: org.apache.solr.common.SolrException: Not enough nodes to handle the request 2016-12-09 04:27:06,257 ERROR [Timer-Driven Process Thread-5] o.a.n.p.solr.PutSolrContentStream org.apache.solr.client.solrj.SolrServerException: org.apache.solr.common.SolrException: Not enough nodes to handle the request at org.apache.solr.client.solrj.impl.CloudSolrClient.requestWithRetryOnStaleState(CloudSolrClient.java:929) ~[solr-solrj-5.1.0.jar:5.1.0 1672403 - timpotter - 2015-04-09 10:37:56] at org.apache.solr.client.solrj.impl.CloudSolrClient.request(CloudSolrClient.java:782) ~[solr-solrj-5.1.0.jar:5.1.0 1672403 - timpotter - 2015-04-09 10:37:56] at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:135) ~[solr-solrj-5.1.0.jar:5.1.0 1672403 - timpotter - 2015-04-09 10:37:56] at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:152) ~[solr-solrj-5.1.0.jar:5.1.0 1672403 - timpotter - 2015-04-09 10:37:56] at org.apache.nifi.processors.solr.PutSolrContentStream$1.process(PutSolrContentStream.java:220) ~[nifi-solr-processors-1.0.0.2.0.0.0-579.jar:1.0.0.2.0.0.0-579] at org.apache.nifi.controller.repository.StandardProcessSession.read(StandardProcessSession.java:1880) ~[na:na]

Please advise.

3 REPLIES 3

Super Collaborator

@milind pandit Please check the status of your cluster and collection by looking at the Cloud option in the admin console and look for Active and Leaders for each shard. For more detail you can then click on "Cloud -> Dump". I believe this can be caused by a shard with no live replicas. You might also try manually adding a some documents to see if you get the same issue. You can manually add docs through the admin console. You may want to look at the Solr logs as well for additional errors or info.

New Contributor

@james.jones - I am facing a similar issue and have mentioned the details below

Environment details

Using Hortonworks Sandbox environment

Started Solr (8983) and Zookeeper (2181)

Using Nifi putSolrContentStream processor for an example of Kafka/Nifi/Solr integration

Error

Have the following details configured in the putSolrContentStream processor,

SolrLocation = sandbox.hortonworks.com:2181/solr

SolrType = cloud

I get the following error . Is there a configuration to be done to tie the SOlr with Zookeeper that i am missing ?

Please note that i am able to load documents into Solr via admin UI.

2017-07-08 19:00:43,266 ERROR [Timer-Driven Process Thread-2] o.a.n.p.solr.PutSolrContentStream PutSolrContentStream[id=ba4eeecf-ce6f-4508-f97c-39ebf248dfcb] Failed to send StandardFlowFileRecord[uuid=fe558440-72a1-48f3-92d8-b293e10b040b,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1499530138880-1, container=default, section=1], offset=4635, length=182],offset=0,name=45981186967945,size=182] to Solr due to org.apache.solr.client.solrj.SolrServerException: org.apache.solr.common.SolrException: Not enough nodes to handle the request; routing to failure: org.apache.solr.client.solrj.SolrServerException: org.apache.solr.common.SolrException: Not enough nodes to handle the request 2017-07-08 19:00:43,266 ERROR [Timer-Driven Process Thread-2] o.a.n.p.solr.PutSolrContentStream org.apache.solr.client.solrj.SolrServerException: org.apache.solr.common.SolrException: Not enough nodes to handle the request at org.apache.solr.client.solrj.impl.CloudSolrClient.requestWithRetryOnStaleState(CloudSolrClient.java:929) ~[solr-solrj-5.1.0.jar:5.1.0 1672403 - timpotter - 2015-04-09 10:37:56] at org.apache.solr.client.solrj.impl.CloudSolrClient.requestWithRetryOnStaleState(CloudSolrClient.java:922) ~[solr-solrj-5.1.0.jar:5.1.0 1672403 - timpotter - 2015-04-09 10:37:56] at org.apache.solr.client.solrj.impl.CloudSolrClient.requestWithRetryOnStaleState(CloudSolrClient.java:922) ~[solr-solrj-5.1.0.jar:5.1.0 1672403 - timpotter - 2015-04-09 10:37:56] at org.apache.solr.client.solrj.impl.CloudSolrClient.requestWithRetryOnStaleState(CloudSolrClient.java:922) ~[solr-solrj-5.1.0.jar:5.1.0 1672403 - timpotter - 2015-04-09 10:37:56] at org.apache.solr.client.solrj.impl.CloudSolrClient.requestWithRetryOnStaleState(CloudSolrClient.java:922) ~[solr-solrj-5.1.0.jar:5.1.0 1672403 - timpotter - 2015-04-09 10:37:56] at org.apache.solr.client.solrj.impl.CloudSolrClient.requestWithRetryOnStaleState(CloudSolrClient.java:922) ~[solr-solrj-5.1.0.jar:5.1.0 1672403 - timpotter - 2015-04-09 10:37:56] at org.apache.solr.client.solrj.impl.CloudSolrClient.request(CloudSolrClient.java:782) ~[solr-solrj-5.1.0.jar:5.1.0 1672403 - timpotter - 2015-04-09 10:37:56] at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:135) ~[solr-solrj-5.1.0.jar:5.1.0 1672403 - timpotter - 2015-04-09 10:37:56] at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:152) ~[solr-solrj-5.1.0.jar:5.1.0 1672403 - timpotter - 2015-04-09 10:37:56] at org.apache.nifi.processors.solr.PutSolrContentStream$1.process(PutSolrContentStream.java:220) ~[nifi-solr-processors-1.0.0.2.0.0.0-579.jar:1.0.0.2.0.0.0-579] at org.apache.nifi.controller.repository.StandardProcessSession.read(StandardProcessSession.java:1880) ~[na:na] at org.apache.nifi.controller.repository.StandardProcessSession.read(StandardProcessSession.java:1851) ~[na:na] at org.apache.nifi.processors.solr.PutSolrContentStream.onTrigger(PutSolrContentStream.java:179) ~[nifi-solr-processors-1.0.0.2.0.0.0-579.jar:1.0.0.2.0.0.0-579] at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) [nifi-api-1.0.0.2.0.0.0-579.jar:1.0.0.2.0.0.0-579] at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1064) [nifi-framework-core-1.0.0.2.0.0.0-579.jar:1.0.0.2.0.0.0-579] at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:136) [nifi-framework-core-1.0.0.2.0.0.0-579.jar:1.0.0.2.0.0.0-579] at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47) [nifi-framework-core-1.0.0.2.0.0.0-579.jar:1.0.0.2.0.0.0-579] at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:132) [nifi-framework-core-1.0.0.2.0.0.0-579.jar:1.0.0.2.0.0.0-579

Super Collaborator

@Harish Acharya - This could be caused by several things. I don't think the problem is with your Nifi processor. Take a look at Solr (e.g. the admin console) as well as your collection definition. It sounds like either all of your nodes are not up and healthy or else you created your collection with too many shards (numShards) compared to the number of nodes availalbe and maxShardsPerNode. A Node in Solr is a running instance of Solr, which typically will be one per server. If you used the createNodeSet option, that could also be related.