{"record":{"id":"0324c67d86692b1f","repo":"apache/hadoop","slug":"could-not-start-sequence-counter","errorCode":null,"errorMessage":"Could not start Sequence Counter","messagePattern":"Could not start Sequence Counter","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":274,"sourceCode":"      } catch (KeeperException.NodeExistsException ignore) {\n        // We don't care if the znode already exists\n      } catch (Exception e) {\n        throw new IOException(\"Could not create namespace\", e);\n      }\n    }\n    try {\n      delTokSeqCounter = new SharedCount(zkClient, ZK_DTSM_SEQNUM_ROOT, 0);\n      if (delTokSeqCounter != null) {\n        delTokSeqCounter.start();\n      }\n      // the first batch range should be allocated during this starting window\n      // by calling the incrSharedCount\n      currentSeqNum = incrSharedCount(delTokSeqCounter, seqNumBatchSize);\n      currentMaxSeqNum = currentSeqNum + seqNumBatchSize;\n      LOG.info(\"Fetched initial range of seq num, from {} to {} \",\n          currentSeqNum+1, currentMaxSeqNum);\n    } catch (Exception e) {\n      throw new IOException(\"Could not start Sequence Counter\", e);\n    }\n    try {\n      keyIdSeqCounter = new SharedCount(zkClient, ZK_DTSM_KEYID_ROOT, 0);\n      if (keyIdSeqCounter != null) {\n        keyIdSeqCounter.start();\n      }\n    } catch (Exception e) {\n      throw new IOException(\"Could not start KeyId Counter\", e);\n    }\n    try {\n      createPersistentNode(ZK_DTSM_MASTER_KEY_ROOT);\n      createPersistentNode(ZK_DTSM_TOKENS_ROOT);\n    } catch (Exception e) {\n      throw new RuntimeException(\"Could not create ZK paths\");\n    }\n    try {\n      keyCache = CuratorCache.bridgeBuilder(zkClient, ZK_DTSM_MASTER_KEY_ROOT)\n          .build();","sourceCodeStart":256,"sourceCodeEnd":292,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/ZKDelegationTokenSecretManager.java#L256-L292","documentation":"Error \"Could not start Sequence Counter\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/delegation/ZKDelegationTokenSecretManager.java:274 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Starting the ZK shared sequence counter failed. Check ZK connectivity and ACL permissions on the counter znode; restart the service after fixing ZK access."],"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"}