# Getting errors related to ILM

**URL:** https://discuss.elastic.co/t/getting-errors-related-to-ilm/182256
**Category:** Elasticsearch
**Tags:** curator, ilm-index-lifecycle-management
**Created:** [May 22, 2019, 2:48pm UTC](https://discuss.elastic.co/t/getting-errors-related-to-ilm/182256 "2019-05-22T14:48:40Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![dfinn](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@dfinn](https://discuss.elastic.co/u/dfinn)
#### Post date: [May 22, 2019, 2:48pm UTC](https://discuss.elastic.co/t/getting-errors-related-to-ilm/182256/1 "2019-05-22T14:48:40Z")

</div>

currently running ES 6.7.1 and we use the logstash-\* indexes

I recently setup ILM through the UI, using these settings:

> {  
> "policy": {  
> "phases": {  
> "hot": {  
> "min\_age": "0ms",  
> "actions": {  
> "rollover": {  
> "max\_age": "15d",  
> "max\_size": "50gb"  
> },  
> "set\_priority": {  
> "priority": 100  
> }  
> }  
> },  
> "delete": {  
> "min\_age": "1d",  
> "actions": {  
> "delete": {}  
> }  
> }  
> }  
> }  
> }

And I noticed in our elasticsearch logs we got the following error:

> [2019-05-22T00:16:46,994][ERROR][o.e.x.i.IndexLifecycleRunner] [qmfFc9w] policy [15-days] for index [logstash-2019.05.22] failed on step [{"phase":"hot","action":"rollover","name":"check-rollover-ready"}]. Moving to ERROR step  
> java.lang.IllegalArgumentException: setting [index.lifecycle.rollover\_alias] for index [logstash-2019.05.22] is empty or not defined  
> at org.elasticsearch.xpack.core.indexlifecycle.WaitForRolloverReadyStep.evaluateCondition(WaitForRolloverReadyStep.java:50) [x-pack-core-6.7.0.jar:6.7.0]  
> at org.elasticsearch.xpack.indexlifecycle.IndexLifecycleRunner.runPeriodicStep(IndexLifecycleRunner.java:133) [x-pack-ilm-6.7.0.jar:6.7.0]  
> at org.elasticsearch.xpack.indexlifecycle.IndexLifecycleService.triggerPolicies(IndexLifecycleService.java:250) [x-pack-ilm-6.7.0.jar:6.7.0]  
> at org.elasticsearch.xpack.indexlifecycle.IndexLifecycleService.triggered(IndexLifecycleService.java:205) [x-pack-ilm-6.7.0.jar:6.7.0]  
> at org.elasticsearch.xpack.core.scheduler.SchedulerEngine.notifyListeners(SchedulerEngine.java:168) [x-pack-core-6.7.0.jar:6.7.0]  
> at org.elasticsearch.xpack.core.scheduler.SchedulerEngine$ActiveSchedule.run(SchedulerEngine.java:196) [x-pack-core-6.7.0.jar:6.7.0]  
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0\_201]  
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0\_201]  
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0\_201]  
> at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0\_201]  
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0\_201]  
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0\_201]  
> at java.lang.Thread.run(Thread.java:748) [?:1.8.0\_201]

I think I need to set the index.lifecycle.rollover\_alias using something like the instructions here:

