apache/hadoop · error · IOException
Delegation Token can be renewed only with kerberos or web au
Error message
Delegation Token can be renewed only with kerberos or web authentication
What it means
Error "Delegation Token can be renewed only with kerberos or web authentication" thrown in apache/hadoop.
Source
Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java:6490
* @param token token to renew
* @return new expiryTime of the token
* @throws InvalidToken if {@code token} is invalid
* @throws IOException on other errors
*/
long renewDelegationToken(Token<DelegationTokenIdentifier> token)
throws InvalidToken, IOException {
final String operationName = "renewDelegationToken";
String tokenId = null;
long expiryTime;
checkOperation(OperationCategory.WRITE);
try {
writeLock(RwLockMode.FS);
try {
checkOperation(OperationCategory.WRITE);
checkNameNodeSafeMode("Cannot renew delegation token");
if (!isAllowedDelegationTokenOp()) {
throw new IOException(
"Delegation Token can be renewed only with kerberos or web "
+ "authentication");
}
String renewer = getRemoteUser().getShortUserName();
expiryTime = dtSecretManager.renewToken(token, renewer);
final DelegationTokenIdentifier id = DFSUtil.decodeDelegationToken(
token);
getEditLog().logRenewDelegationToken(id, expiryTime);
tokenId = id.toStringStable();
} finally {
writeUnlock(RwLockMode.FS, operationName, getLockReportInfoSupplier(tokenId));
}
} catch (AccessControlException ace) {
final DelegationTokenIdentifier id = DFSUtil.decodeDelegationToken(token);
tokenId = id.toStringStable();
logAuditEvent(false, operationName, tokenId);
throw ace;
}View on GitHub (pinned to 2add963021)
Solutions
- Use Kerberos or web authentication to renew delegation tokens; simple authentication connections cannot renew tokens.
When it happens
Trigger: A client calls renewDelegationToken on a connection that is not Kerberos- or web-authenticated.
Common situations: Renewing a token from a host without valid Kerberos credentials or on a simple-auth cluster.
Understand the failure class
- Authentication and authorization failures — expired tokens, bad credentials, and missing scopes.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/a69758cbb76edd91.
Report an issue: GitHub.