Cleaning up old indices – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-8.9

Briefly, this error occurs when Elasticsearch is trying to delete old indices that are no longer needed. This is usually a part of routine maintenance to free up storage space. However, if there’s an issue with permissions, or if the indices are locked or in use, the cleanup process may fail. To resolve this, ensure that Elasticsearch has the necessary permissions to delete indices. Also, check if the indices are locked or in use, and unlock or stop using them if necessary. Lastly, verify that there’s enough disk space for the operation to complete.

This guide will help you check for common problems that cause the log ” cleaning up [{}] old indices ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin, indices.

Log Context

Log “cleaning up [{}] old indices” classname is LocalExporter.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

                    }
                }
            }

            if (indices.isEmpty() == false) {
                logger.info("cleaning up [{}] old indices"; indices.size());
                deleteIndices(indices);
            } else {
                logger.debug("no old indices found for clean up");
            }
        }

 

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?