apache/hadoop · error · IOException
No active and not excluded nodes contain this block
Error message
No active and not excluded nodes contain this block
What it means
Replica-selection failure in WebHDFS bestNode: every located datanode is decommissioned or excluded, so there is no active, non-excluded node to redirect the block request to.
Solutions
- Check cluster health: run 'hdfs dfsadmin -report' and restart or decommission dead DataNodes so enough live, non-excluded nodes exist for the block placement.
- Increase dfs.namenode.replication.min or reduce the file's replication factor if the cluster has fewer live nodes than the requested replication.
- Verify that excluded nodes in the exclude file (dfs.hosts.exclude) are still needed; refresh with 'hdfs dfsadmin -refreshNodes' after removing stale exclusions.
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown when a WebHDFS request (e.g. OPEN/GETFILECHECKSUM) needs block locations but every DataNode holding the block is either dead/stale or listed in the client's exclude set, typically after repeated retries against failed DataNodes.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/4af0244bbe7f3958.
Report an issue: GitHub.
Appendix: source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/web/resources/NamenodeWebHdfsMethods.java:371
}
return (DatanodeDescriptor)bm.getDatanodeManager().getNetworkTopology(
).chooseRandom(NodeBase.ROOT, excludes);
}
/**
* Choose the datanode to redirect the request. Note that the nodes have been
* sorted based on availability and network distances, thus it is sufficient
* to return the first element of the node here.
*/
protected static DatanodeInfo bestNode(DatanodeInfo[] nodes,
Set<Node> excludes) throws IOException {
for (DatanodeInfo dn: nodes) {
if (!dn.isDecommissioned() && !excludes.contains(dn)) {
return dn;
}
}
throw new IOException("No active and not excluded nodes contain this block");
}
public long renewDelegationToken(Token<DelegationTokenIdentifier> token)
throws IOException {
ClientProtocol cp = getRpcClientProtocol();
return cp.renewDelegationToken(token);
}
public void cancelDelegationToken(Token<DelegationTokenIdentifier> token)
throws IOException {
ClientProtocol cp = getRpcClientProtocol();
cp.cancelDelegationToken(token);
}
public Credentials createCredentials(final UserGroupInformation ugi,
final String renewer) throws IOException {
final NameNode namenode = (NameNode)context.getAttribute("name.node");
final Credentials c = DelegationTokenSecretManager.createCredentials(View on GitHub (pinned to 2add963021)