apache/hadoop · error · IncorrectVersionException
Unexpected version of data node. Reported: {}. Expecting = {
Error message
Unexpected version of data node. Reported: {}. Expecting = {}. What it means
Error "Unexpected version of data node. Reported: {}. Expecting = {}." thrown in apache/hadoop.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java:1899
nn.checkHaStateChange(req);
nn.transitionToObserver();
}
@Override // HAServiceProtocol
public synchronized HAServiceStatus getServiceStatus()
throws AccessControlException, ServiceFailedException, IOException {
checkNNStartup();
return nn.getServiceStatus();
}
/**
* Verify version.
* @param version layout version
* @throws IOException on layout version mismatch
*/
void verifyLayoutVersion(int version) throws IOException {
if (version != HdfsServerConstants.NAMENODE_LAYOUT_VERSION)
throw new IncorrectVersionException(
HdfsServerConstants.NAMENODE_LAYOUT_VERSION, version, "data node");
}
private void verifySoftwareVersion(DatanodeRegistration dnReg)
throws IncorrectVersionException {
String dnVersion = dnReg.getSoftwareVersion();
if (VersionUtil.compareVersions(dnVersion, minimumDataNodeVersion) < 0) {
IncorrectVersionException ive = new IncorrectVersionException(
minimumDataNodeVersion, dnVersion, "DataNode", "NameNode");
LOG.warn(ive.getMessage() + " DN: " + dnReg);
throw ive;
}
String nnVersion = VersionInfo.getVersion();
if (!dnVersion.equals(nnVersion)) {
String messagePrefix = "Reported DataNode version '" + dnVersion +
"' of DN " + dnReg + " does not match NameNode version '" +
nnVersion + "'";
long nnCTime = nn.getFSImage().getStorage().getCTime();View on GitHub (pinned to 2add963021)
Solutions
- Upgrade or downgrade the DataNode to a version compatible with the NameNode's expected version.
When it happens
Trigger: A DataNode registers or heartbeats with a software/layout version the NameNode does not accept.
Common situations: Mixing DataNode and NameNode versions during a partial or failed rolling upgrade.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/c9cc25968872f3b0.
Report an issue: GitHub.