# IndexLifecycleRunner policy index failed on step IllegalArgumentException is not the write index for alias

**URL:** <https://discuss.elastic.co/t/indexlifecyclerunner-policy-index-failed-on-step-illegalargumentexception-is-not-the-write-index-for-alias/235286>\
**Category:** Elasticsearch\
**Created:** [June 2, 2020, 7:36am UTC](https://discuss.elastic.co/t/indexlifecyclerunner-policy-index-failed-on-step-illegalargumentexception-is-not-the-write-index-for-alias/235286 "2020-06-02T07:36:29Z")\
**Posts on this page:** 2\
**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:** [June 2, 2020, 7:36am UTC](https://discuss.elastic.co/t/indexlifecyclerunner-policy-index-failed-on-step-illegalargumentexception-is-not-the-write-index-for-alias/235286/1 "2020-06-02T07:36:29Z")

</div>

Elasticsearch (7.7) seems to be in confusion about which indices it has rolled over and is logging:

> [2020-06-02T09:23:53,425][ERROR][o.e.x.i.IndexLifecycleRunner] [ecom-repository01] policy [test-policy] for index [logs-test-000001] failed on step [{"phase":"hot","action":"rollover","name":"check-rollover-ready"}]. Moving to ERROR step  
> java.lang.IllegalArgumentException: index [logs-test-000001] is not the write index for alias [logs-test]

As you can see below it should not be rolling `logs-test-000001` over but `logs-000003`:

```json
[
    {
        "alias": "logs-test",
        "index": "logs-test-000003",
        "filter": "-",
        "routing.index": "-",
        "routing.search": "-",
        "is_write_index": "true"
    },
    {
        "alias": "logs-test",
        "index": "logs-test-000002",
        "filter": "-",
        "routing.index": "-",
        "routing.search": "-",
        "is_write_index": "false"
    },
    {
        "alias": "logs-test",
        "index": "logs-test1",
        "filter": "-",
        "routing.index": "-",
        "routing.search": "-",
        "is_write_index": "false"
    },
    {
        "alias": "logs-test",
        "index": "logs-test-000001",
        "filter": "-",
        "routing.index": "-",
        "routing.search": "-",
        "is_write_index": "false"
    }
]

```

How can we point ILM at the correct 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:** [June 30, 2020, 7:36am UTC](https://discuss.elastic.co/t/indexlifecyclerunner-policy-index-failed-on-step-illegalargumentexception-is-not-the-write-index-for-alias/235286/2 "2020-06-30T07:36:30Z")

</div>

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