# Index Lifecycle Allocation Routed Step failing with NullPtrException

**URL:** <https://discuss.elastic.co/t/index-lifecycle-allocation-routed-step-failing-with-nullptrexception/252331>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [October 16, 2020, 10:32am UTC](https://discuss.elastic.co/t/index-lifecycle-allocation-routed-step-failing-with-nullptrexception/252331 "2020-10-16T10:32:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Benjamin\_saiz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benjamin_saiz/32/77324_2.png) [@Benjamin\_saiz](https://discuss.elastic.co/u/Benjamin_saiz)\
**Post date:** [October 16, 2020, 10:32am UTC](https://discuss.elastic.co/t/index-lifecycle-allocation-routed-step-failing-with-nullptrexception/252331/1 "2020-10-16T10:32:29Z")

</div>

We are running an ElasticSearch 6.8.8 cluster.

We just implemented ILM for our indexes.

Here is our ILM Policy :

```auto
  {
      "policy": {
          "phases": {
              /* Hot phase - Resync Priority 100 */
              "hot": {
                  "min_age": "0ms",
                  "actions": {
                      "set_priority": {
                          "priority": 100
                      }
                  }
              },
              /* Warm phase - Resync Priority 50 */
              "warm": {
                  "min_age": "30d",
                  "actions": {
                      "set_priority": {
                          "priority": 50
                      }
                  }
              },
              /* Cold phase - Resync Priority 0 - Apply storageclass = mass */
              "cold": {
                  "min_age": "90d",
                  "actions": {
                      "allocate": {
                          "require": {
                              "storageclass": "mass"
                          }
                      },
                      "set_priority": {
                          "priority": 0
                      }
                  }
              }
          }
      }
  }

```

But we are facing a NullPointer Exception on AllocationRoutedStep

Here is the stacktrace :

```auto
java.lang.NullPointerException
	at org.elasticsearch.xpack.core.indexlifecycle.AllocationRoutedStep.isConditionMet(AllocationRoutedStep.java:70)
	at org.elasticsearch.xpack.indexlifecycle.ExecuteStepsUpdateTask.execute(ExecuteStepsUpdateTask.java:123)
	at org.elasticsearch.cluster.ClusterStateUpdateTask.execute(ClusterStateUpdateTask.java:47)
	at org.elasticsearch.cluster.service.MasterService.executeTasks(MasterService.java:643)
	at org.elasticsearch.cluster.service.MasterService.calculateTaskOutputs(MasterService.java:270)
	at org.elasticsearch.cluster.service.MasterService.runTasks(MasterService.java:200)
	at org.elasticsearch.cluster.service.MasterService$Batcher.run(MasterService.java:135)
	at org.elasticsearch.cluster.service.TaskBatcher.runIfNotProcessed(TaskBatcher.java:150)
	at org.elasticsearch.cluster.service.TaskBatcher$BatchedTask.run(TaskBatcher.java:188)
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:681)
	at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:252)
	at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:215)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

```

Hope this can be fixed or already fixed in 6.8.x relelease...

Regards,

---

<div class="post-metadata">

**Author:** ![Benjamin\_saiz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benjamin_saiz/32/77324_2.png) [@Benjamin\_saiz](https://discuss.elastic.co/u/Benjamin_saiz)\
**Post date:** [October 19, 2020, 8:38am UTC](https://discuss.elastic.co/t/index-lifecycle-allocation-routed-step-failing-with-nullptrexception/252331/2 "2020-10-19T08:38:26Z")

</div>

We tried to upgrade to 6.8.12 but error remain the same.

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [October 19, 2020, 11:51am UTC](https://discuss.elastic.co/t/index-lifecycle-allocation-routed-step-failing-with-nullptrexception/252331/3 "2020-10-19T11:51:04Z")

</div>

if this happens on the latest 6.8 release (as you seem to indicate), please open a github issue. You might be able to pinpoint this further by reducing your policy first and have fewer actions/phases in there.

---

<div class="post-metadata">

**Author:** ![Benjamin\_saiz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benjamin_saiz/32/77324_2.png) [@Benjamin\_saiz](https://discuss.elastic.co/u/Benjamin_saiz)\
**Post date:** [October 19, 2020, 12:29pm UTC](https://discuss.elastic.co/t/index-lifecycle-allocation-routed-step-failing-with-nullptrexception/252331/4 "2020-10-19T12:29:19Z")

</div>

all other steps are fine (hot/warm) only got the error on cold step when trying to relocate data.  
i'll open an issue.

---

<div class="post-metadata">

**Author:** ![Benjamin\_saiz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/benjamin_saiz/32/77324_2.png) [@Benjamin\_saiz](https://discuss.elastic.co/u/Benjamin_saiz)\
**Post date:** [October 19, 2020, 12:39pm UTC](https://discuss.elastic.co/t/index-lifecycle-allocation-routed-step-failing-with-nullptrexception/252331/5 "2020-10-19T12:39:40Z")

</div>

here it is.

> <https://github.com/elastic/elasticsearch/issues/63877>
>
> Elasticsearch version (bin/elasticsearch --version):
> Version: 6.8.12, Build: default/deb/7a15d2a/2020-08-12T07:27:20.804867Z, JVM: 1.8.0\_252
> Plugins installed: \[\]
> JVM version (java -version):
> openjdk version "1.8.0\_252"
> OpenJDK Runtime Environment (build 1.8.0\_252-8u252-b09-1~18.04-b09)
> OpenJDK 64-Bit...

---

<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:** [November 16, 2020, 12:39pm UTC](https://discuss.elastic.co/t/index-lifecycle-allocation-routed-step-failing-with-nullptrexception/252331/6 "2020-11-16T12:39:40Z")

</div>

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