Index to follow – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 6.8-7.15

Before you dig into reading this guide, have you tried asking OpsGPT what this log means? You’ll receive a customized analysis of your log.

Try OpsGPT now for step-by-step guidance and tailored insights into your Elasticsearch operation.

Briefly, this error occurs when Elasticsearch tries to follow an index that doesn’t exist or is not accessible. This is common in Cross Cluster Replication (CCR) where one cluster tries to replicate an index from another cluster. To resolve this, ensure that the index you’re trying to follow actually exists and is accessible. Check your cluster settings and network connectivity. Also, ensure that the necessary permissions are granted for the operation. If the index was deleted, you may need to recreate it or follow a different index.

For a complete solution to your to your search operation, try for free AutoOps for Elasticsearch & OpenSearch . With AutoOps and Opster’s proactive support, you don’t have to worry about your search operation – we take charge of it. Get improved performance & stability with less hardware.

This guide will help you check for common problems that cause the log ” index to follow [ ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin, index.

Log Context

Log “index to follow [” class name is AutoFollowCoordinator.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 .filter(otherPattern -> otherPattern.v2().match(indexAbstraction))
 .map(Tuple::v1)
 .collect(Collectors.toList());
 if (otherMatchingPatterns.size() != 0) {
 groupedListener.onResponse(
 new Tuple<>(indexToFollow; new ElasticsearchException("index to follow [" + indexToFollow.getName() +
 "] for pattern [" + autoFollowPattenName + "] matches with other patterns " + otherMatchingPatterns + "")));
 } else {
 final Settings leaderIndexSettings = remoteMetadata.getIndexSafe(indexToFollow).getSettings();
 if (IndexSettings.INDEX_SOFT_DELETES_SETTING.get(leaderIndexSettings) == false) {
 String message = String.format(Locale.ROOT; "index [%s] cannot be followed; because soft deletes are not enabled";

 

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?