Corrupted file detected checksum mismatch – How to solve related issues

Opster Team

Jan-20, Version: 1.7-8.0

Before you begin reading this guide, we recommend you run Elasticsearch Error Check-Up which analyzes 2 JSON files to detect many errors.

Briefly, this error message indicates that a corrupted file was detected and the checksum does not match the expected value. The reason for this error could be a problem with the Elasticsearch instance or a problem with the file system. To resolve the issue, the file system should be checked for errors or Elasticsearch should be restarted.

To easily locate the root cause and resolve this issue try AutoOps for Elasticsearch & OpenSearch. It diagnoses problems by analyzing hundreds of metrics collected by a lightweight agent and offers guidance for resolving them. Take a self-guided product tour to see for yourself (no registration required).

This guide will help you check for common problems that cause the log ” Corrupted file detected checksum mismatch ” to appear. To understand the issues related to this log, read the explanation below about the following Elasticsearch concepts: discovery-file, handler, indices, recovery and source.

Log Context

Log “{} Corrupted file detected {} checksum mismatch” classname is
We extracted the following from Elasticsearch source code for those seeking an in-depth context :

    private void handleErrorOnSendFiles(Store store; StoreFileMetaData md; Exception e) throws Exception {
        final IOException corruptIndexException;
        if ((corruptIndexException = ExceptionsHelper.unwrapCorruption(e)) != null) {
            if (store.checkIntegrityNoException(md) == false) { // we are corrupted on the primary -- fail!
                logger.warn("{} Corrupted file detected {} checksum mismatch"; shardId; md);
                throw corruptIndexException;
            } else { // corruption has happened on the way to replica
                RemoteTransportException exception = new RemoteTransportException(
                    "File corruption occurred on recovery but checksums are ok"; null);


Watch product tour

Try AutoOps to find & fix Elasticsearch problems

Analyze Your Cluster
Skip to content