{"record":{"id":"b5e3f48870ef2e62","repo":"hashicorp/nomad","slug":"failed-to-get-ready-nodes-v-b5e3f4","errorCode":null,"errorMessage":"failed to get ready nodes: %v","messagePattern":"failed to get ready nodes: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scheduler/scheduler_system.go","lineNumber":136,"sourceCode":"\tvar err error\n\tws := memdb.NewWatchSet()\n\ts.job, err = s.state.JobByID(ws, s.eval.Namespace, s.eval.JobID)\n\tif err != nil {\n\t\treturn false, fmt.Errorf(\"failed to get job '%s': %v\", s.eval.JobID, err)\n\t}\n\n\tnumTaskGroups := 0\n\tif !s.job.Stopped() {\n\t\tnumTaskGroups = len(s.job.TaskGroups)\n\t}\n\ts.queuedAllocs = make(map[string]int, numTaskGroups)\n\n\t// Get the ready nodes in the required datacenters\n\tif !s.job.Stopped() {\n\t\ts.nodes, s.notReadyNodes, s.nodesByDC, err = readyNodesInDCsAndPool(\n\t\t\ts.state, s.job.Datacenters, s.job.NodePool)\n\t\tif err != nil {\n\t\t\treturn false, fmt.Errorf(\"failed to get ready nodes: %v\", err)\n\t\t}\n\t}\n\n\ts.deployment, err = s.state.LatestDeploymentByJobID(ws, s.eval.Namespace, s.eval.JobID)\n\tif err != nil {\n\t\treturn false, fmt.Errorf(\"failed to get deployment for job %q: %w\", s.eval.JobID, err)\n\t}\n\t// system deployments may be mutated in the reconciler because the node\n\t// count can change between evaluations\n\ts.deployment = s.deployment.Copy()\n\n\t// Create a plan\n\ts.plan = s.eval.MakePlan(s.job)\n\n\t// Reset the failed allocations\n\ts.failedTGAllocs = nil\n\n\t// Create an evaluation context","sourceCodeStart":118,"sourceCodeEnd":154,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/scheduler/scheduler_system.go#L118-L154","documentation":"SystemScheduler.process failed to query ready nodes in the job's datacenters and node pool. This is a state-store read failure during scheduling, not a jobspec error; the wrapped error carries the store-level cause.","triggerScenarios":"Thrown at scheduler/scheduler_system.go:136 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check server health and Raft logs for the failed nodes query","Verify the job's datacenters and node pool exist"],"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"}