{"record":{"id":"38300c6efba868a7","repo":"apache/hadoop","slug":"algorithm-md5-not-found","errorCode":null,"errorMessage":"Algorithm 'MD5' not found","messagePattern":"Algorithm 'MD5' not found","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java","lineNumber":962,"sourceCode":"\n      // Get the checksum type from config\n      String checksumTypeStr = conf.get(DFS_CHECKSUM_TYPE_KEY,\n          DFS_CHECKSUM_TYPE_DEFAULT);\n      this.isSnapshotTrashRootEnabled = conf.getBoolean(\n          DFS_NAMENODE_SNAPSHOT_TRASHROOT_ENABLED,\n          DFS_NAMENODE_SNAPSHOT_TRASHROOT_ENABLED_DEFAULT);\n      DataChecksum.Type checksumType;\n      try {\n         checksumType = DataChecksum.Type.valueOf(checksumTypeStr);\n      } catch (IllegalArgumentException iae) {\n         throw new IOException(\"Invalid checksum type in \"\n            + DFS_CHECKSUM_TYPE_KEY + \": \" + checksumTypeStr);\n      }\n\n      try {\n        digest = MessageDigest.getInstance(\"MD5\");\n      } catch (NoSuchAlgorithmException e) {\n        throw new IOException(\"Algorithm 'MD5' not found\");\n      }\n\n      this.serverDefaults = new FsServerDefaults(\n          conf.getLongBytes(DFS_BLOCK_SIZE_KEY, DFS_BLOCK_SIZE_DEFAULT),\n          conf.getInt(DFS_BYTES_PER_CHECKSUM_KEY, DFS_BYTES_PER_CHECKSUM_DEFAULT),\n          conf.getInt(DFS_CLIENT_WRITE_PACKET_SIZE_KEY, DFS_CLIENT_WRITE_PACKET_SIZE_DEFAULT),\n          (short) conf.getInt(DFS_REPLICATION_KEY, DFS_REPLICATION_DEFAULT),\n          conf.getInt(IO_FILE_BUFFER_SIZE_KEY, IO_FILE_BUFFER_SIZE_DEFAULT),\n          conf.getBoolean(DFS_ENCRYPT_DATA_TRANSFER_KEY, DFS_ENCRYPT_DATA_TRANSFER_DEFAULT),\n          conf.getLong(FS_TRASH_INTERVAL_KEY, FS_TRASH_INTERVAL_DEFAULT),\n          checksumType,\n          conf.getTrimmed(\n              CommonConfigurationKeysPublic.HADOOP_SECURITY_KEY_PROVIDER_PATH,\n              \"\"),\n          blockManager.getStoragePolicySuite().getDefaultPolicy().getId(),\n          isSnapshotTrashRootEnabled);\n\n      this.maxFsObjects = conf.getLong(DFS_NAMENODE_MAX_OBJECTS_KEY, ","sourceCodeStart":944,"sourceCodeEnd":980,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java#L944-L980","documentation":"FSNamesystem initialization needs an MD5 MessageDigest (for the per-storage-dir digest it reports). On any standard JDK/JRE MD5 is built in, so this IOException ('Algorithm MD5 not found') essentially never fires; it indicates a broken security-provider setup — a stripped or altered java.security configuration, a JCE policy that removed MD5, or an exotic JVM whose providers do not expose MD5.","triggerScenarios":"MessageDigest.getInstance(\"MD5\") throwing NoSuchAlgorithmException during FSNamesystem construction — only possible when the JVM's registered security providers supply no MD5 implementation.","commonSituations":"Hardened/FIPS-mode JVM images with MD5 disabled; a customized java.security file that dropped the default providers; a corrupted JDK installation.","solutions":["Run the NameNode on a stock, supported JDK distribution","Verify MD5 availability in that JVM: a one-liner calling MessageDigest.getInstance(\"MD5\") or 'java -XshowSettings:properties -version'","If MD5 was deliberately disabled (FIPS policy), use a JVM/provider configuration that still exposes it for the NN process — Hadoop's NameNode requires it","Reinstall or repair the JDK if the provider files were corrupted"],"exampleFix":"# before: NN JVM runs with a stripped java.security (MD5 absent)\n# after: point the NN at a stock JDK\nexport JAVA_HOME=/usr/lib/jvm/java-8-openjdk && hdfs --daemon start namenode","handlingStrategy":"validation","validationCode":"// deploy-time JVM check on the NameNode host\nMessageDigest.getInstance(\"MD5\"); // throws NoSuchAlgorithmException if the JVM lacks MD5","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Standardize NameNode hosts on stock supported JDK distributions","Add a MessageDigest.getInstance(\"MD5\") probe to host provisioning checks","Audit any java.security customization for removed providers before rolling it to NN hosts"],"tags":["hadoop","hdfs","namenode","jvm","security-provider","md5"],"backgroundTag":"unsupported-crypto-algorithm","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}