{"record":{"id":"64eff36b6566567a","repo":"apache/hadoop","slug":"bad-connect-ack-targets-status","errorCode":null,"errorMessage":"Bad connect ack, targets={} status={}","messagePattern":"Bad connect ack, targets=(.+?) status=(.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java","lineNumber":3143,"sourceCode":"        blockSender.sendBlock(out, unbufOut, throttler);\n\n        // no response necessary\n        LOG.info(\"{}, at {}: Transmitted {} (numBytes={}) to {}\",\n            getClass().getSimpleName(), DataNode.this.getDisplayName(),\n            b, b.getNumBytes(), curTarget);\n\n        // read ack\n        if (isClient) {\n          DNTransferAckProto closeAck = DNTransferAckProto.parseFrom(\n              PBHelperClient.vintPrefixed(in));\n          LOG.debug(\"{}: close-ack={}\", getClass().getSimpleName(), closeAck);\n          if (closeAck.getStatus() != Status.SUCCESS) {\n            if (closeAck.getStatus() == Status.ERROR_ACCESS_TOKEN) {\n              throw new InvalidBlockTokenException(\n                  \"Got access token error for connect ack, targets=\"\n                   + Arrays.asList(targets));\n            } else {\n              throw new IOException(\"Bad connect ack, targets=\"\n                  + Arrays.asList(targets) + \" status=\" + closeAck.getStatus());\n            }\n          }\n        } else {\n          metrics.incrBlocksReplicated();\n        }\n      } catch (IOException ie) {\n        handleBadBlock(b, ie, false);\n        LOG.warn(\"{}:Failed to transfer {} to {} got\",\n            bpReg, b, targets[0], ie);\n      } catch (Throwable t) {\n        LOG.error(\"Failed to transfer block {}\", b, t);\n      } finally {\n        decrementXmitsInProgress();\n        IOUtils.closeStream(blockSender);\n        IOUtils.closeStream(out);\n        IOUtils.closeStream(in);\n        IOUtils.closeSocket(sock);","sourceCodeStart":3125,"sourceCodeEnd":3161,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java#L3125-L3161","documentation":"Error \"Bad connect ack, targets={} status={}\" thrown in apache/hadoop.","triggerScenarios":"A downstream DataNode in a write pipeline replies to the connect request with a non-SUCCESS status.","commonSituations":"A downstream DataNode returned a bad status on connect ack during pipeline setup. Inspect the target DataNode logs for the underlying error.","solutions":["Check the status code in the message against DataTransferProtocol statuses; address the reported cause on the target DataNode (e.g., ERROR_ACCESS_TOKEN, ERROR_UNSUPPORTED_OPERATION).","Verify client and DataNode versions and security configuration are consistent across the pipeline."],"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"}