# Elasticsearch Closing Index after removing read-only index block followed by Restart

**URL:** <https://discuss.elastic.co/t/elasticsearch-closing-index-after-removing-read-only-index-block-followed-by-restart/259065>\
**Category:** Elasticsearch\
**Created:** [December 18, 2020, 7:31am UTC](https://discuss.elastic.co/t/elasticsearch-closing-index-after-removing-read-only-index-block-followed-by-restart/259065 "2020-12-18T07:31:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dbakti7](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dbakti7/32/42250_2.png) [@dbakti7](https://discuss.elastic.co/u/dbakti7)\
**Post date:** [December 18, 2020, 7:31am UTC](https://discuss.elastic.co/t/elasticsearch-closing-index-after-removing-read-only-index-block-followed-by-restart/259065/1 "2020-12-18T07:31:47Z")

</div>

Hi,

We are on Elasticsearch 6.0 and we need help on the following scenario:

1. Index A is in "Open" state
2. Elasticsearch crossed flood\_stage watermark, Index A got read-only index block
3. Resolve flood\_stage watermark, Remove read-only index block from index A by setting

```auto
    {
      "index.blocks.read_only_allow_delete": null
    }

```

1. Index A is still in "Open" state
2. Restart Elasticsearch
3. Index A is closed when Elasticsearch is back online

We want to confirm whether this is the expected behavior, and if there is any way to avoid this auto-close behavior.

Thank you!

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [December 18, 2020, 9:43am UTC](https://discuss.elastic.co/t/elasticsearch-closing-index-after-removing-read-only-index-block-followed-by-restart/259065/2 "2020-12-18T09:43:29Z")

</div>

> [@dbakti7](#):
>
> We are on Elasticsearch 6.0

You really should upgrade as a matter of urgency. That version is ancient, it reached the [end of its supported life](https://www.elastic.co/support/eol) 18 months ago. In more recent versions the `read_only_allow_delete` block is removed automatically.

> [@dbakti7](#):
>
> We want to confirm whether this is the expected behavior, and if there is any way to avoid this auto-close behavior.

I don't think you are describing what you saw accurately. Elasticsearch doesn't auto-close indices. What makes you think it was closed?

---

<div class="post-metadata">

**Author:** ![dbakti7](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dbakti7/32/42250_2.png) [@dbakti7](https://discuss.elastic.co/u/dbakti7)\
**Post date:** [December 18, 2020, 3:41pm UTC](https://discuss.elastic.co/t/elasticsearch-closing-index-after-removing-read-only-index-block-followed-by-restart/259065/3 "2020-12-18T15:41:29Z")

</div>

Yes, migration plan is ongoing 🙂

> [@DavidTurner](#):
>
> In more recent versions the `read_only_allow_delete` block is removed automatically.

Awesome!

> [@DavidTurner](#):
>
> I don't think you are describing what you saw accurately. Elasticsearch doesn't auto-close indices. What makes you think it was closed?

Well, upon ES startup, the index is in "Closed" state.  
I guess for now we will just avoid doing Elasticsearch restart and watch closely on this behavior until we upgraded to ES7.

Thanks for the input!

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [December 18, 2020, 3:49pm UTC](https://discuss.elastic.co/t/elasticsearch-closing-index-after-removing-read-only-index-block-followed-by-restart/259065/4 "2020-12-18T15:49:54Z")

</div>

> [@dbakti7](#):
>
> Well, upon ES startup, the index is in "Closed" state.

Where are you seeing this, though? Can you share the API request that gives you this information, and the response?

---

<div class="post-metadata">

**Author:** ![dbakti7](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dbakti7/32/42250_2.png) [@dbakti7](https://discuss.elastic.co/u/dbakti7)\
**Post date:** [December 18, 2020, 4:40pm UTC](https://discuss.elastic.co/t/elasticsearch-closing-index-after-removing-read-only-index-block-followed-by-restart/259065/5 "2020-12-18T16:40:02Z")

</div>

I'm using cat API, i.e. GET /\_cat/indices

---

<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:** [January 15, 2021, 4:40pm UTC](https://discuss.elastic.co/t/elasticsearch-closing-index-after-removing-read-only-index-block-followed-by-restart/259065/6 "2021-01-15T16:40:16Z")

</div>

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