apache/hadoop · error · IOException
No live nodes contain current block
Error message
No live nodes contain current block
What it means
Error "No live nodes contain current block" thrown in apache/hadoop.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java:1180
}
return bytesRead;
}
@Override
public DataEncryptionKey newDataEncryptionKey() throws IOException {
return namenode.getRpcServer().getDataEncryptionKey();
}
/*
* XXX (ab) See comment above for copyBlock().
*
* Pick the best node from which to stream the data.
* That's the local one, if available.
*/
private DatanodeInfo bestNode(DFSClient dfs, DatanodeInfo[] nodes,
Set<DatanodeInfo> deadNodes) throws IOException {
if ((nodes == null) || (nodes.length - deadNodes.size() < 1)) {
throw new IOException("No live nodes contain current block");
}
DatanodeInfo chosenNode;
do {
chosenNode = nodes[ThreadLocalRandom.current().nextInt(nodes.length)];
} while (deadNodes.contains(chosenNode));
return chosenNode;
}
private void lostFoundInit(DFSClient dfs) {
lfInited = true;
try {
String lfName = "/lost+found";
final HdfsFileStatus lfStatus = dfs.getFileInfo(lfName);
if (lfStatus == null) { // not exists
lfInitedOk = dfs.mkdirs(lfName, null, true);
lostFound = lfName;
} else if (!lfStatus.isDirectory()) { // exists but not a directoryView on GitHub (pinned to 2add963021)
Solutions
- Bring back DataNodes holding the block or restore from backup; the block is unavailable on all live nodes.
When it happens
Trigger: fsck finds a block whose replicas exist only on dead or decommissioned DataNodes.
Common situations: Multiple DataNode failures or disks lost, leaving no live replica of the block.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/226b97f771ba157c.
Report an issue: GitHub.