# ILM : illegal\_argument\_exception: source alias \[elastiflow-3.4.1-alias\] does not point to a write index

**URL:** <https://discuss.elastic.co/t/ilm-illegal-argument-exception-source-alias-elastiflow-3-4-1-alias-does-not-point-to-a-write-index/174288>\
**Category:** Elasticsearch\
**Created:** [March 28, 2019, 9:44am UTC](https://discuss.elastic.co/t/ilm-illegal-argument-exception-source-alias-elastiflow-3-4-1-alias-does-not-point-to-a-write-index/174288 "2019-03-28T09:44:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mayer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mayer/32/42164_2.png) [@mayer](https://discuss.elastic.co/u/mayer)\
**Post date:** [March 28, 2019, 9:44am UTC](https://discuss.elastic.co/t/ilm-illegal-argument-exception-source-alias-elastiflow-3-4-1-alias-does-not-point-to-a-write-index/174288/1 "2019-03-28T09:44:17Z")

</div>

Dear All,

My environment: ELK 6.6.1 with elastiflow 3.4.1

As disk space is limited I tried to setup an Index Lifecycle Policy. Initially I failed with the following type of error.  
illegal\_argument\_exception: index.lifecycle.rollover\_alias [....] does not point to index ...

Based on several postings I modified file /etc/logstash/elastiflow/templates/elastiflow.template.json  
and add some lines almost at the end. This is the diff

> 28683,28687d28682  
> \< },  
> \< "aliases": {  
> \< "elastiflow-3.4.1-alias": {  
> \< "is\_write\_index": true  
> \< }

Restarting logstash and waiting a day for the new index the original error message disappears.  
Now I can apply an life-cycle policy and it offers me an "Index Rollover Alias"  
But when I do so I get the following error after some minutes:

> illegal\_argument\_exception: source alias [elastiflow-3.4.1-alias] does not point to a write index

Any idea how I can solve this issue ?

Kind regards  
Hans

---

<div class="post-metadata">

**Author:** ![mayer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mayer/32/42164_2.png) [@mayer](https://discuss.elastic.co/u/mayer)\
**Post date:** [April 15, 2019, 3:20pm UTC](https://discuss.elastic.co/t/ilm-illegal-argument-exception-source-alias-elastiflow-3-4-1-alias-does-not-point-to-a-write-index/174288/2 "2019-04-15T15:20:34Z")

</div>

Dear All,

for all who run into a similar problem. Here my work around. I run a cron job once a night where I delete the indices "manually" which are older than a week.

```
curl -X GET 'localhost:9200/_cat/indices?v' 2> /dev/null | grep elastiflow | sort -r | awk '{ print $3 }' | tail +7 | while read INDEX
do
  curl -XDELETE "http://localhost:9200/$INDEX"
done

```

Kind regards  
Hans

---

<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:** [May 13, 2019, 3:29pm UTC](https://discuss.elastic.co/t/ilm-illegal-argument-exception-source-alias-elastiflow-3-4-1-alias-does-not-point-to-a-write-index/174288/3 "2019-05-13T15:29:08Z")

</div>

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