apache/hadoop · error · HadoopIllegalArgumentException
Shared edits storage is not enabled for this namenode.
Error message
Shared edits storage is not enabled for this namenode.
What it means
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.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/ha/BootstrapStandby.java:468
return nsInfo.getLayoutVersion() <=
HdfsServerConstants.MINIMUM_COMPATIBLE_NAMENODE_LAYOUT_VERSION;
}
return nsInfo.getLayoutVersion() == nsInfo.getServiceLayoutVersion();
}
private void parseConfAndFindOtherNN() throws IOException {
Configuration conf = getConf();
nsId = DFSUtil.getNamenodeNameServiceId(conf);
if (!HAUtil.isHAEnabled(conf, nsId)) {
throw new HadoopIllegalArgumentException(
"HA is not enabled for this namenode.");
}
nnId = HAUtil.getNameNodeId(conf, nsId);
NameNode.initializeGenericKeys(conf, nsId, nnId);
if (!HAUtil.usesSharedEditsDir(conf)) {
throw new HadoopIllegalArgumentException(
"Shared edits storage is not enabled for this namenode.");
}
remoteNNs = RemoteNameNodeInfo.getRemoteNameNodes(conf, nsId);
// validate the configured NNs
List<RemoteNameNodeInfo> remove = new ArrayList<RemoteNameNodeInfo>(remoteNNs.size());
for (RemoteNameNodeInfo info : remoteNNs) {
InetSocketAddress address = info.getIpcAddress();
LOG.info("Found nn: " + info.getNameNodeID() + ", ipc: " + info.getIpcAddress());
if (address.getPort() == 0 || address.getAddress().isAnyLocalAddress()) {
LOG.error("Could not determine valid IPC address for other NameNode ("
+ info.getNameNodeID() + ") , got: " + address);
remove.add(info);
}
}
// remove any invalid nnsView on GitHub (pinned to 2add963021)
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
Example fix
<!-- before --> <!-- dfs.namenode.shared.edits.dir missing --> <!-- after --> <property> <name>dfs.namenode.shared.edits.dir</name> <value>qjournal://jn1:8485;jn2:8485;jn3:8485/ns1</value> </property>
Defensive patterns
Strategy: validation
Validate before calling
if (!HAUtil.usesSharedEditsDir(conf)) {
throw new IOException("Refusing bootstrapStandby: "
+ "dfs.namenode.shared.edits.dir is not set");
} Try / catch
try {
tool.run(argv);
} catch (HadoopIllegalArgumentException e) { // "Shared edits storage is not enabled..."
// set dfs.namenode.shared.edits.dir to the active's value and re-run
} Prevention
- 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
When it happens
Trigger: '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.
Common situations: 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.
Related errors
- HA is not enabled for this namenode.
- No targets in destination storage!
- InMemoryAliasMap enabled with null location
- Configuration has multiple addresses that match local node's
- Configuration dfs.namenode.rpc-address must be suffixed with
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/9dd393f73776e15c.
Report an issue: GitHub.