Index lifecycle error - illegal_argument_exception: index.lifecycle.rollover_alias

Hello Team,

Could you please help me with sorting out the following error while implementing ILM?

Referred link
https://www.elastic.co/guide/en/elasticsearch/reference/7.4/getting-started-index-lifecycle-management.html

Index lifecycle error
illegal_argument_exception: index.lifecycle.rollover_alias [temprule] does not point to index [templogs-2019.11]

Current action
rollover
Failed step
check-rollover-ready
Current phase
hot

Show phase definition

{
"index.blocks.read_only_allow_delete": "false",
"index.priority": "1",
"index.query.default_field": [
"*"
],
"index.refresh_interval": "1s",
"index.write.wait_for_active_shards": "1",
"index.lifecycle.name": "LOG_POLICY",
"index.lifecycle.rollover_alias": "temprule",
"index.number_of_replicas": "1"
}

PHASE DEFINITION
{
"policy": "LOG_POLICY",
"phase_definition": {
"min_age": "0ms",
"actions": {
"rollover": {
"max_size": "5mb",
"max_age": "7d"
}
}
},
"version": 10,
"modified_date_in_millis": 1572509374925
}

@cufflinks /@alisongoryachev can u please help here?

Thanks
Rashmi

Welcome @BALA_BALA!

Does the alias temprule exist? Also, if you created the alias after the ILM policy, you may also hit this issue (see: https://github.com/elastic/elasticsearch/issues/40235).

Thanks for the warm welcome :slight_smile: Let me review the link .

1 Like

Hi Alison,

Rollover job getting struck with this error....do i miss anything?
Index lifecycle error " illegal_argument_exception: index name [logrules-2019.11] does not match pattern '^.*-\d+$' "

Log & setting details,

{
"indices" : {
"logrules-2019.11" : {
"index" : "logrules-2019.11",
"managed" : true,
"policy" : "PEGA_LOG_POLICY",
"lifecycle_date_millis" : 1572566420875,
"phase" : "hot",
"phase_time_millis" : 1574920014790,
"action" : "rollover",
"action_time_millis" : 1574920254325,
"step" : "ERROR",
"step_time_millis" : 1574920854159,
"failed_step" : "check-rollover-ready",
"step_info" : {
"type" : "illegal_argument_exception",
"reason" : "index name [logrules-2019.11] does not match pattern '^.*-\d+'", "stack_trace" : """ java.lang.IllegalArgumentException: index name [logrules-2019.11] does not match pattern '^.*-\d+'
at org.elasticsearch.action.admin.indices.rollover.TransportRolloverAction.generateRolloverIndexName(TransportRolloverAction.java:245)
at org.elasticsearch.action.admin.indices.rollover.TransportRolloverAction.masterOperation(TransportRolloverAction.java:128)
at org.elasticsearch.action.admin.indices.rollover.TransportRolloverAction.masterOperation(TransportRolloverAction.java:70)
at org.elasticsearch.action.support.master.TransportMasterNodeAction.masterOperation(TransportMasterNodeAction.java:127)
at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction$1.doRun(TransportMasterNodeAction.java:200)
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
at org.elasticsearch.common.util.concurrent.EsExecutors$DirectExecutorService.execute(EsExecutors.java:193)
at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction.doStart(TransportMasterNodeAction.java:197)
at org.elasticsearch.action.support.master.TransportMasterNodeAction$AsyncSingleAction.start(TransportMasterNodeAction.java:161)
at org.elasticsearch.action.support.master.TransportMasterNodeAction.doExecute(TransportMasterNodeAction.java:138)
at org.elasticsearch.action.support.master.TransportMasterNodeAction.doExecute(TransportMasterNodeAction.java:58)
at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:145)
at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.lambda$apply$0(SecurityActionFilter.java:86)
at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:62)
at org.elasticsearch.xpack.security.action.filter.SecurityActionFilter.lambda$authorizeRequest$4(SecurityActionFilter.java:172)
at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:62)
at org.elasticsearch.xpack.security.authz.AuthorizationService.lambda$runRequestInterceptors$15(AuthorizationService.java:341)
at org.elasticsearch.action.ActionListener$1.onResponse(ActionListener.java:62)

Setting:

{
"index.blocks.read_only_allow_delete": "false",
"index.query.default_field": [
"*"
],
"index.refresh_interval": "1s",
"index.write.wait_for_active_shards": "1",
"index.lifecycle.name": "PEGA_LOG_POLICY",
"index.lifecycle.rollover_alias": "pega_log-000001",
"index.priority": "100",
"index.number_of_replicas": "1"
}

Your index name (logrules-2019.11) doesn't have a -0000N (where N is a digit) suffix, which is required to use rollover. When the initial index is created, it should be created as logrules-2019.11-000001 so that the rollover API can increment the number at the end.

1 Like

Excellent. No more errors..

Index lifecycle management

Lifecycle policy

PEGA_LOG_POLICY

Current action

complete

Failed step

Current phase

hot

Current action time

2019-12-03 11:04:45

Show phase definition

How can I resolve it, how can I have the -000N on my index name. I am facing same situation

excellant THanks for circling back and letting us know.

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