hashicorp/nomad · error

evaluation already exists

Error message

evaluation already exists

What it means

Fires in Eval.Create when an evaluation with the same ID already exists in the state store; the parent eval's scheduler produced a duplicate ID, and re-applying it would clobber state.

Source

Thrown at nomad/eval_endpoint.go:355

	// Verify the parent evaluation is outstanding, and that the tokens match.
	if err := e.srv.evalBroker.OutstandingReset(eval.PreviousEval, args.EvalToken); err != nil {
		return err
	}

	// Look for the eval
	snap, err := e.srv.fsm.State().Snapshot()
	if err != nil {
		return err
	}

	ws := memdb.NewWatchSet()
	out, err := snap.EvalByID(ws, eval.ID)
	if err != nil {
		return err
	}
	if out != nil {
		return fmt.Errorf("evaluation already exists")
	}

	// Update via Raft
	_, index, err := e.srv.raftApply(structs.EvalUpdateRequestType, args)
	if err != nil {
		return err
	}

	// Update the index
	reply.Index = index
	return nil
}

// Reblock is used to reinsert an existing blocked evaluation into the blocked
// evaluation tracker.
func (e *Eval) Reblock(args *structs.EvalUpdateRequest, reply *structs.GenericResponse) error {
	aclObj, err := e.srv.AuthenticateServerOnly(e.ctx, args)
	e.srv.MeasureRPCRate("eval", structs.RateMetricWrite, args)

View on GitHub (pinned to 482b49bf1a)

Solutions

  1. Retry the scheduling run so a fresh eval ID is generated
  2. Check for a server-side scheduler loop resubmitting the same eval
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at nomad/eval_endpoint.go:355 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/d8122d993295f723. Report an issue: GitHub.