# IndexShardGatewaySnapshotFailedException caused by  StringIndexOutOfBoundsException during indexing

**URL:** <https://discuss.elastic.co/t/indexshardgatewaysnapshotfailedexception-caused-by-stringindexoutofboundsexception-during-indexing/3167>\
**Category:** Elasticsearch\
**Created:** [July 29, 2010, 5:52am UTC](https://discuss.elastic.co/t/indexshardgatewaysnapshotfailedexception-caused-by-stringindexoutofboundsexception-during-indexing/3167 "2010-07-29T05:52:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Franz\_Allan\_Valencia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/franz_allan_valencia/32/3326_2.png) [@Franz\_Allan\_Valencia](https://discuss.elastic.co/u/Franz_Allan_Valencia)\
**Post date:** [July 29, 2010, 5:52am UTC](https://discuss.elastic.co/t/indexshardgatewaysnapshotfailedexception-caused-by-stringindexoutofboundsexception-during-indexing/3167/1 "2010-07-29T05:52:23Z")

</div>

While indexing, I sometimes get this, and once this happens, my log will be  
full of this, and my indexing will slow down significantly (using  
elasticsearch 0.9.0).

What does this mean and how can I fix it?

[14:49:43,014][WARN][index.gateway] [Slade, Frederick]  
[application][1] failed to snapshot (scheduled)  
org.elasticsearch.index.gateway.IndexShardGatewaySnapshotFailedException:  
[application][1] Failed to snapshot  
at  
org.elasticsearch.index.gateway.IndexShardGatewayService.snapshot(IndexShardGatewayService.java:243)  
at  
org.elasticsearch.index.gateway.IndexShardGatewayService$SnapshotRunnable.run(IndexShardGatewayService.java:295)  
at  
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)  
at  
java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)  
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)  
at  
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)  
at  
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)  
at  
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)  
at java.lang.Thread.run(Thread.java:619)  
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of  
range: 32  
at java.lang.String.checkBounds(String.java:401)  
at java.lang.String.(String.java:482)  
at org.elasticsearch.common.Digest.md5HexFromByteArray(Digest.java:210)  
at  
org.elasticsearch.index.gateway.blobstore.BlobStoreIndexShardGateway.buildVirtualBlobs(BlobStoreIndexShardGateway.java:760)  
at  
org.elasticsearch.index.gateway.blobstore.BlobStoreIndexShardGateway.snapshot(BlobStoreIndexShardGateway.java:167)  
at  
org.elasticsearch.index.gateway.IndexShardGatewayService$2.snapshot(IndexShardGatewayService.java:211)  
at  
org.elasticsearch.index.gateway.IndexShardGatewayService$2.snapshot(IndexShardGatewayService.java:206)  
at  
org.elasticsearch.index.engine.robin.RobinEngine.snapshot(RobinEngine.java:412)  
at  
org.elasticsearch.index.shard.service.InternalIndexShard.snapshot(InternalIndexShard.java:378)  
at  
org.elasticsearch.index.gateway.IndexShardGatewayService.snapshot(IndexShardGatewayService.java:206)

## Thanks,

