# How to recover from IndexCorruptedException?

**URL:** https://discuss.elastic.co/t/how-to-recover-from-indexcorruptedexception/20929
**Category:** Elasticsearch
**Created:** [November 25, 2014, 8:11am UTC](https://discuss.elastic.co/t/how-to-recover-from-indexcorruptedexception/20929 "2014-11-25T08:11:48Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![msbreuer](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@msbreuer](https://discuss.elastic.co/u/msbreuer)
#### Post date: [November 25, 2014, 8:11am UTC](https://discuss.elastic.co/t/how-to-recover-from-indexcorruptedexception/20929/1 "2014-11-25T08:11:48Z")

</div>

Some shards on my ES-Instance get an IndexCorruptedException. I assume this  
was caused by java 1.7u51, which may cause such issues. But how to recover  
from this corrupted shard? The currently affected shards seems endless to  
be recovered and the ES-logs grow up to several megabytes of size. I assume  
the data within tha affected shards is lost. But how to delete the affected  
shards?

regards,  
markus

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/9af4e6f5-509c-42fe-86c1-430170c0366b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9af4e6f5-509c-42fe-86c1-430170c0366b%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)
#### Post date: [November 25, 2014, 8:25am UTC](https://discuss.elastic.co/t/how-to-recover-from-indexcorruptedexception/20929/2 "2014-11-25T08:25:50Z")

</div>

Can you post more information about the IndexCorruptedException, stacktrace,  
or reproduction?

Where did you get the information that 7u51 produces  
IndexCorruptedException?

Jörg

On Tue, Nov 25, 2014 at 9:11 AM, [msbreuer@gmail.com](mailto:msbreuer@gmail.com) wrote:

> Some shards on my ES-Instance get an IndexCorruptedException. I assume  
> this was caused by java 1.7u51, which may cause such issues. But how to  
> recover from this corrupted shard? The currently affected shards seems  
> endless to be recovered and the ES-logs grow up to several megabytes of  
> size. I assume the data within tha affected shards is lost. But how to  
> delete the affected shards?
> 
> regards,  
> markus
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/9af4e6f5-509c-42fe-86c1-430170c0366b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9af4e6f5-509c-42fe-86c1-430170c0366b%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/9af4e6f5-509c-42fe-86c1-430170c0366b%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/9af4e6f5-509c-42fe-86c1-430170c0366b%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoEovJ82ybJh2%3DpYXw8KcKFi7ATVozGghkTTn655LR8agg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoEovJ82ybJh2%3DpYXw8KcKFi7ATVozGghkTTn655LR8agg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![msbreuer](https://avatars.discourse-cdn.com/v4/letter/m/7c8e57/32.png) [@msbreuer](https://discuss.elastic.co/u/msbreuer)
#### Post date: [November 25, 2014, 10:22am UTC](https://discuss.elastic.co/t/how-to-recover-from-indexcorruptedexception/20929/3 "2014-11-25T10:22:43Z")

</div>

> Can you post more information about the IndexCorruptedException, stacktrace,  
> or reproduction?

I have to correct me: CorruptIndexException

[2014-11-21 20:15:44,225][WARN][cluster.action.shard] [isetta]  
[XXXXX][2] received shard failed for [ips-mac-mips-mac-k01-2014.08][2],  
node[KjJsJYd8TXShEgm1S25\_Zw], [R], s[INITIALIZING], indexUUID  
[onrMITrgRTyIDc4RL-p8xQ], reason [engine failure, message [corrupted  
preexisting index][CorruptIndexException[[XXXXX][2] Preexisting corrupted  
index [corrupted\_aPP4lMokQsKstBqLfYTTTA] caused by:  
CorruptIndexException[checksum failed (hardware problem?) : expected=uhifyc  
actual=drw2lb (resource=name [\_rgh\_es090\_0.pos], length [142663622],  
checksum [uhifyc], writtenBy [4.10.2])]  
org.apache.lucene.index.CorruptIndexException: checksum failed (hardware  
problem?) : expected=uhifyc actual=drw2lb (resource=name  
[\_rgh\_es090\_0.pos], length [142663622], checksum [uhifyc], writtenBy  
[4.10.2])  
at  
org.elasticsearch.index.store.Store$VerifyingIndexOutput.readAndCompareChecksum(Store.java:882)  
at  
org.elasticsearch.index.store.Store$VerifyingIndexOutput.writeBytes(Store.java:894)  
at  
org.elasticsearch.indices.recovery.RecoveryTarget$FileChunkTransportRequestHandler.messageReceived(RecoveryTarget.java:591)  
at  
org.elasticsearch.indices.recovery.RecoveryTarget$FileChunkTransportRequestHandler.messageReceived(RecoveryTarget.java:535)  
at  
org.elasticsearch.transport.netty.MessageChannelHandler$RequestHandler.run(MessageChannelHandler.java:275)  
at  
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)  
at java.lang.Thread.run(Thread.java:745)  
]]]

> Where did you get the information that 7u51 produces  
> IndexCorruptedException?

Take a look at here: [JavaBugs - Apache Lucene (Java) - Apache Software Foundation](http://wiki.apache.org/lucene-java/JavaBugs)

especially to [[LUCENE-5212] java 7u40 causes sigsegv and corrupt term vectors - ASF JIRA](https://issues.apache.org/jira/browse/LUCENE-5212)

> Jörg
> 
> On Tue, Nov 25, 2014 at 9:11 AM, \<[msbr...@gmail.com](mailto:msbr...@gmail.com) \<javascript:\>\> wrote:
> 
> > Some shards on my ES-Instance get an IndexCorruptedException. I assume  
> > this was caused by java 1.7u51, which may cause such issues. But how to  
> > recover from this corrupted shard? The currently affected shards seems  
> > endless to be recovered and the ES-logs grow up to several megabytes of  
> > size. I assume the data within tha affected shards is lost. But how to  
> > delete the affected shards?
> > 
> > regards,  
> > markus
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/9af4e6f5-509c-42fe-86c1-430170c0366b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9af4e6f5-509c-42fe-86c1-430170c0366b%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/9af4e6f5-509c-42fe-86c1-430170c0366b%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/9af4e6f5-509c-42fe-86c1-430170c0366b%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/ae85a983-19af-4d49-8e32-88dc1c214289%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ae85a983-19af-4d49-8e32-88dc1c214289%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 12:47am UTC](https://discuss.elastic.co/t/how-to-recover-from-indexcorruptedexception/20929/4 "2017-07-06T00:47:48Z")

</div>


