{"record":{"id":"302dc56761f60a8c","repo":"hashicorp/nomad","slug":"failed-to-get-scheduler-configuration-v-302dc5","errorCode":null,"errorMessage":"failed to get scheduler configuration: %v","messagePattern":"failed to get scheduler configuration: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scheduler/scheduler_sysbatch.go","lineNumber":202,"sourceCode":"\t}\n\n\t// Success!\n\treturn true, nil\n}\n\n// setJob updates the stack with the given job and job's node pool scheduler\n// configuration.\nfunc (s *SysBatchScheduler) setJob(job *structs.Job) error {\n\t// Fetch node pool and global scheduler configuration to determine how to\n\t// configure the scheduler.\n\tpool, err := s.state.NodePoolByName(nil, job.NodePool)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to get job node pool %q: %v\", job.NodePool, err)\n\t}\n\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 *SysBatchScheduler) 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","sourceCodeStart":184,"sourceCodeEnd":220,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/scheduler/scheduler_sysbatch.go#L184-L220","documentation":"SysBatchScheduler.setJob calls state.SchedulerConfig() to fetch the global scheduler configuration used to configure the scheduling stack (via schedConfig.WithNodePool); this error wraps a failure of that state-store read. It mirrors the generic scheduler's identical error (scheduler/generic_sched.go:804).","triggerScenarios":"process() -> setJob(): NodePoolByName succeeds but s.state.SchedulerConfig() returns err != nil — state-store read failure, missing/corrupt scheduler config entry, or backend I/O error.","commonSituations":"Corrupt or uninitialized scheduler config after restore; degraded state store/raft on the Nomad leader; disk failures while evaluating a sysbatch job.","solutions":["Inspect the wrapped cause in server logs to identify the state-store failure.","Check leader health and raft status (nomad server members, nomad operator raft list-peers).","Restore or repair the server state store; restart the affected agent.","Trigger a new evaluation (nomad job eval) once healthy.","Upgrade Nomad if the config-read bug persists on current patches."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"if _, _, err := state.SchedulerConfig(); err != nil {\n    return fmt.Errorf(\"scheduler config not readable: %w\", err)\n}","typeGuard":"func schedulerConfigReadable(s structs.State) bool {\n    _, _, err := s.SchedulerConfig()\n    return err == nil\n}","tryCatchPattern":"if err := sched.Process(eval); err != nil {\n    if strings.Contains(err.Error(), \"failed to get scheduler configuration\") {\n        return retryWithBackoff(func() error { return sched.Process(eval) })\n    }\n    return err\n}","preventionTips":["Keep Nomad server state store and raft healthy; monitor disk I/O.","Verify scheduler config survives restores/backups.","Retry evaluations on transient state-store errors.","Stay on the latest Nomad patch release."],"tags":["nomad","scheduler","sysbatch","configuration","state-store"],"backgroundTag":"state-store-read-failed","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"}