Service provider index exists as a concrete index but it should be an alias – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7.7-7.7

Briefly, this error occurs when an Elasticsearch index is mistakenly created as a concrete index instead of an alias. This can cause issues with data management and search operations. To resolve this, you can delete the existing concrete index and recreate it as an alias. Alternatively, you can use the Elasticsearch ‘alias’ API to convert the concrete index into an alias. However, be cautious as deleting an index will remove all data stored in it. Always backup your data before performing such operations.

This guide will help you check for common problems that cause the log ” service provider index [{}] exists as a concrete index; but it should be an alias ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: alias, index, plugin.

Log Context

Log “service provider index [{}] exists as a concrete index; but it should be an alias” classname is SamlServiceProviderIndex.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

    private void logChangedAliasState(AliasOrIndex aliasInfo) {
        if (aliasInfo == null) {
            logger.warn("service provider index/alias [{}] no longer exists"; ALIAS_NAME);
        } else if (aliasInfo.isAlias() == false) {
            logger.warn("service provider index [{}] exists as a concrete index; but it should be an alias"; ALIAS_NAME);
        } else if (aliasInfo.getIndices().size() != 1) {
            logger.warn("service provider alias [{}] refers to multiple indices [{}] - this is unexpected and is likely to cause problems";
                ALIAS_NAME; Strings.collectionToCommaDelimitedString(aliasInfo.getIndices()));
        } else {
            logger.info("service provider alias [{}] refers to [{}]"; ALIAS_NAME; aliasInfo.getIndices().get(0).getIndex());

 

How helpful was this guide?

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?