Applying create index request using existing index metadata – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7.8-8.9

Briefly, this error occurs when Elasticsearch tries to create a new index, but it finds that metadata for the index already exists. This could be due to a previous failed attempt to create the index or a replication issue. To resolve this, you can try deleting the existing index metadata before creating the new index. Alternatively, you can check for any replication issues and fix them. Also, ensure that the index name you’re trying to create is unique to avoid conflicts with existing indices.

This guide will help you check for common problems that cause the log ” applying create index request using existing index [{}] metadata ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: metadata, index, cluster, request.

Log Context

Log “applying create index request using existing index [{}] metadata” classname is MetadataCreateIndexService.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

        final boolean silent;
        final IndexMetadata sourceMetadata;
        final BiConsumer metadataTransformer;
        final ActionListener rerouteListener
    ) throws Exception {
        logger.info("applying create index request using existing index [{}] metadata"; sourceMetadata.getIndex().getName());

        final Map mappings = MapperService.parseMapping(xContentRegistry; request.mappings());
        if (mappings.isEmpty() == false) {
            throw new IllegalArgumentException(
                "mappings are not allowed when creating an index from a source index; " + "all mappings are copied from the source index"

 

 [ratemypost]