Tried to fail engine but engine is already failed ignoring reason – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 8.3-8.9

Briefly, this error occurs when Elasticsearch attempts to mark an engine as failed, but the engine has already been marked as such. This could be due to a variety of issues such as hardware failure, disk space issues, or data corruption. To resolve this, you could try restarting the Elasticsearch node, checking for hardware issues, ensuring there’s enough disk space, or restoring data from a backup if corruption is suspected. It’s also important to check the Elasticsearch logs for more detailed information about the cause of the original engine failure.

This guide will help you check for common problems that cause the log ” tried to fail engine but engine is already failed. ignoring. [” + reason + “] ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: index.

Log Context

Log “tried to fail engine but engine is already failed. ignoring. [” + reason + “]” classname is Engine.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

            maybeDie(reason; failure);
        }
        if (failEngineLock.tryLock()) {
            try {
                if (failedEngine.get() != null) {
                    logger.warn(() -> "tried to fail engine but engine is already failed. ignoring. [" + reason + "]"; failure);
                    return;
                }
                // this must happen before we close IW or Translog such that we can check this state to opt out of failing the engine
                // again on any caught AlreadyClosedException
                failedEngine.set((failure != null) ? failure : new IllegalStateException(reason));

 

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?