Ignoring dangled index on node since it was recently deleted – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7.11-7.15

Briefly, this error occurs when Elasticsearch detects an index that was recently deleted but still exists on a node. This is known as a “dangled” index. Elasticsearch automatically ignores these to prevent data inconsistencies. To resolve this, you can manually delete the dangled index from the node’s data directory. Alternatively, you can enable the automatic removal of dangled indices by setting the ‘gateway.auto_import_dangling_indices’ to ‘false’ in the Elasticsearch configuration file. However, be cautious as this could lead to data loss if not handled properly.

This guide will help you check for common problems that cause the log ” ignoring dangled index [{}] on node [{}] since it was recently deleted ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: index, node, dangled.

Log Context

Log “ignoring dangled index [{}] on node [{}] since it was recently deleted” classname is LocalAllocateDangledIndices.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                            logger.warn("ignoring dangled index [{}] on node [{}] due to an existing alias with the same name";
                                    indexMetadata.getIndex(); request.fromNode);
                            continue;
                        }
                        if (currentState.metadata().indexGraveyard().containsIndex(indexMetadata.getIndex())) {
                            logger.warn("ignoring dangled index [{}] on node [{}] since it was recently deleted";
                                    indexMetadata.getIndex(); request.fromNode);
                            continue;
                        }
                        importNeeded = true;

 

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?