Recover snapshot files cancelled – How to solve this Elasticsearch exception

Opster Team

August-23, Version: 7.16-8.9

Briefly, this error occurs when the process of recovering snapshot files in Elasticsearch is interrupted or cancelled. This could be due to a variety of reasons such as network issues, insufficient disk space, or the Elasticsearch cluster being under heavy load. To resolve this issue, you can try the following: 1) Ensure there is enough disk space and network stability, 2) Check the load on your Elasticsearch cluster and reduce it if necessary, 3) Retry the snapshot recovery process, and 4) Check for any underlying issues in your Elasticsearch logs.

This guide will help you check for common problems that cause the log ” Recover snapshot files cancelled ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: recovery, snapshot, indices.

Log Context

Log “Recover snapshot files cancelled” class name is RecoverySourceHandler.java. We extracted the following from Elasticsearch source code for those seeking an in-depth context :

 // valid; it means that some of the snapshot files download failed and the snapshot files
 // differ from the source index files. In that case we have to cancel all pending operations
 // and wait until all the in-flight operations are done to reset the recovery and start from
 // scratch using the source node index files.
 assert this.cancelled.get();
 throw new CancellableThreads.ExecutionCancelledException("Recover snapshot files cancelled");
 }
 }  private void unTrackOutstandingRequest(ListenableFuture future) {
 synchronized (outstandingRequests) {

 

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?