# shard allocated for local recovery (post api), should exists, but doesn't (org.elasticsearch.index.gateway.IndexShardGatewayRecoveryException)

**URL:** <https://discuss.elastic.co/t/shard-allocated-for-local-recovery-post-api-should-exists-but-doesnt-org-elasticsearch-index-gateway-indexshardgatewayrecoveryexception/19627>\
**Category:** Elasticsearch\
**Created:** [September 4, 2014, 4:20pm UTC](https://discuss.elastic.co/t/shard-allocated-for-local-recovery-post-api-should-exists-but-doesnt-org-elasticsearch-index-gateway-indexshardgatewayrecoveryexception/19627 "2014-09-04T16:20:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mathias\_Gawlista](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mathias_gawlista/32/1296_2.png) [@Mathias\_Gawlista](https://discuss.elastic.co/u/Mathias_Gawlista)\
**Post date:** [September 4, 2014, 4:20pm UTC](https://discuss.elastic.co/t/shard-allocated-for-local-recovery-post-api-should-exists-but-doesnt-org-elasticsearch-index-gateway-indexshardgatewayrecoveryexception/19627/1 "2014-09-04T16:20:04Z")

</div>

Hi,

after I uninstalled elasticsearch 0.9.x through "brew uninstall  
elasticsearch" I installed elasticsearch 0.20.6 through "brew install  
elasticsearch-0.20".

When I start the server through elasticsearch -f -D  
es.config=/usr/local/opt/elasticsearch-0.20/config/elasticsearch.yml the  
server endlessly logs the following exception:

[2014-09-04 18:06:14,613][WARN][cluster.action.shard] [Jann] sending  
failed shard for [sensei\_cucumber\_news\_feeds][0],  
node[gne6S-UYQPWnR9FqtKg\_mw], [P], s[INITIALIZING], reason [Failed to start  
shard, message  
[IndexShardGatewayRecoveryException[[sensei\_cucumber\_news\_feeds][0] shard  
allocated for local recovery (post api), should exists, but doesn't]]]  
[2014-09-04 18:06:14,634][WARN][indices.cluster] [Jann]  
[sensei\_cucumber\_news\_feeds][0] failed to start shard  
org.elasticsearch.index.gateway.IndexShardGatewayRecoveryException:  
[sensei\_cucumber\_news\_feeds][0] shard allocated for local recovery (post  
api), should exists, but doesn't  
at  
org.elasticsearch.index.gateway.local.LocalIndexShardGateway.recover(LocalIndexShardGateway.java:122)  
at  
org.elasticsearch.index.gateway.IndexShardGatewayService$1.run(IndexShardGatewayService.java:174)  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)  
at java.lang.Thread.run(Thread.java:695)

I'm also wondering why the indices still exists. The indices should have  
been deleted after uninstallation, right?

[http://localhost:9200/\_cluster/health?pretty=true](http://localhost:9200/_cluster/health?pretty=true) shows red signal:

{

- "cluster\_name": "elasticsearch\_gawlim",
- "status": "red",
- "timed\_out": false,
- "number\_of\_nodes": 1,
- "number\_of\_data\_nodes": 1,
- "active\_primary\_shards": 0,
- "active\_shards": 0,
- "relocating\_shards": 0,
- "initializing\_shards": 4,
- "unassigned\_shards": 867

}

When I try to execute a search request on the server I get  
SearchPhaseExecutionException Failed to execute phase [query], total  
failure; shardFailures: No active shards

Regards

Mathias

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/d7ec6889-0022-40ae-af54-ab1e6d22ea7b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d7ec6889-0022-40ae-af54-ab1e6d22ea7b%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Mathias\_Gawlista](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mathias_gawlista/32/1296_2.png) [@Mathias\_Gawlista](https://discuss.elastic.co/u/Mathias_Gawlista)\
**Post date:** [September 5, 2014, 8:32am UTC](https://discuss.elastic.co/t/shard-allocated-for-local-recovery-post-api-should-exists-but-doesnt-org-elasticsearch-index-gateway-indexshardgatewayrecoveryexception/19627/2 "2014-09-05T08:32:35Z")

</div>

I manually deleted the indices through the following command and now it  
works:

curl -XDELETE '[http://localhost:9200/index\_name](http://localhost:9200/index_name)'

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/6cffe11a-6ca5-4c98-8216-d8f0603a644e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6cffe11a-6ca5-4c98-8216-d8f0603a644e%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:04am UTC](https://discuss.elastic.co/t/shard-allocated-for-local-recovery-post-api-should-exists-but-doesnt-org-elasticsearch-index-gateway-indexshardgatewayrecoveryexception/19627/3 "2017-07-06T01:04:10Z")

</div>


