apache/hadoop · error · IOException
Cannot use SecondaryNameNode in an HA cluster. The Standby N
Error message
Cannot use SecondaryNameNode in an HA cluster. The Standby Namenode will perform checkpointing.
What it means
Error "Cannot use SecondaryNameNode in an HA cluster. The Standby Namenode will perform checkpointing." thrown in apache/hadoop.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/SecondaryNameNode.java:190
@VisibleForTesting
void setNameNode(NamenodeProtocol namenode) {
this.namenode = namenode;
}
/**
* Create a connection to the primary namenode.
*/
public SecondaryNameNode(Configuration conf) throws IOException {
this(conf, new CommandLineOpts());
}
public SecondaryNameNode(Configuration conf,
CommandLineOpts commandLineOpts) throws IOException {
try {
String nsId = DFSUtil.getSecondaryNameServiceId(conf);
if (HAUtil.isHAEnabled(conf, nsId)) {
throw new IOException(
"Cannot use SecondaryNameNode in an HA cluster." +
" The Standby Namenode will perform checkpointing.");
}
NameNode.initializeGenericKeys(conf, nsId, null);
initialize(conf, commandLineOpts);
} catch (IOException e) {
shutdown();
throw e;
} catch (HadoopIllegalArgumentException e) {
shutdown();
throw e;
}
}
public static InetSocketAddress getHttpAddress(Configuration conf) {
return NetUtils.createSocketAddr(conf.getTrimmed(
DFSConfigKeys.DFS_NAMENODE_SECONDARY_HTTP_ADDRESS_KEY,
DFSConfigKeys.DFS_NAMENODE_SECONDARY_HTTP_ADDRESS_DEFAULT));View on GitHub (pinned to 2add963021)
Solutions
- Do not run the SecondaryNameNode in an HA cluster; the Standby NameNode performs checkpointing automatically.
When it happens
Trigger: The SecondaryNameNode is started in a cluster configured with HDFS High Availability.
Common situations: Legacy startup scripts still launching secondarynamenode after migrating to HA with JournalNodes.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/ba6eb0cca4aab98a.
Report an issue: GitHub.