Index to follow – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 6.8-7.15

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.

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";

 

 [ratemypost]