Index.lifecycle.rollover_alias does not point to index

Hello @warkolm !
I run to this error today. I use NLog to write to ES. I would like to use rollover for not blow up my monthly index more than 50GB.

Error:

[2020-10-01T07:54:17,209][ERROR][o.e.x.i.IndexLifecycleRunner] [BTLSRV1] policy [btllogs-ilm-policy] for index [btllogs-system-2020.10] failed on step [{"phase":"hot","action":"rollover","name":"check-rollover-ready"}]. Moving to ERROR step
java.lang.IllegalArgumentException: index.lifecycle.rollover_alias [btllogs-ra] does not point to index [btllogs-system-2020.10]
	at org.elasticsearch.xpack.core.ilm.WaitForRolloverReadyStep.evaluateCondition(WaitForRolloverReadyStep.java:104) [x-pack-core-7.8.0.jar:7.8.0]
	at org.elasticsearch.xpack.ilm.IndexLifecycleRunner.runPeriodicStep(IndexLifecycleRunner.java:173) [x-pack-ilm-7.8.0.jar:7.8.0]
	at org.elasticsearch.xpack.ilm.IndexLifecycleService.triggerPolicies(IndexLifecycleService.java:329) [x-pack-ilm-7.8.0.jar:7.8.0]
	at org.elasticsearch.xpack.ilm.IndexLifecycleService.triggered(IndexLifecycleService.java:267) [x-pack-ilm-7.8.0.jar:7.8.0]
	at org.elasticsearch.xpack.core.scheduler.SchedulerEngine.notifyListeners(SchedulerEngine.java:183) [x-pack-core-7.8.0.jar:7.8.0]
	at org.elasticsearch.xpack.core.scheduler.SchedulerEngine$ActiveSchedule.run(SchedulerEngine.java:211) [x-pack-core-7.8.0.jar:7.8.0]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) [?:?]
	at java.lang.Thread.run(Thread.java:832) [?:?]

Index Template "btllogs" Settings:

{
  "index": {
    "lifecycle": {
      "name": "btllogs-ilm-policy",
      "rollover_alias": "btllogs-ra"
    },
    "highlight": {
      "max_analyzed_offset": "10000000"
    },
    "refresh_interval": "5s",
    "number_of_shards": "1"
  }
}

Policy:

PUT _ilm/policy/btllogs-ilm-policy
{
  "policy": {
    "phases": {
      "hot": {
        "min_age": "0ms",
        "actions": {
          "rollover": {
            "max_age": "31d",
            "max_size": "50gb"
          },
          "set_priority": {
            "priority": 100
          }
        }
      },
      "warm": {
        "actions": {
          "allocate": {
            "number_of_replicas": 0,
            "include": {},
            "exclude": {}
          },
          "shrink": {
            "number_of_shards": 1
          },
          "forcemerge": {
            "max_num_segments": 1
          },
          "set_priority": {
            "priority": 70
          }
        }
      },
      "cold": {
        "min_age": "60d",
        "actions": {
          "freeze": {},
          "allocate": {
            "number_of_replicas": 0,
            "include": {},
            "exclude": {}
          },
          "set_priority": {
            "priority": 30
          }
        }
      },
      "delete": {
        "min_age": "366d",
        "actions": {
          "delete": {}
        }
      }
    }
  }
}

What am I missing in this case?
Thanks a lot.

Can you do a ilm exlpain on the index to help with the debugging

Index Settings (ilm):

    "index": {
      "lifecycle": {
        "name": "btllogs-ilm-policy",
        "rollover_alias": "btllogs-ra"
      },
      "highlight": {
        "max_analyzed_offset": "10000000"
      },
      "refresh_interval": "5s",
      "number_of_shards": "1",
      "provided_name": "btllogs-system-2020.10",
      "creation_date": "1601499626518",
      "priority": "100",
      "number_of_replicas": "1",
      "uuid": "sKdP-sEDQ965HZybNt4tBg",
      "version": {
        "created": "7080099"
      }
    }

You index name seems incorrect for ilm. Usually it end with xxx-000001
also did you bootstrap your first index?

Perhaps you can take a look at link below:

To automate rollover and management of time series indices with ILM using an index alias

Hope this can help you!

OK. Thank you.
I use date math index name in the end. It isn't so intuitive...

If you wish to have date in your index name, you could take a read at this ticket.

1 Like

It runs fine in my environment. Thanks for your attention.

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