# IndexOutofBound Exception and Merge Exception

**URL:** https://discuss.elastic.co/t/indexoutofbound-exception-and-merge-exception/51297
**Category:** Elasticsearch
**Created:** [May 30, 2016, 9:26am UTC](https://discuss.elastic.co/t/indexoutofbound-exception-and-merge-exception/51297 "2016-05-30T09:26:35Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![moni15moni](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/moni15moni/32/42311_2.png) [@moni15moni](https://discuss.elastic.co/u/moni15moni)
#### Post date: [May 30, 2016, 9:26am UTC](https://discuss.elastic.co/t/indexoutofbound-exception-and-merge-exception/51297/1 "2016-05-30T09:26:35Z")

</div>

Hi Team.

I am getting following exception in the elasticsearch.log file while running the elastics search instance continously, I am running in elasticsearch-1.7.4 .

[hids\_5][4] received shard failed for [hids\_5][4], node[LwDQMJXQQgy00\_bpwlJGUw], [P], s[STARTED], indexUUID [VoFsBj7CTPOlJFZ\_kma2KQ], reason [shard failure [engine failure, reason [corrupt file detected source: [merge]]][MergeException[org.apache.lucene.index.CorruptIndexException: codec footer mismatch: actual footer=-2078209982 vs expected footer=-1071082520 (resource: MMapIndexInput(path="/data03/ESData/elasticsearch/nodes/0/indices/hids\_5/4/index/\_4u9f3.cfs"))]; nested: CorruptIndexException[codec footer mismatch: actual footer=-2078209982 vs expected footer=-1071082520 (resource: MMapIndexInput(path="/data03/ESData/elasticsearch/nodes/0/indices/hids\_5/4/index/\_4u9f3.cfs"))]; ]]

[2016-05-30 08:39:18,586][INFO][index.engine] [10.123.159.35] [hids\_5][0] now throttling indexing: numMergesInFlight=4, maxNumMerges=3  
[2016-05-30 08:39:18,651][INFO][index.engine] [10.123.159.35] [hids\_5][0] stop throttling indexing: numMergesInFlight=2, maxNumMerges=3  
[2016-05-30 08:41:21,156][WARN][cluster.action.shard] [10.123.159.35] [utm\_4][2] received shard failed for [utm\_4][2], node[LwDQMJXQQgy00\_bpwlJGUw], [P], s[STARTED], indexUUID [bfIraG2wROCqIlt31qcQKw], reason [shard failure [engine failure, reason [merge exception]][MergeException[java.lang.ArrayIndexOutOfBoundsException]; nested: ArrayIndexOutOfBoundsException; ]]

My question was, the index getting failed because of any I/O Related issues.?  
why the Arrayindex Out of Exception is occured nay thing we have to tune in Server Side?

Thanks  
Moni  
Is there any prevention these kind ofcorruption.?

---

<div class="post-metadata">

### Author: ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)
#### Post date: [May 30, 2016, 1:30pm UTC](https://discuss.elastic.co/t/indexoutofbound-exception-and-merge-exception/51297/2 "2016-05-30T13:30:22Z")

</div>

The corruption exception suggests that one of the index files has been modified since it was first created by Lucene (index files are write-once). Maybe you should check your disk?

> [@moni15moni](#):
>
> Is there any prevention these kind ofcorruption.?

There is not much that can be done if the disk got corrupted or if a malicious program modified the content of the index files. For the record, recent versions of elasticsearch tend to detect corruption earlier.

---

<div class="post-metadata">

### Author: ![moni15moni](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/moni15moni/32/42311_2.png) [@moni15moni](https://discuss.elastic.co/u/moni15moni)
#### Post date: [May 30, 2016, 4:44pm UTC](https://discuss.elastic.co/t/indexoutofbound-exception-and-merge-exception/51297/3 "2016-05-30T16:44:00Z")

</div>

Thanks Adrien ...

---

<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 5, 2017, 10:47pm UTC](https://discuss.elastic.co/t/indexoutofbound-exception-and-merge-exception/51297/4 "2017-07-05T22:47:56Z")

</div>


