hashicorp/nomad · error

unable to look up summary for job: %v

Error message

unable to look up summary for job: %v

What it means

While paginating a job list, the stub builder looked up the job's summary via state.JobSummaryByID and got either an error or a nil summary. Since every registered job must have a summary row, this signals a state-store inconsistency (missing summary for an existing job), and the list request fails for that job.

Source

Thrown at nomad/job_endpoint.go:1456

				reply.Jobs = make([]*structs.JobListStub, 0)
			} else if err != nil {
				return err
			} else {
				if prefix := args.QueryOptions.Prefix; prefix != "" {
					iter, err = state.JobsByIDPrefix(ws, namespace, prefix, sort)
				} else if namespace != structs.AllNamespacesSentinel {
					iter, err = state.JobsByNamespace(ws, namespace, sort)
				} else {
					iter, err = state.Jobs(ws, sort)
				}
				if err != nil {
					return err
				}

				stubFn := func(job *structs.Job) (*structs.JobListStub, error) {
					summary, err := state.JobSummaryByID(ws, job.Namespace, job.ID)
					if err != nil || summary == nil {
						return nil, fmt.Errorf("unable to look up summary for job: %v", job.ID)
					}
					return job.Stub(summary, args.Fields), nil
				}

				pager, err := paginator.NewPaginator(iter, args.QueryOptions,
					paginator.NamespaceSelectorFunc[*structs.Job](allowableNamespaces),
					paginator.NamespaceIDTokenizer[*structs.Job](args.NextToken),
					stubFn)
				if err != nil {
					return structs.NewErrRPCCodedf(
						http.StatusBadRequest, "%s: %v", structs.ErrResultPaginatorCreation, err)
				}

				jobs, nextToken, err := pager.Page()
				if err != nil {
					return structs.NewErrRPCCodedf(
						http.StatusBadRequest, "failed to read result page: %v", err)
				}

View on GitHub (pinned to 482b49bf1a)

Solutions

  1. Re-register the affected job (nomad job run/revert) to recreate its summary row.
  2. Check wrapped store errors for raft/consul snapshot corruption and restore from a good backup if needed.
  3. Verify job ID/namespace in the request are correct; a lookup bug can masquerade as a missing summary.
  4. If it persists after re-registration, collect a bundle and report to Nomad — a nil summary is an internal invariant violation.
Defensive patterns

Strategy: retry

Validate before calling

job, _, err := client.Jobs().Info(jobID, nil)
if err != nil || job == nil { return fmt.Errorf("job %s does not exist; skip listing", jobID) }

Try / catch

jobs, _, err := client.Jobs().List(nil)
if err != nil && strings.Contains(err.Error(), "unable to look up summary") {
    // retry once; if it persists, re-register the affected job
    jobs, _, err = client.Jobs().List(retryOpts)
}

Prevention

When it happens

Trigger: GET /v1/jobs (Job.List) with the standard stubFn closure at nomad/job_endpoint.go:1456 when JobSummaryByID(ws, ns, id) errors or returns nil for a job in the iterator, e.g. a summary row missing from the raft state.

Common situations: Corrupted or partially restored state-store snapshots/backups; jobs created by direct state manipulation or tooling bypassing the normal register path; raft log replay issues after a crash.

Related errors


AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04). Data as JSON: /api/errors/4ac750a79031fd4e. Report an issue: GitHub.