{"record":{"id":"3abaa656905b32af","repo":"hashicorp/nomad","slug":"failed-to-get-allocs-for-job-s-v-3abaa6","errorCode":null,"errorMessage":"failed to get allocs for job '%s': %v","messagePattern":"failed to get allocs for job '(.+?)': (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scheduler/scheduler_system.go","lineNumber":234,"sourceCode":"\n\t_, schedConfig, err := s.state.SchedulerConfig()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to get scheduler configuration: %v\", err)\n\t}\n\n\ts.stack.SetJob(job)\n\ts.stack.SetSchedulerConfiguration(schedConfig.WithNodePool(pool))\n\treturn nil\n}\n\n// computeJobAllocs is used to reconcile differences between the job,\n// existing allocations and node status to update the allocations.\nfunc (s *SystemScheduler) computeJobAllocs() error {\n\t// Lookup the allocations by JobID\n\tws := memdb.NewWatchSet()\n\tallocs, err := s.state.AllocsByJob(ws, s.eval.Namespace, s.eval.JobID, true)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to get allocs for job '%s': %v\", s.eval.JobID, err)\n\t}\n\n\t// Determine the tainted nodes containing job allocs\n\ttainted, err := taintedNodes(s.state, allocs)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to get tainted nodes for job '%s': %v\", s.eval.JobID, err)\n\t}\n\n\t// Update the allocations which are in pending/running state on tainted\n\t// nodes to lost.\n\tupdateNonTerminalAllocsToLost(s.plan, tainted, allocs)\n\n\t// Split out terminal allocations\n\tlive, term := structs.SplitTerminalAllocs(allocs)\n\n\t// Diff the required and existing allocations\n\tnr := reconciler.NewNodeReconciler(s.deployment)\n\treconciliationResult := nr.Compute(s.job, s.nodes, s.notReadyNodes, tainted,","sourceCodeStart":216,"sourceCodeEnd":252,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/scheduler/scheduler_system.go#L216-L252","documentation":"Returned by SystemScheduler.computeJobAllocs when AllocsByJob fails to fetch the job's existing (non-terminal) allocations. Reconciliation between desired and current state is impossible without them.","triggerScenarios":"Thrown at scheduler/scheduler_system.go:234 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check server logs for the allocs query failure","The eval is retried automatically on the next pass"],"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"}