Franz Allan Valencia See | Java Software Engineer  
[franz.see@gmail.com](mailto:franz.see@gmail.com)  
LinkedIn: [http://www.linkedin.com/in/franzsee](http://www.linkedin.com/in/franzsee)  
Twitter: [http://www.twitter.com/franz\_see](http://www.twitter.com/franz_see)

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [July 29, 2010, 12:11pm UTC](https://discuss.elastic.co/t/indexshardgatewaysnapshotfailedexception-caused-by-stringindexoutofboundsexception-during-indexing/3167/2 "2010-07-29T12:11:50Z")

</div>

Hi,

Seems like the md5 was not written properly beforehand, and the gateway  
should simple ignore it, but it doesn't (it ignores io based exceptions, not  
cases when the size read is not enough). Pushed a fix for it to master.  
Which gateway are you using?

-shay.banon

On Thu, Jul 29, 2010 at 8:52 AM, Franz Allan Valencia See \<  
[franz.see@gmail.com](mailto:franz.see@gmail.com)\> wrote:

> While indexing, I sometimes get this, and once this happens, my log will be  
> full of this, and my indexing will slow down significantly (using  
> elasticsearch 0.9.0).
> 
> What does this mean and how can I fix it?
> 
> [14:49:43,014][WARN][index.gateway] [Slade, Frederick]  
> [application][1] failed to snapshot (scheduled)  
> org.elasticsearch.index.gateway.IndexShardGatewaySnapshotFailedException:  
> [application][1] Failed to snapshot  
> at  
> org.elasticsearch.index.gateway.IndexShardGatewayService.snapshot(IndexShardGatewayService.java:243)  
> at  
> org.elasticsearch.index.gateway.IndexShardGatewayService$SnapshotRunnable.run(IndexShardGatewayService.java:295)  
> at  
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)  
> at  
> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)  
> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)  
> at  
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)  
> at  
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)  
> at  
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)  
> at  
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)  
> at  
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)  
> at java.lang.Thread.run(Thread.java:619)  
> Caused by: java.lang.StringIndexOutOfBoundsException: String index out of  
> range: 32  
> at java.lang.String.checkBounds(String.java:401)  
> at java.lang.String.(String.java:482)  
> at org.elasticsearch.common.Digest.md5HexFromByteArray(Digest.java:210)  
> at  
> org.elasticsearch.index.gateway.blobstore.BlobStoreIndexShardGateway.buildVirtualBlobs(BlobStoreIndexShardGateway.java:760)  
> at  
> org.elasticsearch.index.gateway.blobstore.BlobStoreIndexShardGateway.snapshot(BlobStoreIndexShardGateway.java:167)  
> at  
> org.elasticsearch.index.gateway.IndexShardGatewayService$2.snapshot(IndexShardGatewayService.java:211)  
> at  
> org.elasticsearch.index.gateway.IndexShardGatewayService$2.snapshot(IndexShardGatewayService.java:206)  
> at  
> org.elasticsearch.index.engine.robin.RobinEngine.snapshot(RobinEngine.java:412)  
> at  
> org.elasticsearch.index.shard.service.InternalIndexShard.snapshot(InternalIndexShard.java:378)  
> at  
> org.elasticsearch.index.gateway.IndexShardGatewayService.snapshot(IndexShardGatewayService.java:206)
> 
> ## Thanks,
> 
> Franz Allan Valencia See | Java Software Engineer  
> [franz.see@gmail.com](mailto:franz.see@gmail.com)  
> LinkedIn: [http://www.linkedin.com/in/franzsee](http://www.linkedin.com/in/franzsee)  
> Twitter: [http://www.twitter.com/franz\_see](http://www.twitter.com/franz_see)

---

<div class="post-metadata">

**Author:** ![Franz\_Allan\_Valencia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/franz_allan_valencia/32/3326_2.png) [@Franz\_Allan\_Valencia](https://discuss.elastic.co/u/Franz_Allan_Valencia)\
**Post date:** [July 29, 2010, 2:31pm UTC](https://discuss.elastic.co/t/indexshardgatewaysnapshotfailedexception-caused-by-stringindexoutofboundsexception-during-indexing/3167/3 "2010-07-29T14:31:28Z")

</div>

hdfs gateway

On Thu, Jul 29, 2010 at 8:11 PM, Shay Banon [shay.banon@elasticsearch.com](mailto:shay.banon@elasticsearch.com)wrote:

> Hi,
> 
> Seems like the md5 was not written properly beforehand, and the gateway  
> should simple ignore it, but it doesn't (it ignores io based exceptions, not  
> cases when the size read is not enough). Pushed a fix for it to master.  
> Which gateway are you using?
> 
> -shay.banon
> 
> On Thu, Jul 29, 2010 at 8:52 AM, Franz Allan Valencia See \<  
> [franz.see@gmail.com](mailto:franz.see@gmail.com)\> wrote:
> 
> > While indexing, I sometimes get this, and once this happens, my log will  
> > be full of this, and my indexing will slow down significantly (using  
> > elasticsearch 0.9.0).
> > 
> > What does this mean and how can I fix it?
> > 
> > [14:49:43,014][WARN][index.gateway] [Slade, Frederick]  
> > [application][1] failed to snapshot (scheduled)  
> > org.elasticsearch.index.gateway.IndexShardGatewaySnapshotFailedException:  
> > [application][1] Failed to snapshot  
> > at  
> > org.elasticsearch.index.gateway.IndexShardGatewayService.snapshot(IndexShardGatewayService.java:243)  
> > at  
> > org.elasticsearch.index.gateway.IndexShardGatewayService$SnapshotRunnable.run(IndexShardGatewayService.java:295)  
> > at  
> > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)  
> > at  
> > java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)  
> > at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)  
> > at  
> > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)  
> > at  
> > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)  
> > at  
> > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)  
> > at  
> > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)  
> > at  
> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)  
> > at java.lang.Thread.run(Thread.java:619)  
> > Caused by: java.lang.StringIndexOutOfBoundsException: String index out of  
> > range: 32  
> > at java.lang.String.checkBounds(String.java:401)  
> > at java.lang.String.(String.java:482)  
> > at  
> > org.elasticsearch.common.Digest.md5HexFromByteArray(Digest.java:210)  
> > at  
> > org.elasticsearch.index.gateway.blobstore.BlobStoreIndexShardGateway.buildVirtualBlobs(BlobStoreIndexShardGateway.java:760)  
> > at  
> > org.elasticsearch.index.gateway.blobstore.BlobStoreIndexShardGateway.snapshot(BlobStoreIndexShardGateway.java:167)  
> > at  
> > org.elasticsearch.index.gateway.IndexShardGatewayService$2.snapshot(IndexShardGatewayService.java:211)  
> > at  
> > org.elasticsearch.index.gateway.IndexShardGatewayService$2.snapshot(IndexShardGatewayService.java:206)  
> > at  
> > org.elasticsearch.index.engine.robin.RobinEngine.snapshot(RobinEngine.java:412)  
> > at  
> > org.elasticsearch.index.shard.service.InternalIndexShard.snapshot(InternalIndexShard.java:378)  
> > at  
> > org.elasticsearch.index.gateway.IndexShardGatewayService.snapshot(IndexShardGatewayService.java:206)
> > 
> > ## Thanks,
> > 
> > Franz Allan Valencia See | Java Software Engineer  
> > [franz.see@gmail.com](mailto:franz.see@gmail.com)  
> > LinkedIn: [http://www.linkedin.com/in/franzsee](http://www.linkedin.com/in/franzsee)  
> > Twitter: [http://www.twitter.com/franz\_see](http://www.twitter.com/franz_see)

--  
Franz Allan Valencia See | Java Software Engineer  
[franz.see@gmail.com](mailto:franz.see@gmail.com)  
LinkedIn: [http://www.linkedin.com/in/franzsee](http://www.linkedin.com/in/franzsee)  
Twitter: [http://www.twitter.com/franz\_see](http://www.twitter.com/franz_see)

---

<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, 4:21am UTC](https://discuss.elastic.co/t/indexshardgatewaysnapshotfailedexception-caused-by-stringindexoutofboundsexception-during-indexing/3167/4 "2017-07-06T04:21:26Z")

</div>

Closed on July 6, 2017, 4:21am UTC


