Alias name duplication

Hello :slight_smile:

After restart of one of my clusters, data nodes fail to start because of alias name duplication. On my other clusters I have similar situations (alias name pointing to multiple indices) and i can restart my nodes just fine.

What is the expected behavior here - shouldn't aliases be allowed to point to several indices?

Is there any way I can recover those data nodes without data loss?

I'm using elasticsearch 6.7.1

    Caused by: java.lang.IllegalStateException: index and alias names need to be unique, but the following duplicates were found [mosquitto (alias of [mosquitto-2019.06.20-000005/YprlN_CSRxW7cKQcvpemCw]),mosquitto (alias of [mosquitto-2019.07.04-000007/P0LyDwz-RfeyM7IV2cWmMA]),logback-staging (alias of [logback-staging-2019.05.02-000001/duIUpr5fQmW809hj1ipMIQ]),mongo (alias of [mongo-2019.07.02-000007/-yXUiUnzQjuR3vm3OV_ENw]),mongo (alias of [mongo-2019.06.11-000004/OSbuKOnDQWOObszcx5M7Yg]),mosquitto (alias of [mosquitto-2019.07.11-000008/Q4MLQyZrTmGnvB0Meqy0mw]),mongo (alias of [mongo-2019.06.25-000006/l1uFrlV4S22WeSogqyeh8g]),logback-staging (alias of [logback-staging-2019.06.01-000002/WJhf4V8ZS4-n-SFXwI7taA]),logback-staging (alias of [logback-staging-2019.07.01-000003/9m9qlNU1TI2oC4ImpIkiCA]),mongo (alias of [mongo-2019.07.09-000008/KLXeqcBGSMaQvGdZ08k-iQ]),mongo (alias of [mongo-2019.06.18-000005/nTpLv7EkTsSMd_haDq3MDw]),mosquitto (alias of [mosquitto-2019.06.13-000004/XQfsJ321QSm7c-VobVoEVg]),mosquitto (alias of [mosquitto-2019.06.27-000006/4skwEZTXQhuobJZM4kalwQ])]
    	at org.elasticsearch.cluster.metadata.MetaData$Builder.build(MetaData.java:1118) ~[elasticsearch-6.7.1.jar:6.7.1]
    	at org.elasticsearch.gateway.MetaStateService.loadFullState(MetaStateService.java:73) ~[elasticsearch-6.7.1.jar:6.7.1]
    	at org.elasticsearch.gateway.GatewayMetaState.<init>(GatewayMetaState.java:88) ~[elasticsearch-6.7.1.jar:6.7.1]
    	at org.elasticsearch.node.Node.<init>(Node.java:499) ~[elasticsearch-6.7.1.jar:6.7.1]
    	at org.elasticsearch.node.Node.<init>(Node.java:266) ~[elasticsearch-6.7.1.jar:6.7.1]
    	at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:212) ~[elasticsearch-6.7.1.jar:6.7.1]
    	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:212) ~[elasticsearch-6.7.1.jar:6.7.1]
    	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) ~[elasticsearch-6.7.1.jar:6.7.1]
    	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-6.7.1.jar:6.7.1]
    	... 6 more
    [2020-07-09T17:05:19,337][INFO ][o.e.x.m.p.NativeController] [es-data-1] Native controller process has stopped - no new native processes can be started

That is the idea behind aliases though.

This seems to be indicating that either there's duplicate indices or aliases though. What does _cat/aliases?v show?

The problem is that my cluster is not running properly because after restart my data nodes do not start - they encounter that exception from first post and terminate.

This is the result of that query for me:

{"error":{"root_cause":[{"type":"cluster_block_exception","reason":"blocked by: [SERVICE_UNAVAILABLE/1/state not recovered / initialized];"}],"type":"master_not_discovered_exception","reason":"ClusterBlockException[blocked by: [SERVICE_UNAVAILABLE/1/state not recovered / initialized];]","caused_by":{"type":"cluster_block_exception","reason":"blocked by: [SERVICE_UNAVAILABLE/1/state not recovered / initialized];"}},"status":503}

Elected master is spewing such logs:

[2020-07-16T21:15:30,798][ERROR][o.e.x.m.c.c.ClusterStatsCollector] [es-master-74bf46467d-zv7jn] collector [cluster_stats] failed to collect data
org.elasticsearch.cluster.block.ClusterBlockException: blocked by: [SERVICE_UNAVAILABLE/1/state not recovered / initialized];

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