Checksum mismatch between local and remote segment file will override local file – How to solve this OpenSearch error

Opster Team

Aug-23, Version: 2.5-2.9

Before you dig into reading this guide, have you tried asking OpsGPT what this log means? You’ll receive a customized analysis of your log.

Try OpsGPT now for step-by-step guidance and tailored insights into your OpenSearch operation.

Briefly, this error occurs when there is a discrepancy between the checksums of a local and a remote segment file in OpenSearch. This usually happens when the data in the local file has been altered or corrupted. To resolve this issue, you can allow OpenSearch to override the local file as suggested in the error message. Alternatively, you can manually replace the local file with a backup if available. Also, ensure that your system is protected against data corruption by using reliable hardware and software, and regularly checking for viruses or malware.

For a complete solution to your to your search operation, try for free AutoOps for Elasticsearch & OpenSearch . With AutoOps and Opster’s proactive support, you don’t have to worry about your search operation – we take charge of it. Get improved performance & stability with less hardware.

This guide will help you check for common problems that cause the log ” Checksum mismatch between local and remote segment file: {}; will override local file ” to appear. To understand the issues related to this log, read the explanation below about the following OpenSearch concepts: index, shard.

Log Context

Log “Checksum mismatch between local and remote segment file: {}; will override local file” classname is
We extracted the following from OpenSearch source code for those seeking an in-depth context :

    private boolean localDirectoryContains(Directory localDirectory; String file; long checksum) {
        try (IndexInput indexInput = localDirectory.openInput(file; IOContext.DEFAULT)) {
            if (checksum == CodecUtil.retrieveChecksum(indexInput)) {
                return true;
            } else {
                logger.warn("Checksum mismatch between local and remote segment file: {}; will override local file"; file);
        } catch (NoSuchFileException | FileNotFoundException e) {
            logger.debug("File {} does not exist in local FS; downloading from remote store"; file);
        } catch (IOException e) {
            logger.warn("Exception while reading checksum of file: {}; this can happen if file is corrupted"; file);


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?

Get expert answers on Elasticsearch/OpenSearch