hashicorp/nomad · error
only a single eval can be created
Error message
only a single eval can be created
What it means
Guard in Eval.Create: the request contains a number of evaluations other than one; creating evals via this RPC is single-eval by contract with the eval token bookkeeping.
Source
Thrown at nomad/eval_endpoint.go:334
// Create is used to make a new evaluation
func (e *Eval) Create(args *structs.EvalUpdateRequest,
reply *structs.GenericResponse) error {
aclObj, err := e.srv.AuthenticateServerOnly(e.ctx, args)
e.srv.MeasureRPCRate("eval", structs.RateMetricWrite, args)
if err != nil || !aclObj.AllowServerOp() {
return structs.ErrPermissionDenied
}
if done, err := e.srv.forward("Eval.Create", args, args, reply); done {
return err
}
defer metrics.MeasureSince([]string{"nomad", "eval", "create"}, time.Now())
// Ensure there is only a single update with token
if len(args.Evals) != 1 {
return fmt.Errorf("only a single eval can be created")
}
eval := args.Evals[0]
// 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 errView on GitHub (pinned to 482b49bf1a)
Solutions
- Submit exactly one evaluation per Eval.Create request
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at nomad/eval_endpoint.go:334 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/780fe8931a061db0.
Report an issue: GitHub.