{"record":{"id":"acf233cf591f50a6","repo":"hashicorp/nomad","slug":"failed-to-query-node-pool-v","errorCode":null,"errorMessage":"failed to query node pool: %v","messagePattern":"failed to query node pool: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/node_endpoint.go","lineNumber":236,"sourceCode":"\n\t// Only perform the node identity work if all the servers meet the minimum\n\t// version that supports it.\n\tif n.srv.peersCache.ServersMeetMinimumVersion(\n\t\tn.srv.Region(),\n\t\tminVersionNodeIdentity,\n\t\ttrue,\n\t) {\n\n\t\t// Track the TTL that will be used for the node identity.\n\t\tvar identityTTL time.Duration\n\n\t\t// The identity TTL is determined by the node pool the node is registered\n\t\t// in. In the event the node registration is triggering creation of a new\n\t\t// node pool, it will be created with the default TTL, so we use this for\n\t\t// the identity.\n\t\tnodePool, err := snap.NodePoolByName(ws, args.Node.NodePool)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"failed to query node pool: %v\", err)\n\t\t}\n\t\tif nodePool == nil {\n\t\t\tidentityTTL = structs.DefaultNodePoolNodeIdentityTTL\n\t\t} else {\n\t\t\tidentityTTL = nodePool.NodeIdentityTTL\n\t\t}\n\n\t\t// Check if we need to generate a node identity. This must happen before we\n\t\t// send the Raft message, as the signing key ID is set on the node if we\n\t\t// generate one.\n\t\tif args.ShouldGenerateNodeIdentity(authErr, timeNow.UTC(), identityTTL) {\n\n\t\t\tclaims := structs.GenerateNodeIdentityClaims(args.Node, n.srv.Region(), identityTTL)\n\n\t\t\tsignedJWT, signingKeyID, err := n.srv.encrypter.SignClaims(claims)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"failed to sign node identity claims: %v\", err)\n\t\t\t}","sourceCodeStart":218,"sourceCodeEnd":254,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/node_endpoint.go#L218-L254","documentation":"During node registration Nomad resolves the node's node pool from the state store snapshot to determine the node identity TTL. If the state store query itself fails, the error is wrapped with 'failed to query node pool'. This indicates an internal state-store/raft-level problem, not a client input problem.","triggerScenarios":"snap.NodePoolByName returns an error during Register — typically an index/memorydb internal failure or snapshot consistency error, triggered by any Node.Register call under degraded server state.","commonSituations":"Corrupted or contended state store after failed raft apply; server under heavy load; bugs following upgrades restoring state snapshots.","solutions":["Retry the Register RPC; transient snapshot errors often clear","Check server logs for preceding state-store or raft errors","Restart the misbehaving Nomad server agent","Verify server binary version consistency across the quorum; upgrade if a known state-store bug"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"err := client.Nodes().Register(node, nil)\nif err != nil && strings.Contains(err.Error(), \"failed to query node pool\") {\n    // transient state-store failure: backoff and retry\n}","preventionTips":["Keep server quorum healthy and versions consistent","Watch server logs for state-store/raft errors","Avoid restoring state snapshots from incompatible versions"],"tags":["nomad","node-pool","state-store","internal-error"],"backgroundTag":"state-store-query-failed","analyzedSha":"482b49bf1aec006f089bcfc7e632d8f6ac303e5e","analyzedAt":"2026-09-04T07:54:14.808Z","contentChangedAt":"2026-09-04T07:54:14.808Z","schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}