{"record":{"id":"9218f9428efb98d2","repo":"hashicorp/nomad","slug":"failed-to-retrieve-node-s-v","errorCode":null,"errorMessage":"failed to retrieve node %s: %v","messagePattern":"failed to retrieve node (.+?): (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/node_endpoint.go","lineNumber":1538,"sourceCode":"\t}\n\n\tdefer metrics.MeasureSince([]string{\"nomad\", \"client\", \"update_alloc\"}, time.Now())\n\n\t// Ensure at least a single alloc\n\tif len(args.Alloc) == 0 {\n\t\treturn fmt.Errorf(\"must update at least one allocation\")\n\t}\n\n\t// Ensure the node is allowed to update allocs.\n\t// The node needs to successfully heartbeat before updating its allocs.\n\ttargetNodeID := args.Alloc[0].NodeID\n\tif targetNodeID == \"\" {\n\t\treturn fmt.Errorf(\"missing node ID\")\n\t}\n\n\tnode, err := n.srv.State().NodeByID(nil, targetNodeID)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to retrieve node %s: %v\", targetNodeID, err)\n\t}\n\tif node == nil {\n\t\treturn fmt.Errorf(\"node %s not found\", targetNodeID)\n\t}\n\tif !aclObj.AllowClientOp(node.NodePool) {\n\t\treturn structs.ErrPermissionDenied\n\t}\n\tif err := auth.AuthorizeSameNode(args.GetIdentity(), targetNodeID); err != nil {\n\t\treturn err\n\t}\n\tif node.UnresponsiveStatus() {\n\t\treturn fmt.Errorf(\"node %s is not allowed to update allocs while in status %s\", targetNodeID, node.Status)\n\t}\n\n\t// Ensure that evals aren't set from client RPCs\n\t// We create them here before the raft update\n\tif len(args.Evals) != 0 {\n\t\treturn fmt.Errorf(\"evals field must not be set\")","sourceCodeStart":1520,"sourceCodeEnd":1556,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/node_endpoint.go#L1520-L1556","documentation":"While handling an alloc update, the server's memdb state store returned an error when looking up the target node by ID; this wraps the underlying store failure, indicating state access problems rather than a bad request.","triggerScenarios":"Thrown at nomad/node_endpoint.go:1538 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check server health and Raft leadership; the state store may be unavailable on a follower or during leader election","Retry the request against a healthy server","Inspect server logs for state store or Raft errors"],"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"}