{"record":{"id":"e094915751687d3f","repo":"hashicorp/nomad","slug":"failed-to-query-node-allocs-v","errorCode":null,"errorMessage":"failed to query node allocs: %v","messagePattern":"failed to query node allocs: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/node_endpoint.go","lineNumber":802,"sourceCode":"\t\t\treply.SignedIdentity = &signedJWT\n\t\t\targs.IdentitySigningKeyID = signingKeyID\n\t\t} else {\n\t\t\t// Ensure the IdentitySigningKeyID is cleared if we are not generating a\n\t\t\t// new identity. This is important to ensure that we do not cause Raft\n\t\t\t// updates unless we need to.\n\t\t\targs.IdentitySigningKeyID = \"\"\n\t\t}\n\t}\n\n\t// Compute next status.\n\tswitch node.Status {\n\tcase structs.NodeStatusInit:\n\t\tif args.Status == structs.NodeStatusReady {\n\t\t\t// Keep the node in the initializing status if it has allocations,\n\t\t\t// but they are not updated.\n\t\t\tallocs, err := snap.AllocsByNodeTerminal(ws, args.NodeID, false)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"failed to query node allocs: %v\", err)\n\t\t\t}\n\n\t\t\tallocsUpdated := node.LastAllocUpdateIndex > node.LastMissedHeartbeatIndex\n\t\t\tif len(allocs) > 0 && !allocsUpdated {\n\t\t\t\tn.logger.Debug(fmt.Sprintf(\"marking node as %s due to outdated allocation information\", structs.NodeStatusInit))\n\t\t\t\targs.Status = structs.NodeStatusInit\n\t\t\t}\n\n\t\t\t// Keep the node in the initializing status if it's in a non-default\n\t\t\t// node pool that doesn't exist.\n\t\t\tif !nodePoolExists {\n\t\t\t\tn.logger.Debug(fmt.Sprintf(\"marking node as %s due to missing node pool\", structs.NodeStatusInit))\n\t\t\t\targs.Status = structs.NodeStatusInit\n\t\t\t\tif !node.HasEvent(NodeWaitingForNodePool) {\n\t\t\t\t\targs.NodeEvent = structs.NewNodeEvent().\n\t\t\t\t\t\tSetSubsystem(structs.NodeEventSubsystemCluster).\n\t\t\t\t\t\tSetMessage(NodeWaitingForNodePool).\n\t\t\t\t\t\tAddDetail(\"node_pool\", node.NodePool)","sourceCodeStart":784,"sourceCodeEnd":820,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/node_endpoint.go#L784-L820","documentation":"Fires in Node.UpdateStatus when an initializing node reports ready: the state store query for the node's terminal allocations fails (state store/Raft error), so Nomad cannot check whether to keep the node in initializing status.","triggerScenarios":"Thrown at nomad/node_endpoint.go:802 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check server logs for state store errors","Verify Raft health and quorum","The client heartbeat will retry the status update automatically"],"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"}