# Упал эластик в процессе работы с ошибкой all shards failed

**URL:** <https://discuss.elastic.co/t/all-shards-failed/256816>\
**Category:** Вопросы на русском языке\
**Created:** [November 26, 2020, 6:59pm UTC](https://discuss.elastic.co/t/all-shards-failed/256816 "2020-11-26T18:59:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![111311](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111311/32/65668_2.png) [@111311](https://discuss.elastic.co/u/111311)\
**Post date:** [November 26, 2020, 6:59pm UTC](https://discuss.elastic.co/t/all-shards-failed/256816/1 "2020-11-26T18:59:56Z")

</div>

Здравствуйте, помогите разобраться с проблемкой. У нас эластик используется для определения категории, сейчас он работал около 6 часов и вечером упал с ошибкой

```
Elasticsearch\Common\Exceptions\ServerErrorResponseException : {"error":{"root_cause":[],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[]},"status":503}

  at /var/www/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php:671
667| $exception = new NoDocumentsToGetException($exception->getMessage(), $statusCode, $exception);
668| } elseif ($statusCode === 500 && strpos($responseBody, 'NoShardAvailableActionException') !== false) {
669| $exception = new NoShardAvailableException($exception->getMessage(), $statusCode, $exception);
670| } else {
  > 671| $exception = new ServerErrorResponseException(
672| $this->convertBodyToString($responseBody, $statusCode, $exception),
673| $statusCode
674| );
675| }

```

Сейчас если попытаться запустить то выдает ошибку

`Elasticsearch\Common\Exceptions\Missing404Exception : {"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index [tender-messages]","resource.type":"index_or_alias","resource.id":"tender-messages","index_uuid":"_na_","index":"tender-messages"}],"type":"index_not_found_exception","reason":"no such index [tender-messages]","resource.type":"index_or_alias","resource.id":"tender-messages","index_uuid":"_na_","index":"tender-messages"},"status":404}`

Получается индексы слетели. Подскажите в чем может залючаться проблема и как её решить?

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [November 26, 2020, 8:06pm UTC](https://discuss.elastic.co/t/all-shards-failed/256816/2 "2020-11-26T20:06:54Z")

</div>

> [@111311](#):
>
> Получается индексы слетели. Подскажите в чем может залючаться проблема и как её решить?

Либо кто-то удалил, либо прав на них нет, либо к не тому кластеру соединяется, либо.... да куча еще причин может быть. Вы на кластер смотрели? У него как там дела со здоровьем, с индексами, и т.д.

---

<div class="post-metadata">

**Author:** ![111311](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111311/32/65668_2.png) [@111311](https://discuss.elastic.co/u/111311)\
**Post date:** [November 27, 2020, 12:56pm UTC](https://discuss.elastic.co/t/all-shards-failed/256816/4 "2020-11-27T12:56:47Z")

</div>

Просматриваю сейчас логи и наткнулся на такие вот записи

```
{"type": "server", "timestamp": "2020-11-26T17:11:24,575Z", "level": "INFO", "component": "o.e.c.m.MetaDataDeleteIndexService", "cluster.name": "es-docker-cluster", "node.name": "es", "message": "[tender-message-lots/Rd8ZRxEXRv6WWALoHz3G_w] deleting index", "cluster.uuid": "i1mV03iVRYG-qJsPWQrWXQ", "node.id": "9NCN8vv8ReqbHbvvPezODg" }
{"type": "server", "timestamp": "2020-11-26T17:11:25,290Z", "level": "INFO", "component": "o.e.c.m.MetaDataDeleteIndexService", "cluster.name": "es-docker-cluster", "node.name": "es", "message": "[tender-messages/bH8HNc40TPm121UZkc_-wg] deleting index", "cluster.uuid": "i1mV03iVRYG-qJsPWQrWXQ", "node.id": "9NCN8vv8ReqbHbvvPezODg" }

```

Это получается ктото вручную удалил индексы чтоли ? Как раз в этом время примерно он и упал вчера

---

<div class="post-metadata">

**Author:** ![111311](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/111311/32/65668_2.png) [@111311](https://discuss.elastic.co/u/111311)\
**Post date:** [November 28, 2020, 10:40am UTC](https://discuss.elastic.co/t/all-shards-failed/256816/5 "2020-11-28T10:40:28Z")

</div>

Игорь можете подсказать как закрыть удаленный доступ к эластику?

---

<div class="post-metadata">

**Author:** ![Igor\_Motov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/igor_motov/32/45193_2.png) [@Igor\_Motov](https://discuss.elastic.co/u/Igor_Motov)\
**Post date:** [November 29, 2020, 11:37pm UTC](https://discuss.elastic.co/t/all-shards-failed/256816/6 "2020-11-29T23:37:25Z")

</div>

> [@111311](#):
>
> Это получается ктото вручную удалил индексы чтоли ?

Вручную, или бот, или программа сказать сложно. Но удалили - это точно.

> [@111311](#):
>
> Игорь можете подсказать как закрыть удаленный доступ к эластику?

> **[Security overview | Elasticsearch Guide \[8.11\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/elasticsearch-security.html)**

---

<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:** [December 27, 2020, 11:37pm UTC](https://discuss.elastic.co/t/all-shards-failed/256816/7 "2020-12-27T23:37:30Z")

</div>

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