apache/hadoop · error · InvalidBlockReportLeaseException
Block report 0x{} was rejected as lease 0x{} is invalid
Error message
Block report 0x{} was rejected as lease 0x{} is invalid What it means
Error "Block report 0x{} was rejected as lease 0x{} is invalid" thrown in apache/hadoop.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNodeRpcServer.java:1668
final BlockManager bm = namesystem.getBlockManager();
boolean noStaleStorages = false;
try {
if (bm.checkBlockReportLease(context, nodeReg)) {
for (int r = 0; r < reports.length; r++) {
final BlockListAsLongs blocks = reports[r].getBlocks();
//
// BlockManager.processReport accumulates information of prior calls
// for the same node and storage, so the value returned by the last
// call of this loop is the final updated value for noStaleStorage.
//
final int index = r;
noStaleStorages = bm.runBlockOp(() ->
bm.processReport(nodeReg, reports[index].getStorage(),
blocks, context));
}
} else {
if (bm.shouldRejectInvalidBlockReportLease()) {
throw new InvalidBlockReportLeaseException(
context.getReportId(), context.getLeaseId());
}
}
} catch (UnregisteredNodeException une) {
LOG.warn("Datanode {} is attempting to report but not register yet.",
nodeReg);
return RegisterCommand.REGISTER;
}
bm.removeBRLeaseIfNeeded(nodeReg, context);
BlockManagerFaultInjector.getInstance().
incomingBlockReportRpc(nodeReg, context);
if (nn.getFSImage().isUpgradeFinalized() &&
!namesystem.isRollingUpgrade() &&
nn.isActiveState() &&
noStaleStorages) {
return new FinalizeCommand(poolId);View on GitHub (pinned to 2add963021)
Solutions
- Restart or re-register the DataNode so it obtains a valid lease/pool registration before sending block reports.
When it happens
Trigger: A DataNode sends a block report whose lease ID does not match the NameNode's registered lease, e.g., after NameNode restart.
Common situations: Stale DataNodes reporting blocks to a freshly restarted or failover NameNode.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/45305dcf1f62c017.
Report an issue: GitHub.