Failed to remove index on stop – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 2.3-2.3

Briefly, this error occurs when Elasticsearch is unable to delete an index during the shutdown process. This could be due to insufficient permissions, a locked index, or a network issue. To resolve this, you can manually delete the index using the DELETE API, ensure that Elasticsearch has the necessary permissions, unlock the index if it’s locked, or check your network connection. If the issue persists, consider checking the Elasticsearch logs for more detailed error information.

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

Log Context

Log “failed to remove index on stop [” classname is IndicesService.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                 
Override
                public void run() {
                    try {
                        removeIndex(index; "shutdown"; false);
                    } catch (Throwable e) {
                        logger.warn("failed to remove index on stop [" + index + "]"; e);
                    } finally {
                        latch.countDown();
                    }
                }
            });



 

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?