hashicorp/nomad · error
failed to get job node pool %q: %v
Error message
failed to get job node pool %q: %v
What it means
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.
Source
Thrown at scheduler/generic_sched.go:799
return
}
}
for i, alloc := range plan.NodeAllocation[original.NodeID] {
if alloc.ID == original.ID {
plan.NodeAllocation[original.NodeID][i] = updated
return
}
}
}
// setJob updates the stack with the given job and job's node pool scheduler
// configuration.
func (s *GenericScheduler) setJob(job *structs.Job) error {
// Fetch node pool and global scheduler configuration to determine how to
// configure the scheduler.
pool, err := s.state.NodePoolByName(nil, job.NodePool)
if err != nil {
return fmt.Errorf("failed to get job node pool %q: %v", job.NodePool, err)
}
_, schedConfig, err := s.state.SchedulerConfig()
if err != nil {
return fmt.Errorf("failed to get scheduler configuration: %v", err)
}
s.stack.SetJob(job)
s.stack.SetSchedulerConfiguration(schedConfig.WithNodePool(pool))
return nil
}
// setnodes updates the stack with the nodes that are ready for placement for
// the given job.
func (s *GenericScheduler) setNodes(job *structs.Job) ([]*structs.Node, map[string]int, error) {
nodes, _, byDC, err := readyNodesInDCsAndPool(s.state, job.Datacenters, job.NodePool)
if err != nil {
return nil, nil, errView on GitHub (pinned to 482b49bf1a)
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
Defensive patterns
Strategy: validation
Validate before calling
nomad node pool status <pool> // ensure the job's node_pool exists before submitting nomad job validate job.nomad.hcl
Try / catch
// Inspect the wrapped error in server logs to distinguish a state // store failure from a config issue; retry via eval reprocessing nomad eval list | grep -i failed
Prevention
- 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
When it happens
Trigger: 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.
Common situations: State store instability on servers managing many node pools, raft restore, resource exhaustion, or jobs referencing node pools during a state restore window.
Related errors
- failed to get job node pool %q: %v
- eval broker is enabled; eval broker must be paused to delete
- failed to query node pool: %v
- modifying node pool %q is not allowed
- node pool %s not found
AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04).
Data as JSON: /api/errors/0ed863132ee794ff.
Report an issue: GitHub.