{"record":{"id":"226b97f771ba157c","repo":"apache/hadoop","slug":"no-live-nodes-contain-current-block","errorCode":null,"errorMessage":"No live nodes contain current block","messagePattern":"No live nodes contain current block","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java","lineNumber":1180,"sourceCode":"    }\n    return bytesRead;\n  }\n\n  @Override\n  public DataEncryptionKey newDataEncryptionKey() throws IOException {\n    return namenode.getRpcServer().getDataEncryptionKey();\n  }\n\n  /*\n   * XXX (ab) See comment above for copyBlock().\n   *\n   * Pick the best node from which to stream the data.\n   * That's the local one, if available.\n   */\n  private DatanodeInfo bestNode(DFSClient dfs, DatanodeInfo[] nodes,\n      Set<DatanodeInfo> deadNodes) throws IOException {\n    if ((nodes == null) || (nodes.length - deadNodes.size() < 1)) {\n      throw new IOException(\"No live nodes contain current block\");\n    }\n    DatanodeInfo chosenNode;\n    do {\n      chosenNode = nodes[ThreadLocalRandom.current().nextInt(nodes.length)];\n    } while (deadNodes.contains(chosenNode));\n    return chosenNode;\n  }\n\n  private void lostFoundInit(DFSClient dfs) {\n    lfInited = true;\n    try {\n      String lfName = \"/lost+found\";\n\n      final HdfsFileStatus lfStatus = dfs.getFileInfo(lfName);\n      if (lfStatus == null) { // not exists\n        lfInitedOk = dfs.mkdirs(lfName, null, true);\n        lostFound = lfName;\n      } else if (!lfStatus.isDirectory()) { // exists but not a directory","sourceCodeStart":1162,"sourceCodeEnd":1198,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NamenodeFsck.java#L1162-L1198","documentation":"Error \"No live nodes contain current block\" thrown in apache/hadoop.","triggerScenarios":"fsck finds a block whose replicas exist only on dead or decommissioned DataNodes.","commonSituations":"Multiple DataNode failures or disks lost, leaving no live replica of the block.","solutions":["Bring back DataNodes holding the block or restore from backup; the block is unavailable on all live nodes."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}