Failed to clean up old index blob – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 7.3-7.5

Briefly, this error occurs when Elasticsearch tries to delete old index blobs but fails due to issues like insufficient permissions, disk space, or network connectivity. To resolve this, you can check and adjust the permissions of the Elasticsearch directory, ensure there’s enough disk space, and verify network connectivity. Also, check the Elasticsearch logs for more specific error details. If the issue persists, consider reindexing your data and deleting the old index.

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

Log Context

Log “Failed to clean up old index blob [{}]” classname is BlobStoreRepository.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

        if (newGen - 2 >= 0) {
            final String oldSnapshotIndexFile = INDEX_FILE_PREFIX + Long.toString(newGen - 2);
            try {
                blobContainer().deleteBlobIgnoringIfNotExists(oldSnapshotIndexFile);
            } catch (IOException e) {
                logger.warn("Failed to clean up old index blob [{}]"; oldSnapshotIndexFile);
            }
        }
    }

    /**

 

 [ratemypost]