hashicorp/nomad · error

failed to get job '%s': %v

Error message

failed to get job '%s': %v

What it means

System scheduler state-store error in process: reading the job by ID from Nomad's state store failed. This is an internal/infrastructure failure during evaluation processing, not a job spec problem; the scheduler aborts the pass and the eval is retried.

Source

Thrown at scheduler/scheduler_system.go:122

		}
		return err
	}

	// Update the status to complete
	return setStatus(s.logger, s.planner, s.eval, nil,
		s.failedTGAllocs, s.planAnnotations, structs.EvalStatusComplete, "",
		s.queuedAllocs, s.deployment.GetID())
}

// process is wrapped in retryMax to iteratively run the handler until we have no
// further work or we've made the maximum number of attempts.
func (s *SystemScheduler) process() (bool, error) {
	// Lookup the Job by ID
	var err error
	ws := memdb.NewWatchSet()
	s.job, err = s.state.JobByID(ws, s.eval.Namespace, s.eval.JobID)
	if err != nil {
		return false, fmt.Errorf("failed to get job '%s': %v", s.eval.JobID, err)
	}

	numTaskGroups := 0
	if !s.job.Stopped() {
		numTaskGroups = len(s.job.TaskGroups)
	}
	s.queuedAllocs = make(map[string]int, numTaskGroups)

	// Get the ready nodes in the required datacenters
	if !s.job.Stopped() {
		s.nodes, s.notReadyNodes, s.nodesByDC, err = readyNodesInDCsAndPool(
			s.state, s.job.Datacenters, s.job.NodePool)
		if err != nil {
			return false, fmt.Errorf("failed to get ready nodes: %v", err)
		}
	}

	s.deployment, err = s.state.LatestDeploymentByJobID(ws, s.eval.Namespace, s.eval.JobID)

View on GitHub (pinned to 482b49bf1a)

Solutions

  1. Check server logs for Raft/state store errors
  2. Ensure the leader is healthy; the evaluation will be retried automatically
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at scheduler/scheduler_system.go:122 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/72b1af268234bd91. Report an issue: GitHub.