{"record":{"id":"75e837a20dbbcd59","repo":"apache/hadoop","slug":"could-not-start-curator-tokencachelistener-for-tok","errorCode":null,"errorMessage":"Could not start Curator tokenCacheListener for tokens","messagePattern":"Could not start Curator tokenCacheListener for tokens","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/ZKDelegationTokenSecretManager.java","lineNumber":341,"sourceCode":"                    + \"NODE_CREATED / NODE_CHANGED event\");\n                throw new UncheckedIOException(e);\n              }\n            })\n            .forDeletes(childData -> {\n              try {\n                processTokenRemoved(childData);\n              } catch (IOException e) {\n                LOG.error(\"Error while processing Curator tokenCacheListener \"\n                    + \"NODE_DELETED event\");\n                throw new UncheckedIOException(e);\n              }\n            })\n            .build();\n        tokenCache.listenable().addListener(tokenCacheListener);\n        tokenCache.start();\n        loadFromZKCache(true);\n      } catch (Exception e) {\n        throw new IOException(\n            \"Could not start Curator tokenCacheListener for tokens\", e);\n      }\n    }\n    super.startThreads();\n  }\n\n  /**\n   * Load the CuratorCache into the in-memory map. Possible caches to be\n   * loaded are keyCache and tokenCache.\n   *\n   * @param isTokenCache true if loading tokenCache, false if loading keyCache.\n   */\n  private void loadFromZKCache(final boolean isTokenCache) {\n    final String cacheName = isTokenCache ? \"token\" : \"key\";\n    LOG.info(\"Starting to load {} cache.\", cacheName);\n    final Stream<ChildData> children;\n    if (isTokenCache) {\n      children = tokenCache.stream();","sourceCodeStart":323,"sourceCodeEnd":359,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/ZKDelegationTokenSecretManager.java#L323-L359","documentation":"Error \"Could not start Curator tokenCacheListener for tokens\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/ZKDelegationTokenSecretManager.java:341 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The Curator cache listener for delegation tokens failed to start. Check ZK connectivity and that the tokens znode path exists; restart the service."],"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"}