apache/hadoop · error · InvalidBlockTokenException
Got access token error for connect ack, targets={}
Error message
Got access token error for connect ack, targets={} What it means
Error "Got access token error for connect ack, targets={}" thrown in apache/hadoop.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java:3139
false, false, null, storageId,
targetStorageIds);
// send data & checksum
blockSender.sendBlock(out, unbufOut, throttler);
// no response necessary
LOG.info("{}, at {}: Transmitted {} (numBytes={}) to {}",
getClass().getSimpleName(), DataNode.this.getDisplayName(),
b, b.getNumBytes(), curTarget);
// read ack
if (isClient) {
DNTransferAckProto closeAck = DNTransferAckProto.parseFrom(
PBHelperClient.vintPrefixed(in));
LOG.debug("{}: close-ack={}", getClass().getSimpleName(), closeAck);
if (closeAck.getStatus() != Status.SUCCESS) {
if (closeAck.getStatus() == Status.ERROR_ACCESS_TOKEN) {
throw new InvalidBlockTokenException(
"Got access token error for connect ack, targets="
+ Arrays.asList(targets));
} else {
throw new IOException("Bad connect ack, targets="
+ Arrays.asList(targets) + " status=" + closeAck.getStatus());
}
}
} else {
metrics.incrBlocksReplicated();
}
} catch (IOException ie) {
handleBadBlock(b, ie, false);
LOG.warn("{}:Failed to transfer {} to {} got",
bpReg, b, targets[0], ie);
} catch (Throwable t) {
LOG.error("Failed to transfer block {}", b, t);
} finally {
decrementXmitsInProgress();View on GitHub (pinned to 2add963021)
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.
When it happens
Trigger: While establishing a data transfer connection (connect ack), the block access token validation fails for the given target DataNodes.
Common situations: Block access token validation failed while connecting to pipeline targets. Check token enablement consistency and clock skew between nodes.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/5d7a67eb89e53cc1.
Report an issue: GitHub.