{"record":{"id":"5d7a67eb89e53cc1","repo":"apache/hadoop","slug":"got-access-token-error-for-connect-ack-targets","errorCode":null,"errorMessage":"Got access token error for connect ack, targets={}","messagePattern":"Got access token error for connect ack, targets=(.+?)","errorType":"exception","errorClass":"InvalidBlockTokenException","httpStatus":null,"severity":"error","filePath":"hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java","lineNumber":3139,"sourceCode":"            false, false, null, storageId,\n            targetStorageIds);\n\n        // send data & checksum\n        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();","sourceCodeStart":3121,"sourceCodeEnd":3157,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java#L3121-L3157","documentation":"DataNode block-transfer ack handling: the connect ack from the downstream datanode carried an access-token error status for the listed targets, meaning the downstream failed block-pipeline authentication and the transfer must fail.","triggerScenarios":"While establishing a data transfer connection (connect ack), the block access token validation fails for the given target DataNodes.","commonSituations":"Block access token validation failed while connecting to pipeline targets. Check token enablement consistency and clock skew between nodes.","solutions":["Ensure dfs.block.access.token.enable is enabled consistently across client, NameNode, and DataNode when security is on.","Check that the block access token presented by the client was issued by the NameNode for these targets and has not expired."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}