DataStax Help Center

"Unavailable shards for ranges" seen when querying a Solr cluster


The "Unavailable shared for ranges" error is a common problem seen and usually caused by replication problems


The following error is seen by an application querying the cluster

ERROR [http-8983-2] 2015-01-16 13:49:43,467 (line 696) Error request exception: Unavailable shards for ranges: [(-57 java.lang.RuntimeException: Unavailable shards for ranges: [(-5719401877638111419,-5707784632754930432], (-2818664767592173043,-280161088540 
at org.apache.solr.handler.component.SearchHandler.handleRequestBody( 
at org.apache.solr.handler.RequestHandlerBase.handleRequest( 
at org.apache.solr.core.SolrCore.execute( 


This is usually caused by a replication issue. It is usually:

  • Some nodes with the replicas are genuinely down and not able to respond to the query
  • Some nodes are experiencing high GC pauses thus not responding to the query (see this note for more info: Common causes of GC pauses)
  • The keyspace replication strategy is not correct (i.e using SimpleStrategy in a multi-DC environment - the writes only going into one DC but reads might try to target multiple DCs)
  • The keyspace replication configured with DC names that do not match the current cluster configuration.
  • The query is requesting a higher consistency level read than the cluster can service at the current time


In some cases changing the read consistency level to a lower one might help to mitigate the issue. Be aware that using a low setting like CL=ONE might mean the data returned is not completely consistent


Check you are using the correct replication strategy, and check the status of your cluster addressing any nodes that might be reported as down or unresponsive. 


Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request


Powered by Zendesk