Creating index cause ccr create and follow shards – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-6.8

Briefly, this error occurs when you’re trying to create an index in Elasticsearch, but it’s conflicting with the Cross-Cluster Replication (CCR) process. CCR is a feature that replicates indices from one cluster to another. The error suggests that the index you’re trying to create already exists in the follower cluster. To resolve this issue, you can either delete the existing index in the follower cluster before creating a new one, or rename the index you’re trying to create. Alternatively, you can pause the CCR process, create the index, and then resume the CCR.

This guide will help you check for common problems that cause the log ” [{}] creating index; cause [ccr_create_and_follow]; shards [{}]/[{}] ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin, shards.

Log Context

Log “[{}] creating index; cause [ccr_create_and_follow]; shards [{}]/[{}]” classname is Pre67PutFollow.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                    .addAsNew(updatedState.metaData().index(request.getFollowerIndex()));
                updatedState = allocationService.reroute(
                    ClusterState.builder(updatedState).routingTable(routingTableBuilder.build()).build();
                    "follow index [" + request.getFollowerIndex() + "] created");

                logger.info("[{}] creating index; cause [ccr_create_and_follow]; shards [{}]/[{}]";
                    followIndex; followIMD.getNumberOfShards(); followIMD.getNumberOfReplicas());

                return updatedState;
            }
        });

 

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?