hashicorp/nomad · error
failed to get allocs for job '%s': %v
Error message
failed to get allocs for job '%s': %v
What it means
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.
Source
Thrown at scheduler/scheduler_system.go:234
_, 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
}
// computeJobAllocs is used to reconcile differences between the job,
// existing allocations and node status to update the allocations.
func (s *SystemScheduler) computeJobAllocs() error {
// Lookup the allocations by JobID
ws := memdb.NewWatchSet()
allocs, err := s.state.AllocsByJob(ws, s.eval.Namespace, s.eval.JobID, true)
if err != nil {
return fmt.Errorf("failed to get allocs for job '%s': %v", s.eval.JobID, err)
}
// Determine the tainted nodes containing job allocs
tainted, err := taintedNodes(s.state, allocs)
if err != nil {
return fmt.Errorf("failed to get tainted nodes for job '%s': %v", s.eval.JobID, err)
}
// Update the allocations which are in pending/running state on tainted
// nodes to lost.
updateNonTerminalAllocsToLost(s.plan, tainted, allocs)
// Split out terminal allocations
live, term := structs.SplitTerminalAllocs(allocs)
// Diff the required and existing allocations
nr := reconciler.NewNodeReconciler(s.deployment)
reconciliationResult := nr.Compute(s.job, s.nodes, s.notReadyNodes, tainted,View on GitHub (pinned to 482b49bf1a)
Solutions
- Check server logs for the allocs query failure
- The eval is retried automatically on the next pass
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at scheduler/scheduler_system.go:234 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04).
Data as JSON: /api/errors/3abaa656905b32af.
Report an issue: GitHub.