# Shard failed recovery

**URL:** <https://discuss.elastic.co/t/shard-failed-recovery/5487>\
**Category:** Elasticsearch\
**Created:** [September 30, 2011, 10:15am UTC](https://discuss.elastic.co/t/shard-failed-recovery/5487 "2011-09-30T10:15:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Charles\_Hooker](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@Charles\_Hooker](https://discuss.elastic.co/u/Charles_Hooker)\
**Post date:** [September 30, 2011, 10:15am UTC](https://discuss.elastic.co/t/shard-failed-recovery/5487/1 "2011-09-30T10:15:15Z")

</div>

Hi,  
I'm currently trying to get the Percolator working. At first, I  
register about 6000 queries to the percolator - that works. After  
that, I create the corresponding index (with custom analyzers and  
schema) in order to be able to query the percolator.  
This doesn't work because immediately after I create the index (the  
corresponding scripts works when not using the percolator) the cluster  
state turns red because of this exception:

org.elasticsearch.index.gateway.IndexShardGatewayRecoveryException:  
[sentences][0] failed recovery  
at org.elasticsearch.index.gateway.IndexShardGatewayService  
$1.run(IndexShardGatewayService.java:229)  
at java.util.concurrent.ThreadPoolExecutor  
$Worker.runTask(ThreadPoolExecutor.java:886)  
at java.util.concurrent.ThreadPoolExecutor  
$Worker.run(ThreadPoolExecutor.java:908)  
at java.lang.Thread.run(Thread.java:662)  
Caused by: java.lang.NullPointerException: null value  
at  
org.elasticsearch.common.base.Preconditions.checkNotNull(Preconditions.java:  
204)  
at  
org.elasticsearch.common.collect.ImmutableMap.entryOf(ImmutableMap.java:  
139)  
at  
org.elasticsearch.common.collect.ImmutableMap.copyOf(ImmutableMap.java:  
263)  
at  
org.elasticsearch.common.collect.MapBuilder.immutableMap(MapBuilder.java:  
73)  
at  
org.elasticsearch.index.percolator.PercolatorExecutor.addQueries(PercolatorExecutor.java:  
252)  
at  
org.elasticsearch.index.percolator.PercolatorService.loadQueries(PercolatorService.java:  
131)  
at org.elasticsearch.index.percolator.PercolatorService.access  
$700(PercolatorService.java:56)  
at org.elasticsearch.index.percolator.PercolatorService  
$ShardLifecycleListener.afterIndexShardStarted(PercolatorService.java:  
246)  
at  
org.elasticsearch.indices.InternalIndicesLifecycle.afterIndexShardStarted(InternalIndicesLifecycle.java:  
78)  
at  
org.elasticsearch.index.shard.service.InternalIndexShard.start(InternalIndexShard.java:  
259)  
at  
org.elasticsearch.index.gateway.local.LocalIndexShardGateway.recover(LocalIndexShardGateway.java:  
123)  
at org.elasticsearch.index.gateway.IndexShardGatewayService  
$1.run(IndexShardGatewayService.java:179)  
... 3 more

I'm using ElasticSearch 0.17.7 on Ubuntu 11.04 x86\_64.  
Do you have any idea of how to resolve this?

Thanks in Advance!

Best regards  
Charles

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [October 2, 2011, 8:57am UTC](https://discuss.elastic.co/t/shard-failed-recovery/5487/2 "2011-10-02T08:57:31Z")

</div>

Can you post a way for us to recreate it?

On Fri, Sep 30, 2011 at 1:15 PM, Charles Hooker [c.hooker@aol.com](mailto:c.hooker@aol.com) wrote:

> Hi,  
> I'm currently trying to get the Percolator working. At first, I  
> register about 6000 queries to the percolator - that works. After  
> that, I create the corresponding index (with custom analyzers and  
> schema) in order to be able to query the percolator.  
> This doesn't work because immediately after I create the index (the  
> corresponding scripts works when not using the percolator) the cluster  
> state turns red because of this exception:
> 
> org.elasticsearch.index.gateway.IndexShardGatewayRecoveryException:  
> [sentences][0] failed recovery  
> at org.elasticsearch.index.gateway.IndexShardGatewayService  
> $1.run(IndexShardGatewayService.java:229)  
> at java.util.concurrent.ThreadPoolExecutor  
> $Worker.runTask(ThreadPoolExecutor.java:886)  
> at java.util.concurrent.ThreadPoolExecutor  
> $Worker.run(ThreadPoolExecutor.java:908)  
> at java.lang.Thread.run(Thread.java:662)  
> Caused by: java.lang.NullPointerException: null value  
> at
> 
> org.elasticsearch.common.base.Preconditions.checkNotNull(Preconditions.java:  
> 204)  
> at  
> org.elasticsearch.common.collect.ImmutableMap.entryOf(ImmutableMap.java:  
> 139)  
> at  
> org.elasticsearch.common.collect.ImmutableMap.copyOf(ImmutableMap.java:  
> 263)  
> at  
> org.elasticsearch.common.collect.MapBuilder.immutableMap(MapBuilder.java:  
> 73)  
> at
> 
> org.elasticsearch.index.percolator.PercolatorExecutor.addQueries(PercolatorExecutor.java:  
> 252)  
> at
> 
> org.elasticsearch.index.percolator.PercolatorService.loadQueries(PercolatorService.java:  
> 131)  
> at org.elasticsearch.index.percolator.PercolatorService.access  
> $700(PercolatorService.java:56)  
> at org.elasticsearch.index.percolator.PercolatorService  
> $ShardLifecycleListener.afterIndexShardStarted(PercolatorService.java:  
> 246)  
> at
> 
> org.elasticsearch.indices.InternalIndicesLifecycle.afterIndexShardStarted(InternalIndicesLifecycle.java:  
> 78)  
> at
> 
> org.elasticsearch.index.shard.service.InternalIndexShard.start(InternalIndexShard.java:  
> 259)  
> at
> 
> org.elasticsearch.index.gateway.local.LocalIndexShardGateway.recover(LocalIndexShardGateway.java:  
> 123)  
> at org.elasticsearch.index.gateway.IndexShardGatewayService  
> $1.run(IndexShardGatewayService.java:179)  
> ... 3 more
> 
> I'm using Elasticsearch 0.17.7 on Ubuntu 11.04 x86\_64.  
> Do you have any idea of how to resolve this?
> 
> Thanks in Advance!
> 
> Best regards  
> Charles

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 3:53am UTC](https://discuss.elastic.co/t/shard-failed-recovery/5487/3 "2017-07-06T03:53:08Z")

</div>

Closed on July 6, 2017, 3:53am UTC


