# Illegal\_argument\_exception: source alias \[server\] does not point to a write index

**URL:** <https://discuss.elastic.co/t/illegal-argument-exception-source-alias-server-does-not-point-to-a-write-index/231458>\
**Category:** Elasticsearch\
**Tags:** ilm-index-lifecycle-management\
**Created:** [May 7, 2020, 6:00am UTC](https://discuss.elastic.co/t/illegal-argument-exception-source-alias-server-does-not-point-to-a-write-index/231458 "2020-05-07T06:00:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![darkwingzero](https://avatars.discourse-cdn.com/v4/letter/d/e9a140/32.png) [@darkwingzero](https://discuss.elastic.co/u/darkwingzero)\
**Post date:** [May 7, 2020, 6:00am UTC](https://discuss.elastic.co/t/illegal-argument-exception-source-alias-server-does-not-point-to-a-write-index/231458/1 "2020-05-07T06:00:23Z")

</div>

Hi,

May i request your help, i'm facing error on ILM, request for fix please.

Thank you!

 ![index error](https://us1.discourse-cdn.com/elastic/original/3X/4/6/46447f2fd79c7034d9f16bdca12d54cb46b4129b.jpeg)

---

<div class="post-metadata">

**Author:** ![marc-at-qventus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marc-at-qventus/32/45665_2.png) [@marc-at-qventus](https://discuss.elastic.co/u/marc-at-qventus)\
**Post date:** [May 17, 2020, 3:21am UTC](https://discuss.elastic.co/t/illegal-argument-exception-source-alias-server-does-not-point-to-a-write-index/231458/2 "2020-05-17T03:21:40Z")

</div>

I have a similar issue. It looks like these are common problems with the setup  
of ILM, which is complicated. It's easy to miss the bootstrapping step the first time.

From the following error, it appears the ILM policy created for my index was  
never properly bootstrapped on the index:

```auto
[instance-0000000016] policy [app-30day-rollover] for index [app-2020.04] failed on step [{"phase":"hot","action":"rollover","name":"check-rollover-ready"}]. Moving to ERROR step java.lang.IllegalArgumentException: source alias [medengine] does not point to a write index at [...]

```

And yet, this time-based index has definitely rolled over, as there is now an 'app-2020.05' index which is 'hot' as well.

So my question is: How does one fix this? Both indices are giving errors and backtraces now, similar to above, every time the rollover is triggered, about every 10 min.

Some more specifics:

I created an index template, called 'app-template', with the following settings:

```auto
{
  "index": {
    "lifecycle": {
      "name": "app-30day-rollover",
      "rollover_alias": "medengine"
    },
    "number_of_replicas": "2",
    "default_pipeline": "medengine-pipeline"
  }
}

```

And here is the policy phase definition:

```auto
{
  "policy": "app-30day-rollover",
  "phase_definition": {
    "min_age": "0ms",
    "actions": {
      "rollover": {
        "max_size": "60gb",
        "max_age": "30d"
      },
      "set_priority": {
        "priority": 1
      }
    }
  },
  "version": 4,
  "modified_date_in_millis": 1589683108543
}

```

And here is the first section of the index definition for app-2020.05

```auto
{
  "settings": {
    "index": {
      "lifecycle": {
        "name": "app-30day-rollover",
        "rollover_alias": "medengine"
      },
      "number_of_shards": "1",
      "provided_name": "app-2020.05",
      "default_pipeline": "medengine-pipeline",
      "creation_date": "1588291200850",
      "priority": "100",
      "number_of_replicas": "2",
      "uuid": "XXXXXXXXXXXXXXXXXXXXXXX",
      "version": {
        "created": "7060299"
      }
    }
  },
[...]

```

You can see the alias parameter appears to be correct, and matches the index template.  
There is also an index pattern that includes the indices above: `app*`

It's hard to understand what to do next in this situation, without  
deleting the indices with all their data and starting again. It seems  
like there should be a better solution than that.

FWIW, the backtrace is pretty difficult to navigate as a jumping off point.

---

<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 14, 2020, 3:21am UTC](https://discuss.elastic.co/t/illegal-argument-exception-source-alias-server-does-not-point-to-a-write-index/231458/3 "2020-06-14T03:21:46Z")

</div>

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