apache/hadoop · error · IOException
Can't continue since none or more than one…
Error message
Can't continue since none or more than one BlockTokenIdentifier is found.
What it means
checkBlockToken validation: exactly one BlockTokenIdentifier must be present in the caller's UGI tokens to authorize the block read; zero or multiple identifiers make authorization ambiguous, so the request is rejected.
Solutions
- Ensure the client sends exactly one block token for the operation; regenerate the access token via the NameNode if the connection carried zero or multiple BlockTokenIdentifiers.
- Check for custom token serialization code or proxies that duplicate/strip tokens on the data transfer connection.
Defensive patterns
Strategy: validation
When it happens
Trigger: During token-based connection setup, the DataNode finds zero or more than one BlockTokenIdentifier among the connection's tokens.
Common situations: Zero or multiple BlockTokenIdentifiers were presented where exactly one is required. Indicates a malformed client request; upgrade mismatched client versions.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/2f664984d4c8a0ea.
Report an issue: GitHub.
Appendix: source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java:3604
checkReadAccess(block);
return data.getReplicaVisibleLength(block);
}
private void checkReadAccess(final ExtendedBlock block) throws IOException {
// Make sure this node has registered for the block pool.
try {
getDNRegistrationForBP(block.getBlockPoolId());
} catch (IOException e) {
// if it has not registered with the NN, throw an exception back.
throw new org.apache.hadoop.ipc.RetriableException(
"Datanode not registered. Try again later.");
}
if (isBlockTokenEnabled) {
Set<TokenIdentifier> tokenIds = UserGroupInformation.getCurrentUser()
.getTokenIdentifiers();
if (tokenIds.size() != 1) {
throw new IOException("Can't continue since none or more than one "
+ "BlockTokenIdentifier is found.");
}
for (TokenIdentifier tokenId : tokenIds) {
BlockTokenIdentifier id = (BlockTokenIdentifier) tokenId;
LOG.debug("BlockTokenIdentifier: {}", id);
blockPoolTokenSecretManager.checkAccess(id, null, block,
BlockTokenIdentifier.AccessMode.READ, null, null);
}
}
}
/**
* Transfer a replica to the datanode targets.
* @param b the block to transfer.
* The corresponding replica must be an RBW or a Finalized.
* Its GS and numBytes will be set to
* the stored GS and the visible length.
* @param targets targets to transfer the block toView on GitHub (pinned to 2add963021)