# Elastic shard corrupted and unassigned

**URL:** https://discuss.elastic.co/t/elastic-shard-corrupted-and-unassigned/200064
**Category:** Elasticsearch
**Created:** [September 18, 2019, 5:48pm UTC](https://discuss.elastic.co/t/elastic-shard-corrupted-and-unassigned/200064 "2019-09-18T17:48:36Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![fernandamaffioletti](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fernandamaffioletti/32/54437_2.png) [@fernandamaffioletti](https://discuss.elastic.co/u/fernandamaffioletti)
#### Post date: [September 18, 2019, 5:48pm UTC](https://discuss.elastic.co/t/elastic-shard-corrupted-and-unassigned/200064/1 "2019-09-18T17:48:36Z")

</div>

Hi! Our elasticsearch stoped allocating one shard.

This is the error:  
[2019-09-18 14:41:03,707][WARN][cluster.action.shard] [DMESPROD3] [dmesprod][0] received shard failed for [dmesprod][0], node[OcRTFaolS9mX6Cni7gWtGw], [P], s[INITIALIZING], indexUUID [fSnPdqL\_S2CMIgUSagQO-A], reason [Failed to start shard, message [IndexShardGatewayRecoveryException[[dmesprod][0] failed to fetch index version after copying it over]; nested: CorruptIndexException[[dmesprod][0] Corrupted index [corrupted\_xaX-iT4cQtCjGdDQG-w1Zg] caused by: CorruptIndexException[codec footer mismatch: actual footer=272697361 vs expected footer=-1071082520 (resource: NIOFSIndexInput(path="/var/lib/elasticsearch/dmes/nodes/0/indices/dmesprod/0/index/\_1yake\_es090\_0.doc"))]]; ]]

how can we recover this shard?

---

<div class="post-metadata">

### Author: ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)
#### Post date: [September 20, 2019, 9:15am UTC](https://discuss.elastic.co/t/elastic-shard-corrupted-and-unassigned/200064/2 "2019-09-20T09:15:02Z")

</div>

Hi @fernandamaffioletti and welcome!

This shard is corrupt and needs to be rebuilt from a good copy on a different node. Is your cluster health `red`? If not, Elasticsearch has already rebuilt it from a replica. If it is `red`, can you use the [allocation explain API](https://www.elastic.co/guide/en/elasticsearch/reference/7.3/cluster-allocation-explain.html) to find out why Elasticsearch cannot allocate any of the other copies of this shard either? You can share the output here if you need help interpreting it:

```auto
GET /_cluster/allocation/explain
{
  "index": "dmesprod",
  "shard": 0,
  "primary": true
}

```

---

<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: [October 18, 2019, 9:15am UTC](https://discuss.elastic.co/t/elastic-shard-corrupted-and-unassigned/200064/3 "2019-10-18T09:15:08Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
