# Rollover illegal\_state\_exception and illegal\_argument\_exception

**URL:** <https://discuss.elastic.co/t/rollover-illegal-state-exception-and-illegal-argument-exception/272197>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [May 5, 2021, 1:45pm UTC](https://discuss.elastic.co/t/rollover-illegal-state-exception-and-illegal-argument-exception/272197 "2021-05-05T13:45:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dorinand](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dorinand/32/70521_2.png) [@dorinand](https://discuss.elastic.co/u/dorinand)\
**Post date:** [May 5, 2021, 1:45pm UTC](https://discuss.elastic.co/t/rollover-illegal-state-exception-and-illegal-argument-exception/272197/1 "2021-05-05T13:45:45Z")

</div>

I implemented rollover index **myapp** ant it works like a charm for a long time. Today, I find out in Kibana that two of my indices encounter errors: **2 indices have lifecycle errors**.

```
GET /_cat/aliases/myapp?v=true
alias index filter routing.index routing.search
myapp rollover-myapp-000014 - - -
myapp rollover-myapp-000015 - - -
myapp rollover-myapp-000025 - - -
myapp rollover-myapp-000026 - - -
myapp rollover-myapp-000027 - - -

```

**rollover-myapp-000014: Index lifecycle error**

`illegal_state_exception: no rollover info found for [rollover-myapp-000014] with alias [myapp], the index has not yet rolled over with that alia`

**rollover-myapp-000015: Index lifecycle error**  
illegal\_argument\_exception: index [myapp] is not the write index for alias [rollover-myapp-000015]

The rollover process continues without problem, there were created more rollover indices and currently there were **25** and **26**. I forced rollover with rollover api and create **27** just to be sure, no more errors will occur - it is ok.

**QUESTIONS:**

1. what this errors means, why this errors occours and why the rollover process continuous without problem?
2. how can I fix this indices to be managed by ILM?

Sometimes, rollover indices are stucked but **retry lifecycle step** can fix it immediatelly.

I found similar issue [here](https://github.com/elastic/elasticsearch/issues/49413):

```auto
POST _ilm/move/my-index-000001
{
  "current_step": { 
    "phase": "hot",
    "action": "rollover",
    "name": "ERROR"
  },
  "next_step": { 
    "phase": "hot",
    "action": "rollover",
    "name": "set-indexing-complete"
  }
}

```

But I am not sure what **name** key in **current\_step** and **next\_step** means. I tried it:

```auto
POST _ilm/move/rollover-myapp-000014
{
  "current_step": { 
    "phase": "hot",
    "action": "rollover",
    "name": "ERROR"
  },
  "next_step": { 
    "phase": "warm",
    "action": "forcemerge",
    "name": "set-indexing-complete"
  }
}

```

I have warm phase in **my-rollover** policy but ends up with error:

```auto
{
  "error": {
    "root_cause": [
      {
        "type": "remote_transport_exception",
        "reason": "[elasticsearch][10.0.7.231:9300][cluster:admin/ilm/_move/post]"
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "step [{\"phase\":\"warm\",\"action\":\"forcemerge\",\"name\":\"set-indexing-complete\"}] for index [rollover-myapp-000014] with policy [my-rollover] does not exist"
  },
  "status": 400
}

```

Elasticsearch: **v6.7.1**

---

<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 2, 2021, 1:46pm UTC](https://discuss.elastic.co/t/rollover-illegal-state-exception-and-illegal-argument-exception/272197/2 "2021-06-02T13:46:36Z")

</div>

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