apache/hadoop · error · java.io.IOException

No MD5 file found corresponding to image file {imageFile}

Error message

No MD5 file found corresponding to image file {imageFile}

What it means

Error "No MD5 file found corresponding to image file {imageFile}" thrown in apache/hadoop.

Source

Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImage.java:949

          break;
        }
      }
    } finally {
      FSEditLog.closeAllStreams(editStreams);
    }
    return lastAppliedTxId - prevLastAppliedTxId;
  }

  /**
   * Load the image namespace from the given image file, verifying
   * it against the MD5 sum stored in its associated .md5 file.
   */
  private void loadFSImage(File imageFile, FSNamesystem target,
      MetaRecoveryContext recovery, boolean requireSameLayoutVersion)
      throws IOException {
    MD5Hash expectedMD5 = MD5FileUtils.readStoredMd5ForFile(imageFile);
    if (expectedMD5 == null) {
      throw new IOException("No MD5 file found corresponding to image file "
          + imageFile);
    }
    loadFSImage(imageFile, expectedMD5, target, recovery,
        requireSameLayoutVersion);
  }
  
  /**
   * Load in the filesystem image from file. It's a big list of
   * filenames and blocks.
   */
  private void loadFSImage(File curFile, MD5Hash expectedMd5,
      FSNamesystem target, MetaRecoveryContext recovery,
      boolean requireSameLayoutVersion) throws IOException {
    // BlockPoolId is required when the FsImageLoader loads the rolling upgrade
    // information. Make sure the ID is properly set.
    target.setBlockPoolId(this.getBlockPoolID());

    FSImageFormat.LoaderDelegator loader = FSImageFormat.newLoader(conf, target);

View on GitHub (pinned to 2add963021)

Solutions

  1. Ensure the fsimage MD5 sidecar file is present alongside the image; re-transfer the image including its .md5 file.
  2. Re-checkpoint from a healthy NameNode to regenerate image and MD5.

When it happens

Trigger: Loading an fsimage file whose companion .md5 checksum file is missing from the storage directory.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22). Data as JSON: /api/errors/2a23c01ea7c198c9. Report an issue: GitHub.