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

Hi there!

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

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:

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

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