apache/hadoop · error · IOException
Error reading token file at specified path: {}
Error message
Error reading token file at specified path: {} What it means
Error "Error reading token file at specified path: {}" thrown in apache/hadoop.
Source
Thrown at hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/oauth2/WorkloadIdentityTokenProvider.java:69
private final String tokenFile;
FileBasedClientAssertionProvider(String tokenFile) {
this.tokenFile = tokenFile;
}
@Override
public void initialize(Configuration configuration, String accountName) throws IOException {
// No initialization needed for file-based provider
}
@Override
public String getClientAssertion() throws IOException {
String clientAssertion = EMPTY_STRING;
try {
File file = new File(tokenFile);
clientAssertion = FileUtils.readFileToString(file, StandardCharsets.UTF_8);
} catch (Exception e) {
throw new IOException(TOKEN_FILE_READ_ERROR + tokenFile, e);
}
clientAssertion = clientAssertion.trim();
if (Strings.isNullOrEmpty(clientAssertion)) {
throw new IOException(EMPTY_TOKEN_FILE_ERROR + tokenFile);
}
return clientAssertion;
}
}
private final String authEndpoint;
private final String clientId;
private final ClientAssertionProvider clientAssertionProvider;
private long tokenFetchTime = -1;
/**
* Constructor with custom ClientAssertionProvider.
* Use this for custom token retrieval mechanisms like Kubernetes Token Request API.
*View on GitHub (pinned to 2add963021)
Solutions
- Verify the token file path (AZURE_FEDERATED_TOKEN_FILE / fs.azure.workload.identity.token.file) exists and is readable.
- Check file permissions and mount status of the projected service account token volume.
When it happens
Trigger: The workload identity token file cannot be read, typically because the path is wrong or the volume is not mounted.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22).
Data as JSON: /api/errors/e9844f8a08b08f50.
Report an issue: GitHub.