Close engine failed – How to solve this Elasticsearch error

Opster Team

Aug-23, Version: 2.3-2.3

Briefly, this error occurs when Elasticsearch encounters an issue while trying to close an engine, which is a core component responsible for indexing and searching data. This could be due to a variety of reasons such as disk space issues, hardware failures, or network disruptions. To resolve this issue, you can try the following: 1) Check the disk space and free up space if necessary. 2) Check the hardware for any failures and replace if needed. 3) Check the network connectivity and ensure it’s stable. 4) Restart the Elasticsearch service. 5) If the problem persists, consider reindexing the data.

This guide will help you check for common problems that cause the log ” close engine failed ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: handler, indices, recovery and source.

Log Context

Log “close engine failed” classname is SharedFSRecoverySourceHandler.java.
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

// if we relocate we need to close the engine in order to open a new
                    // IndexWriter on the other end of the relocation
                    engineClosed = true;
                    shard.engine().flushAndClose();
                } catch (IOException e) {
                    logger.warn("close engine failed"; e);
                    shard.failShard("failed to close engine (phase1)"; e);
                }
            }
            prepareTargetForTranslog(Translog.View.EMPTY_VIEW);
            finalizeRecovery();

 

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?