# ILM keeps losing track of indices

**URL:** https://discuss.elastic.co/t/ilm-keeps-losing-track-of-indices/284055
**Category:** Elasticsearch
**Tags:** ilm-index-lifecycle-management
**Created:** [September 13, 2021, 10:44am UTC](https://discuss.elastic.co/t/ilm-keeps-losing-track-of-indices/284055 "2021-09-13T10:44:29Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![cawoodm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cawoodm/32/14083_2.png) [@cawoodm](https://discuss.elastic.co/u/cawoodm)
#### Post date: [September 13, 2021, 10:44am UTC](https://discuss.elastic.co/t/ilm-keeps-losing-track-of-indices/284055/1 "2021-09-13T10:44:29Z")

</div>

We keep seeing the issue described [here](https://discuss.elastic.co/t/index-lifecycle-management-does-not-point-to-index-error/211513) where Elasticsearch is not rolling over indices properly.

> [2021-09-13T12:39:16,671][ERROR][o.e.x.i.IndexLifecycleRunner] [ecom-repository01] policy [test-policy] for index [errors-test-000021] failed on step [{"phase":"hot","action":"rollover","name":"check-rollover-ready"}]. Moving to ERROR step  
> java.lang.IllegalArgumentException: index.lifecycle.rollover\_alias [errors-test] does not point to index [errors-test-000021]  
> at org.elasticsearch.xpack.core.ilm.WaitForRolloverReadyStep.evaluateCondition(WaitForRolloverReadyStep.java:104) [x-pack-core-7.7.0.jar:7.7.0]  
> at org.elasticsearch.xpack.ilm.IndexLifecycleRunner.runPeriodicStep(IndexLifecycleRunner.java:173) [x-pack-ilm-7.7.0.jar:7.7.0]  
> at org.elasticsearch.xpack.ilm.IndexLifecycleService.triggerPolicies(IndexLifecycleService.java:329) [x-pack-ilm-7.7.0.jar:7.7.0]  
> at org.elasticsearch.xpack.ilm.IndexLifecycleService.triggered(IndexLifecycleService.java:267) [x-pack-ilm-7.7.0.jar:7.7.0]  
> at org.elasticsearch.xpack.core.scheduler.SchedulerEngine.notifyListeners(SchedulerEngine.java:183) [x-pack-core-7.7.0.jar:7.7.0]

1. How can we resolve this permanently? My feeling is ILM in general is a bit flaky.
2. Is there a way to query such orphaned indices so we can re-attach them?

---

<div class="post-metadata">

### Author: ![sholzhauer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sholzhauer/32/110282_2.png) [@sholzhauer](https://discuss.elastic.co/u/sholzhauer)
#### Post date: [October 4, 2021, 7:40am UTC](https://discuss.elastic.co/t/ilm-keeps-losing-track-of-indices/284055/2 "2021-10-04T07:40:11Z")

</div>

Hi cawoodm,

This looks to me like an issue in your index templates.

Your ILM is looking for the "alias" errors-test". Meaning your index has an ILM assigned which is looking for an alias which it doesn't have.

Have a look at your index template(s) to see if the alias is assigned upon creation of the index.

---

<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: [November 1, 2021, 7:41am UTC](https://discuss.elastic.co/t/ilm-keeps-losing-track-of-indices/284055/3 "2021-11-01T07:41:03Z")

</div>

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