# Nested: CorruptIndexException\[failed engine (reason: \[corrupt file (source: \[index\])

**URL:** https://discuss.elastic.co/t/nested-corruptindexexception-failed-engine-reason-corrupt-file-source-index/126178
**Category:** Elasticsearch
**Created:** [March 30, 2018, 3:55am UTC](https://discuss.elastic.co/t/nested-corruptindexexception-failed-engine-reason-corrupt-file-source-index/126178 "2018-03-30T03:55:02Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![law](https://avatars.discourse-cdn.com/v4/letter/l/4af34b/32.png) [@law](https://discuss.elastic.co/u/law)
#### Post date: [March 30, 2018, 3:55am UTC](https://discuss.elastic.co/t/nested-corruptindexexception-failed-engine-reason-corrupt-file-source-index/126178/1 "2018-03-30T03:55:03Z")

</div>

Hi everyone，  
My ES node has a index which has a shard with status UNASSIGNED, when i perform cluster reroute using this command:

```auto
curl -uuser:passwd -XPOST 'localhost:19200/_cluster/reroute?pretty' -d '{
        "commands" : [ {
              "allocate_stale_primary" : {
                  "index" : "pay-2018.03.25",
                  "shard" : 1,
                  "node" : "eNRHSjwxR8q2PVTK4_mrBA",
                  "accept_data_loss" : true
              }
            }
        ]
    }'

```

there is an error occurs:

```auto
{
                "state" : "INITIALIZING",
                "primary" : true,
                "node" : "eNRHSjwxR8q2PVTK4_mrBA",
                "relocating_node" : null,
                "shard" : 1,
                "index" : "pay-2018.03.25",
                "recovery_source" : {
                  "type" : "EXISTING_STORE"
                },
                "allocation_id" : {
                  "id" : "9Z6vKdQ_SoiqCSvTtUL9eA"
                },
                "unassigned_info" : {
                  "reason" : "ALLOCATION_FAILED",
                  "at" : "2018-03-29T01:27:38.432Z",
                  "failed_attempts" : 3,
                  "delayed" : false,
                  "details" : "failed recovery, failure RecoveryFailedException[[pay-2018.03.25][1]: Recovery failed on {node1}{eNRHSjwxR8q2PVTK4_mrBA}{2jHq-9pJQUWwi_jjI8Ua7A}{192.168.0.3}{192.168.0.3:9300}]; nested: IndexShardRecoveryException[failed to fetch index version after copying it over]; nested: CorruptIndexException[failed engine (reason: [corrupt file (source: [index])]) (resource=preexisting_corruption)]; nested: IOException[failed engine (reason: [corrupt file (source: [index])])]; nested: CorruptIndexException[checksum 
failed (hardware problem?) : expected=28a6cb55 actual=1cda6a0d (resource=BufferedChecksumIndexInput(MMapIndexInput(path=\"/opt/elasticsearch-5.5.1-localhost/data/nodes/0/indices/qSez5KGrS_ONzUedR_SShA/1/index/_5ww.cfs\") [slice=_5ww.fdt]))]; ",
                  "allocation_status" : "no_valid_shard_copy"
                }
              },

```

I know my index file has damaged , is there a way to repair it ? Or if i just don't need this corrupt file anymore, is there a way to recovery this index and put my cluster in yellow state.

```auto
PS:my ES cluster has only one node and i'm using ES 5.5.1 with SearchGuard

```

Thanks in advance!

---

<div class="post-metadata">

### Author: ![law](https://avatars.discourse-cdn.com/v4/letter/l/4af34b/32.png) [@law](https://discuss.elastic.co/u/law)
#### Post date: [March 30, 2018, 6:36am UTC](https://discuss.elastic.co/t/nested-corruptindexexception-failed-engine-reason-corrupt-file-source-index/126178/2 "2018-03-30T06:36:30Z")

</div>

This blog helps me a lot:

```auto
https://medium.com/@kyletomsik/recovering-corrupted-elasticsearch-indices-a86fede6b9c2

```

---

<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: [April 27, 2018, 6:36am UTC](https://discuss.elastic.co/t/nested-corruptindexexception-failed-engine-reason-corrupt-file-source-index/126178/3 "2018-04-27T06:36:52Z")

</div>

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