{"record":{"id":"d2ff1a643841d29a","repo":"apache/hadoop","slug":"image-version-is-not-equal-to-the-software-vers","errorCode":null,"errorMessage":"Image version {} is not equal to the software version {}","messagePattern":"Image version (.+?) is not equal to the software version (.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageFormatProtobuf.java","lineNumber":366,"sourceCode":"            threads, DFSConfigKeys.DFS_IMAGE_PARALLEL_THREADS_DEFAULT);\n        threads = DFSConfigKeys.DFS_IMAGE_PARALLEL_THREADS_DEFAULT;\n      }\n      ExecutorService executorService = Executors.newFixedThreadPool(\n          threads);\n      LOG.info(\"The fsimage will be loaded in parallel using {} threads\",\n          threads);\n      return executorService;\n    }\n\n    private void loadInternal(RandomAccessFile raFile, FileInputStream fin)\n        throws IOException {\n      if (!FSImageUtil.checkFileFormat(raFile)) {\n        throw new IOException(\"Unrecognized file format\");\n      }\n      FileSummary summary = FSImageUtil.loadSummary(raFile);\n      if (requireSameLayoutVersion && summary.getLayoutVersion() !=\n          HdfsServerConstants.NAMENODE_LAYOUT_VERSION) {\n        throw new IOException(\"Image version \" + summary.getLayoutVersion() +\n            \" is not equal to the software version \" +\n            HdfsServerConstants.NAMENODE_LAYOUT_VERSION);\n      }\n\n      FileChannel channel = fin.getChannel();\n\n      FSImageFormatPBINode.Loader inodeLoader = new FSImageFormatPBINode.Loader(\n          fsn, this);\n      FSImageFormatPBSnapshot.Loader snapshotLoader = new FSImageFormatPBSnapshot.Loader(\n          fsn, this);\n\n      ArrayList<FileSummary.Section> sections = Lists.newArrayList(summary\n          .getSectionsList());\n      Collections.sort(sections, new Comparator<FileSummary.Section>() {\n        @Override\n        public int compare(FileSummary.Section s1, FileSummary.Section s2) {\n          SectionName n1 = SectionName.fromString(s1.getName());\n          SectionName n2 = SectionName.fromString(s2.getName());","sourceCodeStart":348,"sourceCodeEnd":384,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageFormatProtobuf.java#L348-L384","documentation":"Error \"Image version {} is not equal to the software version {}\" thrown in apache/hadoop.","triggerScenarios":"Loading a protobuf fsimage whose recorded image layout version differs from the running software's layout version.","commonSituations":"See trigger scenarios.","solutions":["Load the image with the software version that created it, or perform a formal NameNode upgrade."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}