{"record":{"id":"c2956b9c34fcb8e9","repo":"apache/hadoop","slug":"got-null-as-delegation-token","errorCode":null,"errorMessage":"Got NULL as delegation token","messagePattern":"Got NULL as delegation token","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java","lineNumber":1043,"sourceCode":"        new DelegationTokenAuthenticatedURL(configurator);\n    Token<?> token = null;\n    try {\n      final String doAsUser = getDoAsUser();\n      token = getActualUgi().doAs(new PrivilegedExceptionAction<Token<?>>() {\n        @Override\n        public Token<?> run() throws Exception {\n          // Not using the cached token here.. Creating a new token here\n          // everytime.\n          LOG.debug(\"Getting new token from {}, renewer:{}\", url, renewer);\n          return authUrl.getDelegationToken(url,\n              new DelegationTokenAuthenticatedURL.Token(), renewer, doAsUser);\n        }\n      });\n      if (token != null) {\n        token.setService(dtService);\n        LOG.info(\"New token created: ({})\", token);\n      } else {\n        throw new IOException(\"Got NULL as delegation token\");\n      }\n    } catch (InterruptedException e) {\n      Thread.currentThread().interrupt();\n    } catch (Exception e) {\n      if (e instanceof IOException) {\n        throw (IOException) e;\n      } else {\n        throw new IOException(e);\n      }\n    }\n    return token;\n  }\n\n  @Override\n  public long renewDelegationToken(final Token<?> dToken) throws IOException {\n    try {\n      final String doAsUser = getDoAsUser();\n      final DelegationTokenAuthenticatedURL.Token token =","sourceCodeStart":1025,"sourceCodeEnd":1061,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/KMSClientProvider.java#L1025-L1061","documentation":"Error \"Got NULL as delegation token\" thrown in apache/hadoop.","triggerScenarios":"Raised at runtime when the documented precondition or configuration requirement for this operation is violated.","commonSituations":"Misconfigured or missing property, invalid user input, or calling the API before its prerequisites are met.","solutions":["The KMS server returned no delegation token; check KMS ACLs and the renewer configuration."],"exampleFix":"Ensure the requesting user is allowed to get delegation tokens.","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"}