org.apache.lucene.index.CorruptIndexException: codec footer mismatch (file truncated?)

ES version: 5.6.8
1 master, 3 data nodes, replica = 0

Hi everyone,

I was wondering if it's possible to recover the data with the exception in this case?

Caused by: org.elasticsearch.gateway.CorruptStateException: org.apache.lucene.index.CorruptIndexException: codec footer mismatch (file truncated?): actual footer=1952260187 vs expected footer=-1071082520 (resource=BufferedChecksumIndexInput(SimpleFSIndexInput(path="Z:\es\es3\data\nodes\0\indices\C0Vq5v8NSnKUzV-BqybsIg\_state\state-79.st")))
	at org.elasticsearch.gateway.MetaDataStateFormat.read(MetaDataStateFormat.java:207) ~[elasticsearch-5.6.8.jar:5.6.8]
	at org.elasticsearch.gateway.MetaDataStateFormat.loadLatestState(MetaDataStateFormat.java:322) ~[elasticsearch-5.6.8.jar:5.6.8]
	... 37 more
Caused by: org.apache.lucene.index.CorruptIndexException: codec footer mismatch (file truncated?): actual footer=1952260187 vs expected footer=-1071082520 (resource=BufferedChecksumIndexInput(SimpleFSIndexInput(path="Z:\es\es3\data\nodes\0\indices\C0Vq5v8NSnKUzV-BqybsIg\_state\state-79.st")))
	at org.apache.lucene.codecs.CodecUtil.validateFooter(CodecUtil.java:502) ~[lucene-core-6.6.1.jar:6.6.1 9aa465a89b64ff2dabe7b4d50c472de32c298683 - varunthacker - 2017-08-29 21:54:39]
	at org.apache.lucene.codecs.CodecUtil.checkFooter(CodecUtil.java:414) ~[lucene-core-6.6.1.jar:6.6.1 9aa465a89b64ff2dabe7b4d50c472de32c298683 - varunthacker - 2017-08-29 21:54:39]
	at org.apache.lucene.codecs.CodecUtil.checksumEntireFile(CodecUtil.java:526) ~[lucene-core-6.6.1.jar:6.6.1 9aa465a89b64ff2dabe7b4d50c472de32c298683 - varunthacker - 2017-08-29 21:54:39]
	at org.elasticsearch.gateway.MetaDataStateFormat.read(MetaDataStateFormat.java:189) ~[elasticsearch-5.6.8.jar:5.6.8]
	at org.elasticsearch.gateway.MetaDataStateFormat.loadLatestState(MetaDataStateFormat.java:322) ~[elasticsearch-5.6.8.jar:5.6.8]

No, sadly this means it is unrecoverable. By default Elasticsearch would recover it from a replica, but you have disabled this option. Your best bet is to restore it from a recent snapshot.

Hi David,

Thank you for the response, I will try to recover from the snapshot :slight_smile:

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