> **[Using policies to manage index rollover | Elasticsearch Guide \[master\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/master/using-policies-rollover.html)**

but it's not totally clear to me what the alias should be named. Any help would be much appreciated.

---

<div class="post-metadata">

### Author: ![dakrone](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dakrone/32/23351_2.png) [@dakrone](https://discuss.elastic.co/u/dakrone)
#### Post date: [May 22, 2019, 9:48pm UTC](https://discuss.elastic.co/t/getting-errors-related-to-ilm/182256/2 "2019-05-22T21:48:16Z")

</div>

Hi Daniel,

So since you are using rollover, ILM needs to know what alias to do the swap on when the new index is created. This is set in the index settings (or in the template, more likely), for example:

```auto
PUT _template/ls-template
{
  "index_patterns": ["logstash-*"],
  "settings": {
    "index.lifecycle.name": "your-policy",
    "index.lifecycle.rollover_alias": "logstash"
  }
}

```

So any index that is created starting with `logstash-` will automatically use your policy.

Next, you'll need to create the very first index and the alias, to kick things off:

```auto
PUT /logstash-000001
{
  "aliases": {
    "logstash":{
      "is_write_index": true
    }
  }
}

```

This creates the `logstash-000001` index and also creates an alias called "logstash" that points to this new index. The ILM policy can now use this alias for swapping during the rollover.

Hope this helps!

---

<div class="post-metadata">

### Author: ![dfinn](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@dfinn](https://discuss.elastic.co/u/dfinn)
#### Post date: [May 22, 2019, 9:52pm UTC](https://discuss.elastic.co/t/getting-errors-related-to-ilm/182256/3 "2019-05-22T21:52:20Z")

</div>

Thanks @dakrone. One question though, I think (or thought) that I had done this through the UI already. If I view my ILM policies, then click on Actions -\> Add policy to index template this sounds like it should do the same thing, would it not? I did do this through the UI. Is there a way to view the current settings and see if this is already setup?

Or maybe I'm confused about what this action in the UI does.

---

<div class="post-metadata">

### Author: ![dfinn](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@dfinn](https://discuss.elastic.co/u/dfinn)
#### Post date: [May 30, 2019, 5:14pm UTC](https://discuss.elastic.co/t/getting-errors-related-to-ilm/182256/4 "2019-05-30T17:14:18Z")

</div>

I made the changes that were suggested above and now I'm getting the following errors in my logstash.log file:

```
[2019-05-30T00:16:46,994][ERROR][o.e.x.i.IndexLifecycleRunner] [qmfFc9w] policy [15-days] for 
index [logstash-2019.05.30] failed on step [{"phase":"hot","action":"rollover","name":"check- rollover-ready"}]. Moving to ERROR step
java.lang.IllegalArgumentException: index.lifecycle.rollover_alias [logstash] does not point to index [logstash-2019.05.30]
at org.elasticsearch.xpack.core.indexlifecycle.WaitForRolloverReadyStep.evaluateCondition(WaitForRolloverReadyStep.java:92) [x-pack-core-6.7.0.jar:6.7.0]
at org.elasticsearch.xpack.indexlifecycle.IndexLifecycleRunner.runPeriodicStep(IndexLifecycleRunner.java:133) [x-pack-ilm-6.7.0.jar:6.7.0]
at org.elasticsearch.xpack.indexlifecycle.IndexLifecycleService.triggerPolicies(IndexLifecycleService.java:250) [x-pack-ilm-6.7.0.jar:6.7.0]
at org.elasticsearch.xpack.indexlifecycle.IndexLifecycleService.triggered(IndexLifecycleService.java:205) [x-pack-ilm-6.7.0.jar:6.7.0]
at org.elasticsearch.xpack.core.scheduler.SchedulerEngine.notifyListeners(SchedulerEngine.java:168) [x-pack-core-6.7.0.jar:6.7.0]
at org.elasticsearch.xpack.core.scheduler.SchedulerEngine$ActiveSchedule.run(SchedulerEngine.java:196) [x-pack-core-6.7.0.jar:6.7.0]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_201]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_201]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_201]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_201]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_201]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_201]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_201]

```

I ran the commands almost exactly as shown above by @dakrone, the only thing I changed was "your-policy" to "15-day" which is what I named the policy in the UI when I created it. Perhaps index.lifecycle.rollover\_alias needs to be "logstash-\*" instead of "logstash"?

---

<div class="post-metadata">

### Author: ![dfinn](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@dfinn](https://discuss.elastic.co/u/dfinn)
#### Post date: [June 13, 2019, 4:58am UTC](https://discuss.elastic.co/t/getting-errors-related-to-ilm/182256/5 "2019-06-13T04:58:34Z")

</div>

Would anyone be able to share with me how they have their index.lifecycle.rollover\_alias set to? I'd really like to get this working, seems like I'm close and just barely off here.

---

<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: [July 11, 2019, 4:58am UTC](https://discuss.elastic.co/t/getting-errors-related-to-ilm/182256/6 "2019-07-11T04:58:35Z")

</div>

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