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

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

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:

{
                "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.

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

Thanks in advance!

This blog helps me a lot:

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

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