Node won’t start up due to duplicate alias/index names (HELP)

Dear community,

we have a major issue in our production cluster (2.4.6):
previous cluster setup:
4 nodes ( master and data)
the upgrade done on the cluster was:
4 nodes---> set as data only master false.
2 additional nodes were added and set as master and data false as fronts.

after the restart, the following issues occurred:

  • index was created with the same name as an alias.
  • many monthly data(indexes) were purged
  • all templates on the cluster were lost/ disappeared

one of the data nodes, are not even starting properly.
</>
2021-10-25 17:54:37] Error requesting cluster data:
[2021-10-25 17:54:37] {"data":{"error":{"root_cause":[{"type":"transport_serialization_exception","reason":"Failed to deserialize response of type [org.Elasticsearch.action.admin.cluster.state.ClusterStateResponse]"}],"type":"transport_serialization_exception","reason":"Failed to deserialize response of type [org.Elasticsearch.action.admin.cluster.state.ClusterStateResponse]","caused_by":{"type":"illegal_state_exception","reason":"index and alias names need to be unique, but alias [profiles_gh_keed-current] and index [profiles_gh_keed-current] have the same name"}},"status":500},"status":500,
</>
Problem:

  • index: profiles_gh_keed-current shouldn't exist (dono how it was created) we can delete it but impossible to delete.
  • alias: profiles_gh_keed-current points to the correct index: profiles_gh_keed (400GB of data)
  • impossible to replicate the issue on test because it is impossible to create an alias with the same index name.

need to delete index: profiles_gh_keed-current without impacting the profiles_gh_keed
we tried to close the index profiles_gh_keed-current it worked how can force the Elasticsearch to delete this index only and not touch anything else?
in order for the cluster nodes to start properly.

Many thanks for the support.
Best

Welcome to our community! :smiley:

2.X is very, very, very old, is EOL and no longer supported. Please upgrade.

Why is that?

curl -XDELETE 0:9200/INDEXNAME should work.

Thank you warkolm, for your feedback
we need to delete the badly created index so that the cluster is in good shape
bad index :profiles_gh_keed-current
good index: profiles_gh_keed
alias for good index: profiles_gh_keed-current

so i need to curl -XDELETE 0:9200/profiles_gh_keed-current
without touching the good index profiles_gh_keed withe same alias "profiles_gh_keed-current"
do you confirm that this is possible??

Many thanks!
Best,

just for the record
i managed to delete the faulty index by:

  • close faulty index
  • give the faulty index a dummy alias
  • delete Via dummy Alias and condition closed.

the main one won't be touched...
curl -XDELETE 'http://IP:PORT/test_index-test?expand_wildcards=closed'

where "test_index-test" in my case is the dummy alias assigned for the faulty index
Cheers

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