{"record":{"id":"3c71463c58a53d25","repo":"hashicorp/nomad","slug":"failed-acl-token-listing-v","errorCode":null,"errorMessage":"failed acl token listing: %v","messagePattern":"failed acl token listing: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/state/state_store_acl.go","lineNumber":27,"sourceCode":"\t\"slices\"\n\n\t\"github.com/hashicorp/go-memdb\"\n\t\"github.com/hashicorp/nomad/nomad/structs\"\n)\n\n// ACLTokensByExpired returns an array accessor IDs of expired ACL tokens.\n// Their expiration is determined against the passed time.Time value.\n//\n// The function handles global and local tokens independently as determined by\n// the global boolean argument. The number of returned IDs can be limited by\n// the max integer, which is useful to limit the number of tokens we attempt to\n// delete in a single transaction.\nfunc (s *StateStore) ACLTokensByExpired(global bool) (memdb.ResultIterator, error) {\n\ttnx := s.db.ReadTxn()\n\n\titer, err := tnx.Get(\"acl_token\", expiresIndexName(global))\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed acl token listing: %v\", err)\n\t}\n\treturn iter, nil\n}\n\n// expiresIndexName is a helper function to identify the correct ACL token\n// table expiry index to use.\nfunc expiresIndexName(global bool) string {\n\tif global {\n\t\treturn indexExpiresGlobal\n\t}\n\treturn indexExpiresLocal\n}\n\n// UpsertACLRoles is used to insert a number of ACL roles into the state store.\n// It uses a single write transaction for efficiency, however, any error means\n// no entries will be committed.\nfunc (s *StateStore) UpsertACLRoles(\n\tmsgType structs.MessageType, index uint64, roles []*structs.ACLRole, allowMissingPolicies bool) error {","sourceCodeStart":9,"sourceCodeEnd":45,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/state/state_store_acl.go#L9-L45","documentation":"The state store iteration over expired ACL tokens returned an error from memdb; the wrapped failure prevents enumerating tokens whose expiration time has passed.","triggerScenarios":"Thrown at nomad/state/state_store_acl.go:27 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the expired-token sweep","Check server logs for state store errors","Verify server health before retrying"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"482b49bf1aec006f089bcfc7e632d8f6ac303e5e","analyzedAt":"2026-09-04T07:54:14.808Z","contentChangedAt":"2026-09-04T07:54:14.808Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}