{"record":{"id":"27b134637c6b42a7","repo":"apache/hadoop","slug":"unsupported-stage-while-receiving-block-from","errorCode":null,"errorMessage":"Unsupported stage {} while receiving block {} from {}","messagePattern":"Unsupported stage (.+?) while receiving block (.+?) from (.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java","lineNumber":252,"sourceCode":"        case PIPELINE_SETUP_APPEND:\n          replicaHandler = datanode.data.append(block, newGs, minBytesRcvd);\n          block.setGenerationStamp(newGs);\n          datanode.notifyNamenodeReceivingBlock(\n              block, replicaHandler.getReplica().getStorageUuid());\n          break;\n        case PIPELINE_SETUP_APPEND_RECOVERY:\n          replicaHandler = datanode.data.recoverAppend(block, newGs, minBytesRcvd);\n          block.setGenerationStamp(newGs);\n          datanode.notifyNamenodeReceivingBlock(\n              block, replicaHandler.getReplica().getStorageUuid());\n          break;\n        case TRANSFER_RBW:\n        case TRANSFER_FINALIZED:\n          // this is a transfer destination\n          replicaHandler = datanode.data.createTemporary(storageType, storageId,\n              block, isTransfer);\n          break;\n        default: throw new IOException(\"Unsupported stage \" + stage + \n              \" while receiving block \" + block + \" from \" + inAddr);\n        }\n      }\n      replicaInfo = replicaHandler.getReplica();\n      this.dropCacheBehindWrites = (cachingStrategy.getDropBehind() == null) ?\n        datanode.getDnConf().dropCacheBehindWrites :\n          cachingStrategy.getDropBehind();\n      this.syncBehindWrites = datanode.getDnConf().syncBehindWrites;\n      this.syncBehindWritesInBackground = datanode.getDnConf().\n          syncBehindWritesInBackground;\n      \n      final boolean isCreate = isDatanode || isTransfer \n          || stage == BlockConstructionStage.PIPELINE_SETUP_CREATE;\n      streams = replicaInfo.createStreams(isCreate, requestedChecksum);\n      assert streams != null : \"null streams!\";\n\n      // read checksum meta information\n      this.clientChecksum = requestedChecksum;","sourceCodeStart":234,"sourceCodeEnd":270,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java#L234-L270","documentation":"Error \"Unsupported stage {} while receiving block {} from {}\" thrown in apache/hadoop.","triggerScenarios":"A client (or upstream DataNode in a write pipeline) sends a block write request with a stage value the receiver does not recognize, typically due to version mismatch or corrupted protocol data.","commonSituations":"A client or upstream DataNode sent a pipeline packet with a stage the receiver does not support. Prevent by keeping client and DataNode versions compatible during rolling upgrades.","solutions":["Ensure the client and DataNode run compatible Hadoop versions so the pipeline stage (PIPELINE_SETUP_CREATE, TRANSFER_RBW, etc.) is recognized by the receiver.","Check for network corruption or non-HDFS traffic hitting the DataNode streaming port; the op code must match a known BlockConstructionStage."],"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-23T01:17:44.959Z"}