{"record":{"id":"9dd393f73776e15c","repo":"apache/hadoop","slug":"shared-edits-storage-is-not-enabled-for-this-namen","errorCode":null,"errorMessage":"Shared edits storage is not enabled for this namenode.","messagePattern":"Shared edits storage is not enabled for this namenode\\.","errorType":"validation","errorClass":"HadoopIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/BootstrapStandby.java","lineNumber":468,"sourceCode":"      return nsInfo.getLayoutVersion() <=\n          HdfsServerConstants.MINIMUM_COMPATIBLE_NAMENODE_LAYOUT_VERSION;\n    }\n    return nsInfo.getLayoutVersion() == nsInfo.getServiceLayoutVersion();\n  }\n\n  private void parseConfAndFindOtherNN() throws IOException {\n    Configuration conf = getConf();\n    nsId = DFSUtil.getNamenodeNameServiceId(conf);\n\n    if (!HAUtil.isHAEnabled(conf, nsId)) {\n      throw new HadoopIllegalArgumentException(\n          \"HA is not enabled for this namenode.\");\n    }\n    nnId = HAUtil.getNameNodeId(conf, nsId);\n    NameNode.initializeGenericKeys(conf, nsId, nnId);\n\n    if (!HAUtil.usesSharedEditsDir(conf)) {\n      throw new HadoopIllegalArgumentException(\n        \"Shared edits storage is not enabled for this namenode.\");\n    }\n\n\n    remoteNNs = RemoteNameNodeInfo.getRemoteNameNodes(conf, nsId);\n    // validate the configured NNs\n    List<RemoteNameNodeInfo> remove = new ArrayList<RemoteNameNodeInfo>(remoteNNs.size());\n    for (RemoteNameNodeInfo info : remoteNNs) {\n      InetSocketAddress address = info.getIpcAddress();\n      LOG.info(\"Found nn: \" + info.getNameNodeID() + \", ipc: \" + info.getIpcAddress());\n      if (address.getPort() == 0 || address.getAddress().isAnyLocalAddress()) {\n        LOG.error(\"Could not determine valid IPC address for other NameNode (\"\n            + info.getNameNodeID() + \") , got: \" + address);\n        remove.add(info);\n      }\n    }\n\n    // remove any invalid nns","sourceCodeStart":450,"sourceCodeEnd":486,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/BootstrapStandby.java#L450-L486","documentation":"BootstrapStandby requires a shared edits directory so it can place the downloaded image and edits where both NameNodes see them; when HAUtil.usesSharedEditsDir(conf) is false (dfs.namenode.shared.edits.dir unset/empty) it throws HadoopIllegalArgumentException. Without shared edits a standby cannot be populated by bootstrap.","triggerScenarios":"'hdfs namenode -bootstrapStandby' on an HA-configured node where dfs.namenode.shared.edits.dir is missing or empty — e.g., only NFS or local dirs configured, or the key is commented out on the new standby.","commonSituations":"New standby cloned without the shared-edits property; HA cluster using QJM where the qjournal URI was staged with a typo; shared-edits intentionally disabled on a single-node test setup while still trying bootstrapStandby.","solutions":["Set dfs.namenode.shared.edits.dir (e.g., qjournal://jn1:8485;jn2:8485;jn3:8485/<nsId> or an NFS path) to the same value the active uses","Verify the value parses and the journal nodes/NFS are reachable from the standby","Restart/re-run 'hdfs namenode -bootstrapStandby' after the config change"],"exampleFix":"<!-- before -->\n<!-- dfs.namenode.shared.edits.dir missing -->\n<!-- after -->\n<property>\n  <name>dfs.namenode.shared.edits.dir</name>\n  <value>qjournal://jn1:8485;jn2:8485;jn3:8485/ns1</value>\n</property>","handlingStrategy":"validation","validationCode":"if (!HAUtil.usesSharedEditsDir(conf)) {\n  throw new IOException(\"Refusing bootstrapStandby: \"\n      + \"dfs.namenode.shared.edits.dir is not set\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  tool.run(argv);\n} catch (HadoopIllegalArgumentException e) { // \"Shared edits storage is not enabled...\"\n  // set dfs.namenode.shared.edits.dir to the active's value and re-run\n}","preventionTips":["Mirror the active's dfs.namenode.shared.edits.dir verbatim on every standby","Lint HA config pairs (nameservice, namenode ids, shared edits) in CI for your cluster repo"],"tags":["hdfs","namenode","bootstrap-standby","ha","shared-edits","missing-configuration"],"backgroundTag":"missing-configuration","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}