# Failed to create alias - reason":"alias \[metricbeat-staging\] has more than one write index

**URL:** <https://discuss.elastic.co/t/failed-to-create-alias-reason-alias-metricbeat-staging-has-more-than-one-write-index/275688>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [June 11, 2021, 1:47pm UTC](https://discuss.elastic.co/t/failed-to-create-alias-reason-alias-metricbeat-staging-has-more-than-one-write-index/275688 "2021-06-11T13:47:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![phlegx](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/phlegx/32/14979_2.png) [@phlegx](https://discuss.elastic.co/u/phlegx)\
**Post date:** [June 11, 2021, 1:47pm UTC](https://discuss.elastic.co/t/failed-to-create-alias-reason-alias-metricbeat-staging-has-more-than-one-write-index/275688/1 "2021-06-11T13:47:58Z")

</div>

Hi there!

It seems that when my metricbeat instance gets killed/restarted, something breaks. I always get this error in the metricbeat logs:

```auto
Index Alias metricbeat-staging setup failed: failed to create alias: {"error":{"root_cause":[{"type":"illegal_state_exception","reason":"alias [metricbeat-staging] has more than one write index 

```

Actually however when I curl for it, it says I have indeed only one index with is\_write\_index:

```auto
GET /_cat/aliases/metricbeat-staging?v=true

alias index filter routing.index routing.search is_write_index
metricbeat-staging metricbeat-staging-2021.06.10-000002 - - - true
metricbeat-staging metricbeat-staging-2021.06.09-000001 - - - false

```

I can resolve this by stopping metricbeat and then delete these two aliases and restart metricbeat again. But after a while this just happens once more. Any ideas what might be the issue here, and how to once and for all resolve this?

**NOTE:** This is not only happening for metricbeat but for other beats like filebeat and heartbeat as well.

best  
Martin

**UPDATE:** it seems that this is a Bug, see: [Metricbeat: "More than one write index" errors in version 7.13.x - #6 by bwright1558](https://discuss.elastic.co/t/metricbeat-more-than-one-write-index-errors-in-version-7-13-x/275355/6)

---

<div class="post-metadata">

**Author:** ![Mario\_Castro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mario_castro/32/35107_2.png) [@Mario\_Castro](https://discuss.elastic.co/u/Mario_Castro)\
**Post date:** [June 14, 2021, 8:50am UTC](https://discuss.elastic.co/t/failed-to-create-alias-reason-alias-metricbeat-staging-has-more-than-one-write-index/275688/2 "2021-06-14T08:50:48Z")

</div>

> [@phlegx](#):
>
> **UPDATE:** it seems that this is a Bug, see: [Metricbeat: "More than one write index" errors in version 7.13.x - #6 by bwright1558](https://discuss.elastic.co/t/metricbeat-more-than-one-write-index-errors-in-version-7-13-x/275355/6)

Yes, it´s a know bug. Thanks for reporting anyways 🙂

---

<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:** [July 12, 2021, 10:51am UTC](https://discuss.elastic.co/t/failed-to-create-alias-reason-alias-metricbeat-staging-has-more-than-one-write-index/275688/3 "2021-07-12T10:51:32Z")

</div>

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