# Array index out of bound exception

**URL:** <https://discuss.elastic.co/t/array-index-out-of-bound-exception/283451>\
**Category:** Elasticsearch\
**Tags:** snapshot-and-restore\
**Created:** [September 6, 2021, 12:19pm UTC](https://discuss.elastic.co/t/array-index-out-of-bound-exception/283451 "2021-09-06T12:19:32Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![auto\_reply\_007](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@auto\_reply\_007](https://discuss.elastic.co/u/auto_reply_007)\
**Post date:** [September 6, 2021, 12:19pm UTC](https://discuss.elastic.co/t/array-index-out-of-bound-exception/283451/1 "2021-09-06T12:19:32Z")

</div>

Hello! i have snapshot repository which is located on NFS share, and i'm try to register repo from my local ES instance and got strange error

```auto
curl -X PUT "192.168.2.11:9200/_snapshot/delete_after_read?pretty" -H 'Content-Type: application/json' -d'
 {
   "type": "url",
   "settings": {
     "url": "file:/opt/elasticsearch-backup/elastique-backup"
   }
 }
 '

{
  "error" : {
    "root_cause" : [
      {
        "type" : "array_index_out_of_bounds_exception",
        "reason" : "Index 0 out of bounds for length 0"
      }
    ],
    "type" : "array_index_out_of_bounds_exception",
    "reason" : "Index 0 out of bounds for length 0"
  },
  "status" : 500
}

```

why this error occured?

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [September 6, 2021, 2:30pm UTC](https://discuss.elastic.co/t/array-index-out-of-bound-exception/283451/2 "2021-09-06T14:30:39Z")

</div>

Can you share the output of that call when adding the parameter `error_trace=true` and share the whole output in a gist?

That said, how about using the `fs` repository instead? Alternatively you may want to try `file:///opt/...` for the `url`.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 6, 2021, 11:46pm UTC](https://discuss.elastic.co/t/array-index-out-of-bound-exception/283451/3 "2021-09-06T23:46:50Z")

</div>

Shouldn't you be using;

```auto
curl -X PUT "host:9200/_snapshot/delete_after_read?pretty" -H 'Content-Type: application/json' -d'
{
  "type": "fs",
  "settings": {
    "location": "/opt/elasticsearch-backup/elastique-backup",
  }
}

```

As per [Register a snapshot repository | Elasticsearch Guide [7.14] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshots-register-repository.html#snapshots-filesystem-repository)?

---

<div class="post-metadata">

**Author:** ![auto\_reply\_007](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@auto\_reply\_007](https://discuss.elastic.co/u/auto_reply_007)\
**Post date:** [September 7, 2021, 4:50am UTC](https://discuss.elastic.co/t/array-index-out-of-bound-exception/283451/4 "2021-09-07T04:50:20Z")

</div>

With error trace enabled

```auto
 curl -X PUT "192.168.2.11:9200/_snapshot/delete_after_read?pretty&error_trace=true" -H 'Content-Type: application/json' -d'
 {
   "type": "url",
   "settings": {
     "url": "file:/opt/elasticsearch-backup/elastique-backup"
   }
 }
 '

{
  "error" : {
    "root_cause" : [
      {
        "type" : "repository_verification_exception",
        "reason" : "[delete_after_read] path is not accessible on master node",
        "stack_trace" : "RepositoryVerificationException[[delete_after_read] path is not accessible on master node]; nested: ArrayIndexOutOfBoundsException[Index 0 out of bounds for length 0];\nCaused by: java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0\n\tat org.elasticsearch.common.Numbers.bytesToLong(Numbers.java:37)\n\tat org.elasticsearch.common.Numbers.bytesToLong(Numbers.java:44)\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.readSnapshotIndexLatestBlob(BlobStoreRepository.java:2556)\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.latestIndexBlobId(BlobStoreRepository.java:2547)\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.startVerification(BlobStoreRepository.java:1648)\n\tat org.elasticsearch.repositories.RepositoriesService$4.doRun(RepositoriesService.java:392)\n\tat org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:732)\n\tat org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)\n\tat java.base/java.lang.Thread.run(Thread.java:831)\n"
      }
    ],
    "type" : "repository_verification_exception",
    "reason" : "[delete_after_read] path is not accessible on master node",
    "caused_by" : {
      "type" : "array_index_out_of_bounds_exception",
      "reason" : "Index 0 out of bounds for length 0",
      "stack_trace" : "java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0\n\tat org.elasticsearch.common.Numbers.bytesToLong(Numbers.java:37)\n\tat org.elasticsearch.common.Numbers.bytesToLong(Numbers.java:44)\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.readSnapshotIndexLatestBlob(BlobStoreRepository.java:2556)\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.latestIndexBlobId(BlobStoreRepository.java:2547)\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.startVerification(BlobStoreRepository.java:1648)\n\tat org.elasticsearch.repositories.RepositoriesService$4.doRun(RepositoriesService.java:392)\n\tat org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:732)\n\tat org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)\n\tat java.base/java.lang.Thread.run(Thread.java:831)\n"
    },
    "stack_trace" : "RepositoryVerificationException[[delete_after_read] path is not accessible on master node]; nested: ArrayIndexOutOfBoundsException[Index 0 out of bounds for length 0];\nCaused by: java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0\n\tat org.elasticsearch.common.Numbers.bytesToLong(Numbers.java:37)\n\tat org.elasticsearch.common.Numbers.bytesToLong(Numbers.java:44)\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.readSnapshotIndexLatestBlob(BlobStoreRepository.java:2556)\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.latestIndexBlobId(BlobStoreRepository.java:2547)\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.startVerification(BlobStoreRepository.java:1648)\n\tat org.elasticsearch.repositories.RepositoriesService$4.doRun(RepositoriesService.java:392)\n\tat org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:732)\n\tat org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)\n\tat java.base/java.lang.Thread.run(Thread.java:831)\n"
  },
  "status" : 500
}

```

---

<div class="post-metadata">

**Author:** ![auto\_reply\_007](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@auto\_reply\_007](https://discuss.elastic.co/u/auto_reply_007)\
**Post date:** [September 7, 2021, 5:50am UTC](https://discuss.elastic.co/t/array-index-out-of-bound-exception/283451/5 "2021-09-07T05:50:03Z")

</div>

```auto
{
  "type": "fs",
  "settings": {
    "location": "/opt/elasticsearch-backup/elastique-backup",
    "compress": true
  }
}
'
{
  "error" : {
    "root_cause" : [
      {
        "type" : "parsing_exception",
        "reason" : "Failed to parse object: expecting token of type [null] but found [VALUE_NUMBER]",
        "line" : 1,
        "col" : 9085,
        "stack_trace" : "ParsingException[Failed to parse object: expecting token of type [null] but found [VALUE_NUMBER]]\n\tat org.elasticsearch.common.xcontent.XContentParserUtils.parsingException(XContentParserUtils.java:74)\n\tat org.elasticsearch.common.xcontent.XContentParserUtils.ensureExpectedToken(XContentParserUtils.java:68)\n\tat org.elasticsearch.repositories.RepositoryData.snapshotsFromXContent(RepositoryData.java:819)\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.getRepositoryData(BlobStoreRepository.java:2099)\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.doGetRepositoryData(BlobStoreRepository.java:1906)\n\tat org.elasticsearch.action.ActionRunnable$2.doRun(ActionRunnable.java:62)\n\tat org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:732)\n\tat org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)\n\tat java.base/java.lang.Thread.run(Thread.java:831)\n"
      }
    ],
    "type" : "repository_exception",
    "reason" : "[delete_after_read] Unexpected exception when loading repository data",
    "caused_by" : {
      "type" : "parsing_exception",
      "reason" : "Failed to parse object: expecting token of type [null] but found [VALUE_NUMBER]",
      "line" : 1,
      "col" : 9085,
      "stack_trace" : "ParsingException[Failed to parse object: expecting token of type [null] but found [VALUE_NUMBER]]\n\tat org.elasticsearch.common.xcontent.XContentParserUtils.parsingException(XContentParserUtils.java:74)\n\tat org.elasticsearch.common.xcontent.XContentParserUtils.ensureExpectedToken(XContentParserUtils.java:68)\n\tat org.elasticsearch.repositories.RepositoryData.snapshotsFromXContent(RepositoryData.java:819)\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.getRepositoryData(BlobStoreRepository.java:2099)\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.doGetRepositoryData(BlobStoreRepository.java:1906)\n\tat org.elasticsearch.action.ActionRunnable$2.doRun(ActionRunnable.java:62)\n\tat org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:732)\n\tat org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)\n\tat java.base/java.lang.Thread.run(Thread.java:831)\n"
    },
    "stack_trace" : "RepositoryException[[delete_after_read] Unexpected exception when loading repository data]; nested: ParsingException[Failed to parse object: expecting token of type [null] but found [VALUE_NUMBER]];\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.doGetRepositoryData(BlobStoreRepository.java:1960)\n\tat org.elasticsearch.action.ActionRunnable$2.doRun(ActionRunnable.java:62)\n\tat org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:732)\n\tat org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)\n\tat java.base/java.lang.Thread.run(Thread.java:831)\nCaused by: ParsingException[Failed to parse object: expecting token of type [null] but found [VALUE_NUMBER]]\n\tat org.elasticsearch.common.xcontent.XContentParserUtils.parsingException(XContentParserUtils.java:74)\n\tat org.elasticsearch.common.xcontent.XContentParserUtils.ensureExpectedToken(XContentParserUtils.java:68)\n\tat org.elasticsearch.repositories.RepositoryData.snapshotsFromXContent(RepositoryData.java:819)\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.getRepositoryData(BlobStoreRepository.java:2099)\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.doGetRepositoryData(BlobStoreRepository.java:1906)\n\t... 6 more\n"
  },
  "status" : 500
}

```

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [September 7, 2021, 7:18am UTC](https://discuss.elastic.co/t/array-index-out-of-bound-exception/283451/6 "2021-09-07T07:18:32Z")

</div>

Is this repository supposed to be readonly or not? See [Register a snapshot repository | Elasticsearch Guide [7.14] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/snapshots-register-repository.html)

---

<div class="post-metadata">

**Author:** ![auto\_reply\_007](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@auto\_reply\_007](https://discuss.elastic.co/u/auto_reply_007)\
**Post date:** [September 8, 2021, 3:31am UTC](https://discuss.elastic.co/t/array-index-out-of-bound-exception/283451/7 "2021-09-08T03:31:49Z")

</div>

Yeah! it supposed to be readonly, but i have strange errors with registering

---

<div class="post-metadata">

**Author:** ![auto\_reply\_007](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@auto\_reply\_007](https://discuss.elastic.co/u/auto_reply_007)\
**Post date:** [September 8, 2021, 5:03am UTC](https://discuss.elastic.co/t/array-index-out-of-bound-exception/283451/8 "2021-09-08T05:03:04Z")

</div>

And almost same thing when i register another repository ( which located on the same NFS share )

```auto
curl -X PUT "192.168.2.11:9200/_snapshot/forteid?pretty&error_trace=true" -H 'Content-Type: application/json' -d'
> {
> "type": "url",
> "settings": {
> "url": "file:/opt/elasticsearch-backup/prod-forteid-efk-7.4.1"
> }
> }
> '
{
  "error" : {
    "root_cause" : [
      {
        "type" : "repository_exception",
        "reason" : "[forteid] Could not determine repository generation from root blobs",
        "stack_trace" : "RepositoryException[[forteid] Could not determine repository generation from root blobs]; nested: ArrayIndexOutOfBoundsException[Index 0 out of bounds for length 0];\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.doGetRepositoryData(BlobStoreRepository.java:1884)\n\tat org.elasticsearch.action.ActionRunnable$2.doRun(ActionRunnable.java:62)\n\tat org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:732)\n\tat org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)\n\tat java.base/java.lang.Thread.run(Thread.java:831)\nCaused by: java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0\n\tat org.elasticsearch.common.Numbers.bytesToLong(Numbers.java:37)\n\tat org.elasticsearch.common.Numbers.bytesToLong(Numbers.java:44)\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.readSnapshotIndexLatestBlob(BlobStoreRepository.java:2556)\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.latestIndexBlobId(BlobStoreRepository.java:2547)\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.doGetRepositoryData(BlobStoreRepository.java:1881)\n\t... 6 more\n"
      }
    ],
    "type" : "repository_exception",
    "reason" : "[forteid] Could not determine repository generation from root blobs",
    "caused_by" : {
      "type" : "array_index_out_of_bounds_exception",
      "reason" : "Index 0 out of bounds for length 0",
      "stack_trace" : "java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0\n\tat org.elasticsearch.common.Numbers.bytesToLong(Numbers.java:37)\n\tat org.elasticsearch.common.Numbers.bytesToLong(Numbers.java:44)\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.readSnapshotIndexLatestBlob(BlobStoreRepository.java:2556)\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.latestIndexBlobId(BlobStoreRepository.java:2547)\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.doGetRepositoryData(BlobStoreRepository.java:1881)\n\tat org.elasticsearch.action.ActionRunnable$2.doRun(ActionRunnable.java:62)\n\tat org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:732)\n\tat org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)\n\tat java.base/java.lang.Thread.run(Thread.java:831)\n"
    },
    "stack_trace" : "RepositoryException[[forteid] Could not determine repository generation from root blobs]; nested: ArrayIndexOutOfBoundsException[Index 0 out of bounds for length 0];\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.doGetRepositoryData(BlobStoreRepository.java:1884)\n\tat org.elasticsearch.action.ActionRunnable$2.doRun(ActionRunnable.java:62)\n\tat org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:732)\n\tat org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)\n\tat java.base/java.lang.Thread.run(Thread.java:831)\nCaused by: java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0\n\tat org.elasticsearch.common.Numbers.bytesToLong(Numbers.java:37)\n\tat org.elasticsearch.common.Numbers.bytesToLong(Numbers.java:44)\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.readSnapshotIndexLatestBlob(BlobStoreRepository.java:2556)\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.latestIndexBlobId(BlobStoreRepository.java:2547)\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.doGetRepositoryData(BlobStoreRepository.java:1881)\n\t... 6 more\n"
  },
  "status" : 500
}

```

---

<div class="post-metadata">

**Author:** ![auto\_reply\_007](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@auto\_reply\_007](https://discuss.elastic.co/u/auto_reply_007)\
**Post date:** [September 8, 2021, 3:49pm UTC](https://discuss.elastic.co/t/array-index-out-of-bound-exception/283451/9 "2021-09-08T15:49:30Z")

</div>

Guys, any ideas to fix that?

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [September 13, 2021, 2:04pm UTC](https://discuss.elastic.co/t/array-index-out-of-bound-exception/283451/10 "2021-09-13T14:04:11Z")

</div>

can you try the `file:///` suggestio I mentioned above and tell if it worked?

---

<div class="post-metadata">

**Author:** ![auto\_reply\_007](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@auto\_reply\_007](https://discuss.elastic.co/u/auto_reply_007)\
**Post date:** [September 14, 2021, 5:02am UTC](https://discuss.elastic.co/t/array-index-out-of-bound-exception/283451/11 "2021-09-14T05:02:52Z")

</div>

```auto
curl -X PUT "192.168.2.11:9200/_snapshot/delete_after_read?pretty" -H 'Content-Type: application/json' -d'
 {
   "type": "url",
   "settings": {
     "file:///": "file:/opt/elasticsearch-backup/elastique-backup"
   }
 }
 '

```

like this?

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [September 14, 2021, 7:37am UTC](https://discuss.elastic.co/t/array-index-out-of-bound-exception/283451/12 "2021-09-14T07:37:31Z")

</div>

No, not in the key, but in the value of that field.

---

<div class="post-metadata">

**Author:** ![auto\_reply\_007](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@auto\_reply\_007](https://discuss.elastic.co/u/auto_reply_007)\
**Post date:** [September 15, 2021, 3:37am UTC](https://discuss.elastic.co/t/array-index-out-of-bound-exception/283451/13 "2021-09-15T03:37:45Z")

</div>

@spinscale same error with file:///

```auto
curl -X PUT "192.168.2.11:9200/_snapshot/lento4ka?pretty&error_trace=true" -H 'Content-Type: application/json' -d'
{
  "type": "url",
  "settings": {
    "url": "file:///opt/lenta/efk-anthill-nopci-14.03.2021"
  }
}
'
{
  "error" : {
    "root_cause" : [
      {
        "type" : "repository_exception",
        "reason" : "[lento4ka] Could not determine repository generation from root blobs",
        "stack_trace" : "RepositoryException[[lento4ka] Could not determine repository generation from root blobs]; nested: ArrayIndexOutOfBoundsException[Index 0 out of bounds for length 0];\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.doGetRepositoryData(BlobStoreRepository.java:1884)\n\tat org.elasticsearch.action.ActionRunnable$2.doRun(ActionRunnable.java:62)\n\tat org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:732)\n\tat org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)\n\tat java.base/java.lang.Thread.run(Thread.java:831)\nCaused by: java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0\n\tat org.elasticsearch.common.Numbers.bytesToLong(Numbers.java:37)\n\tat org.elasticsearch.common.Numbers.bytesToLong(Numbers.java:44)\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.readSnapshotIndexLatestBlob(BlobStoreRepository.java:2556)\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.latestIndexBlobId(BlobStoreRepository.java:2547)\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.doGetRepositoryData(BlobStoreRepository.java:1881)\n\t... 6 more\n"
      }
    ],
    "type" : "repository_exception",
    "reason" : "[lento4ka] Could not determine repository generation from root blobs",
    "caused_by" : {
      "type" : "array_index_out_of_bounds_exception",
      "reason" : "Index 0 out of bounds for length 0",
      "stack_trace" : "java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0\n\tat org.elasticsearch.common.Numbers.bytesToLong(Numbers.java:37)\n\tat org.elasticsearch.common.Numbers.bytesToLong(Numbers.java:44)\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.readSnapshotIndexLatestBlob(BlobStoreRepository.java:2556)\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.latestIndexBlobId(BlobStoreRepository.java:2547)\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.doGetRepositoryData(BlobStoreRepository.java:1881)\n\tat org.elasticsearch.action.ActionRunnable$2.doRun(ActionRunnable.java:62)\n\tat org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:732)\n\tat org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)\n\tat java.base/java.lang.Thread.run(Thread.java:831)\n"
    },
    "stack_trace" : "RepositoryException[[lento4ka] Could not determine repository generation from root blobs]; nested: ArrayIndexOutOfBoundsException[Index 0 out of bounds for length 0];\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.doGetRepositoryData(BlobStoreRepository.java:1884)\n\tat org.elasticsearch.action.ActionRunnable$2.doRun(ActionRunnable.java:62)\n\tat org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:732)\n\tat org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:26)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)\n\tat java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)\n\tat java.base/java.lang.Thread.run(Thread.java:831)\nCaused by: java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0\n\tat org.elasticsearch.common.Numbers.bytesToLong(Numbers.java:37)\n\tat org.elasticsearch.common.Numbers.bytesToLong(Numbers.java:44)\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.readSnapshotIndexLatestBlob(BlobStoreRepository.java:2556)\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.latestIndexBlobId(BlobStoreRepository.java:2547)\n\tat org.elasticsearch.repositories.blobstore.BlobStoreRepository.doGetRepositoryData(BlobStoreRepository.java:1881)\n\t... 6 more\n"
  },
  "status" : 500
}

```

---

<div class="post-metadata">

**Author:** ![auto\_reply\_007](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@auto\_reply\_007](https://discuss.elastic.co/u/auto_reply_007)\
**Post date:** [September 16, 2021, 4:28am UTC](https://discuss.elastic.co/t/array-index-out-of-bound-exception/283451/14 "2021-09-16T04:28:28Z")

</div>

hi guys, any ways to solve this?

---

<div class="post-metadata">

**Author:** ![auto\_reply\_007](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@auto\_reply\_007](https://discuss.elastic.co/u/auto_reply_007)\
**Post date:** [September 22, 2021, 4:44pm UTC](https://discuss.elastic.co/t/array-index-out-of-bound-exception/283451/15 "2021-09-22T16:44:42Z")

</div>

😇 is there any solution?

---

<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:** [October 20, 2021, 4:44pm UTC](https://discuss.elastic.co/t/array-index-out-of-bound-exception/283451/16 "2021-10-20T16:44:57Z")

</div>

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