{"record":{"id":"e9844f8a08b08f50","repo":"apache/hadoop","slug":"error-reading-token-file-at-specified-path","errorCode":null,"errorMessage":"Error reading token file at specified path: {}","messagePattern":"Error reading token file at specified path: (.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/oauth2/WorkloadIdentityTokenProvider.java","lineNumber":69,"sourceCode":"    private final String tokenFile;\n\n    FileBasedClientAssertionProvider(String tokenFile) {\n      this.tokenFile = tokenFile;\n    }\n\n    @Override\n    public void initialize(Configuration configuration, String accountName) throws IOException {\n      // No initialization needed for file-based provider\n    }\n\n    @Override\n    public String getClientAssertion() throws IOException {\n      String clientAssertion = EMPTY_STRING;\n      try {\n        File file = new File(tokenFile);\n        clientAssertion = FileUtils.readFileToString(file, StandardCharsets.UTF_8);\n      } catch (Exception e) {\n        throw new IOException(TOKEN_FILE_READ_ERROR + tokenFile, e);\n      }\n      clientAssertion = clientAssertion.trim();\n      if (Strings.isNullOrEmpty(clientAssertion)) {\n        throw new IOException(EMPTY_TOKEN_FILE_ERROR + tokenFile);\n      }\n      return clientAssertion;\n    }\n  }\n\n  private final String authEndpoint;\n  private final String clientId;\n  private final ClientAssertionProvider clientAssertionProvider;\n  private long tokenFetchTime = -1;\n\n  /**\n   * Constructor with custom ClientAssertionProvider.\n   * Use this for custom token retrieval mechanisms like Kubernetes Token Request API.\n   *","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/oauth2/WorkloadIdentityTokenProvider.java#L51-L87","documentation":"Error \"Error reading token file at specified path: {}\" thrown in apache/hadoop.","triggerScenarios":"The workload identity token file cannot be read, typically because the path is wrong or the volume is not mounted.","commonSituations":"See trigger scenarios.","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."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}