# Getting 404 shard\_not\_found\_exception frequently

**URL:** <https://discuss.elastic.co/t/getting-404-shard-not-found-exception-frequently/245033>\
**Category:** Elasticsearch\
**Created:** [August 14, 2020, 2:56pm UTC](https://discuss.elastic.co/t/getting-404-shard-not-found-exception-frequently/245033 "2020-08-14T14:56:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ravib](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ravib/32/73896_2.png) [@ravib](https://discuss.elastic.co/u/ravib)\
**Post date:** [August 14, 2020, 2:56pm UTC](https://discuss.elastic.co/t/getting-404-shard-not-found-exception-frequently/245033/1 "2020-08-14T14:56:19Z")

</div>

I have an index with 2 replicas and 1 shard on a 3 node elastic search server (7.6.1). On bulk requests (index) I keep getting shard\_not\_found\_exception, any thoughts?

---

<div class="post-metadata">

**Author:** ![Charele](https://avatars.discourse-cdn.com/v4/letter/c/90db22/32.png) [@Charele](https://discuss.elastic.co/u/Charele)\
**Post date:** [August 15, 2020, 3:48am UTC](https://discuss.elastic.co/t/getting-404-shard-not-found-exception-frequently/245033/2 "2020-08-15T03:48:24Z")

</div>

How about health of you cluster?

I think, you can decrease you replicas of this index to 0,and test the bulk  
(if it's okay, restore the replicas to 2)

---

<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:** [August 16, 2020, 9:51pm UTC](https://discuss.elastic.co/t/getting-404-shard-not-found-exception-frequently/245033/3 "2020-08-16T21:51:12Z")

</div>

It'd be helpful if you shared the log that contains this error.

---

<div class="post-metadata">

**Author:** ![ravib](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ravib/32/73896_2.png) [@ravib](https://discuss.elastic.co/u/ravib)\
**Post date:** [August 18, 2020, 3:06pm UTC](https://discuss.elastic.co/t/getting-404-shard-not-found-exception-frequently/245033/4 "2020-08-18T15:06:28Z")

</div>

This happens once every few months, so I usually end up creating a new index and move all the data into it, which fixes it.

@Charele cluster health is good (green), I tried bulk request and also \_reindex API with zero replicas, it worked fine, it fails randomly

@warkolm this is the response from the bulk request  
`{"_index":"xxx","_type":"_doc","_id":"xxx","status":404,"error":{"type":"shard_not_found_exception","reason":"no such shard","index_uuid":"xxx","shard":"2","index":"xxx"}}`

I have not seen anything specific for this in logs, but I had another frequent issue (which I fixed), do you this could have caused it?

```
Caused by: java.lang.IllegalArgumentException: Field [xxx] of type [dense_ve
ctor] of doc [xxx] has number of dimensions [0] l
ess than defined in the mapping [40]

[2020-08-13T16:42:26,418][DEBUG][o.e.a.b.TransportShardBulkAction] [elastic7-03] [index_name][0] failed to execute bulk item (index) index {[index_name][_doc][doc_id], source[n/a, actual length: [2.5kb], max length: 2kb]}
```

---

<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:** [September 15, 2020, 3:06pm UTC](https://discuss.elastic.co/t/getting-404-shard-not-found-exception-frequently/245033/5 "2020-09-15T15:06:56Z")

</div>

Closed on September 15, 2020, 3:06pm UTC

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