Failed to cleanup native storage from previous invocation – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 6.8-7.1

Briefly, this error occurs when Elasticsearch is unable to delete the temporary files it created during its previous run. This could be due to insufficient permissions, a locked file, or a process still using the file. To resolve this issue, you can manually delete the files in the Elasticsearch temporary directory. If the files are locked, you may need to stop the process that’s using them. If it’s a permissions issue, you may need to run Elasticsearch with a user that has the necessary permissions.

This guide will help you check for common problems that cause the log ” Failed to cleanup native storage from previous invocation ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: plugin, storage.

Log Context

Log “Failed to cleanup native storage from previous invocation” classname is AutodetectProcessManager.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

    public void onNodeStartup() {
        try {
            nativeStorageProvider.cleanupLocalTmpStorageInCaseOfUncleanShutdown();
        } catch (Exception e) {
            logger.warn("Failed to cleanup native storage from previous invocation"; e);
        }
    }

    public synchronized void closeAllJobsOnThisNode(String reason) {
        int numJobs = processByAllocation.size();

 

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?