# Index\_closed\_exception on open index

**URL:** <https://discuss.elastic.co/t/index-closed-exception-on-open-index/270273>\
**Category:** Elasticsearch\
**Created:** [April 15, 2021, 3:38pm UTC](https://discuss.elastic.co/t/index-closed-exception-on-open-index/270273 "2021-04-15T15:38:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![maigel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maigel/32/81104_2.png) [@maigel](https://discuss.elastic.co/u/maigel)\
**Post date:** [April 15, 2021, 3:38pm UTC](https://discuss.elastic.co/t/index-closed-exception-on-open-index/270273/1 "2021-04-15T15:38:05Z")

</div>

Hi,

We currently have a cluster with a lot of network security (Zeek) logs. I have a script written with elasticsearch-py which periodically searches all data for known IOCs (bad IPs, bad domains, etc.)

Every once in a while, the script crashes because Elasticsearch is returning an index\_closed\_exception. If I check alter with the "cat indices" API, the index shows as open.

We have an ILM in place which freezes indices older than 14 days, but it never closes them.

Could this be related to the ILM? Does it temporarily close an index when rotating or something?

---

<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:** [April 19, 2021, 11:28pm UTC](https://discuss.elastic.co/t/index-closed-exception-on-open-index/270273/2 "2021-04-19T23:28:57Z")

</div>

> [@maigel](#):
>
> Does it temporarily close an index when rotating or something?

It does not.

What is the actual response you get from Elasticsearch? Is there anything in the Elasticsearch logs that aligns with the timing of the issue?

---

<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:** [May 17, 2021, 11:29pm UTC](https://discuss.elastic.co/t/index-closed-exception-on-open-index/270273/3 "2021-05-17T23:29:02Z")

</div>

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