{"record":{"id":"0ed863132ee794ff","repo":"hashicorp/nomad","slug":"failed-to-get-job-node-pool-q-v","errorCode":null,"errorMessage":"failed to get job node pool %q: %v","messagePattern":"failed to get job node pool %q: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"scheduler/generic_sched.go","lineNumber":799,"sourceCode":"\t\t\treturn\n\t\t}\n\t}\n\tfor i, alloc := range plan.NodeAllocation[original.NodeID] {\n\t\tif alloc.ID == original.ID {\n\t\t\tplan.NodeAllocation[original.NodeID][i] = updated\n\t\t\treturn\n\t\t}\n\t}\n}\n\n// setJob updates the stack with the given job and job's node pool scheduler\n// configuration.\nfunc (s *GenericScheduler) 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// setnodes updates the stack with the nodes that are ready for placement for\n// the given job.\nfunc (s *GenericScheduler) setNodes(job *structs.Job) ([]*structs.Node, map[string]int, error) {\n\tnodes, _, byDC, err := readyNodesInDCsAndPool(s.state, job.Datacenters, job.NodePool)\n\tif err != nil {\n\t\treturn nil, nil, err","sourceCodeStart":781,"sourceCodeEnd":817,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/scheduler/generic_sched.go#L781-L817","documentation":"setJob fetches the job's node pool via StateStore.NodePoolByName to configure the scheduler (e.g. whether the pool has disconnected-client handling). If the lookup errors, it returns this wrapped error and job setup aborts.","triggerScenarios":"StateStore.NodePoolByName(nil, job.NodePool) returns an error during setJob (called from process and computePlacements) — state store/memdb failure while resolving the job's node pool.","commonSituations":"State store instability on servers managing many node pools, raft restore, resource exhaustion, or jobs referencing node pools during a state restore window.","solutions":["Inspect the wrapped underlying error for the root cause","Verify the job's node_pool exists with 'nomad node pool status <pool>' (a missing pool normally won't error, but confirms configuration)","Retry — Nomad reprocesses failed evals","Check server/raft health and restore from snapshot if corruption is suspected"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"nomad node pool status <pool> // ensure the job's node_pool exists before submitting\nnomad job validate job.nomad.hcl","typeGuard":null,"tryCatchPattern":"// Inspect the wrapped error in server logs to distinguish a state\n// store failure from a config issue; retry via eval reprocessing\nnomad eval list | grep -i failed","preventionTips":["Create node pools before submitting jobs that reference them","Validate job specs with 'nomad job validate'","Monitor state store/raft health","Keep Nomad servers patched"],"tags":["nomad","scheduler","node-pool","state-store"],"backgroundTag":"state-store-lookup-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"}