# After restarting ElasticSearch, a lot of shards unassigned

**URL:** https://discuss.elastic.co/t/after-restarting-elasticsearch-a-lot-of-shards-unassigned/41978
**Category:** Elasticsearch
**Created:** [February 17, 2016, 7:15am UTC](https://discuss.elastic.co/t/after-restarting-elasticsearch-a-lot-of-shards-unassigned/41978 "2016-02-17T07:15:01Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![rsjavier](https://avatars.discourse-cdn.com/v4/letter/r/9e8a1a/32.png) [@rsjavier](https://discuss.elastic.co/u/rsjavier)
#### Post date: [February 17, 2016, 7:15am UTC](https://discuss.elastic.co/t/after-restarting-elasticsearch-a-lot-of-shards-unassigned/41978/1 "2016-02-17T07:15:01Z")

</div>

The elasticsearch 2.0.0 is running for several months already and creating logstash index per day. When I want to update the elasticsearch.yml, i try to restart it first without any changes and the the problem occurs.

It assigned the first few hundreds then suddenly stopped at around 855 and no more updates happened.

[ec2-user@ip-xx-xx-xx-xx ~]$ curl 'xx-xx-xx-xx:9200/\_cat/health?v'  
epoch timestamp cluster status node.total node.data shards pri relo init unassign pending\_tasks max\_task\_wait\_time active\_shards\_percent  
1455684626 12:50:26 elasticsearch red 1 1 855 855 0 4 3693 6 315.2ms 18.8%  
[ec2-user@ip-xx-xx-xx-xx ~]$ curl 'xx-xx-xx-xx:9200/\_cat/allocation?v'  
shards disk.used disk.avail disk.total disk.percent host ip node  
859 7.1gb 2.6gb 9.8gb 72 xx-xx-xx-xx xx-xx-xx-xx node1  
3693 UNASSIGNED

I tried to search the logs and found some errors  
[2016-02-17 14:21:41,743][WARN][cluster.action.shard] [node1] [logstash\_vcm\_apilog-2016.02.16][4] received shard failed for [logstash\_vcm\_apilog-2016.02.16][4], node[NKZ9SbU9S8Cf5jXy5GVMgw], [P], v[20], s[INITIALIZING], a[id=a-1W4A7rTl-W35S4UsOohw], unassigned\_info[[reason=ALLOCATION\_FAILED], at[2016-02-17T06:21:38.627Z], details[failed recovery, failure IndexShardRecoveryException[failed to recovery from gateway]; nested: EngineCreationFailureException[failed to create engine]; nested: FileAlreadyExistsException[/var/lib/elasticsearch/elasticsearch/nodes/0/indices/logstash\_vcm\_apilog-2016.02.16/4/translog/translog-65.ckp]; ]], indexUUID [szBbNKdQQaej-\_kpts4eMg], message [failed recovery], failure [IndexShardRecoveryException[failed to recovery from gateway]; nested: EngineCreationFailureException[failed to create engine]; nested: FileAlreadyExistsException[/var/lib/elasticsearch/elasticsearch/nodes/0/indices/logstash\_vcm\_apilog-2016.02.16/4/translog/translog-65.ckp]; ]

Any idea how to recover the elasticsearch?

---

<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 5, 2017, 11:15pm UTC](https://discuss.elastic.co/t/after-restarting-elasticsearch-a-lot-of-shards-unassigned/41978/2 "2017-07-05T23:15:49Z")

</div>


