{"record":{"id":"2f99cbda1ccabe36","repo":"hashicorp/nomad","slug":"acl-role-lookup-failed-v","errorCode":null,"errorMessage":"ACL role lookup failed: %v","messagePattern":"ACL role lookup failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/state/state_store_acl.go","lineNumber":110,"sourceCode":"\t}\n\n\t// This validation also happens within the RPC handler, but Raft latency\n\t// could mean that by the time the state call is invoked, another Raft\n\t// update has deleted policies detailed in role. Therefore, check again\n\t// while in our write txn.\n\tif !allowMissingPolicies {\n\t\tif err := s.validateACLRolePolicyLinksTxn(txn, role); err != nil {\n\t\t\treturn false, err\n\t\t}\n\t}\n\n\t// This validation also happens within the RPC handler, but Raft latency\n\t// could mean that by the time the state call is invoked, another Raft\n\t// update has already written a role with the same name. We therefore need\n\t// to check we are not trying to create a role with an existing name.\n\texistingRaw, err := txn.First(TableACLRoles, indexName, role.Name)\n\tif err != nil {\n\t\treturn false, fmt.Errorf(\"ACL role lookup failed: %v\", err)\n\t}\n\n\t// Track our type asserted role, so we only need to do this once.\n\tvar existing *structs.ACLRole\n\n\t// If we did not find an ACL Role within state with the same name, we need\n\t// to check using the ID index as the operator might be performing an\n\t// update on the role name.\n\t//\n\t// If we found an entry using the name index, we need to check that the ID\n\t// matches the object within the request.\n\tif existingRaw == nil {\n\t\texistingRaw, err = txn.First(TableACLRoles, indexID, role.ID)\n\t\tif err != nil {\n\t\t\treturn false, fmt.Errorf(\"ACL role lookup failed: %v\", err)\n\t\t}\n\t\tif existingRaw != nil {\n\t\t\texisting = existingRaw.(*structs.ACLRole)","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/state/state_store_acl.go#L92-L128","documentation":"The memdb read of an ACL role failed inside upsertACLRoleTxn (e.g. the name-index uniqueness check); the wrapped lookup error aborts the role upsert rather than indicating a validation failure.","triggerScenarios":"Thrown at nomad/state/state_store_acl.go:110 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the role upsert","Inspect server logs for state store read errors","Check for concurrent role writes racing the lookup"],"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"}