hashicorp/nomad · error
job summary for job %q in namespace %q is not present
Error message
job summary for job %q in namespace %q is not present
What it means
Raised when an alloc references a job that still exists in the jobs table but has no job_summary row. This is a genuine state inconsistency: registration creates the summary, so a live job without one should not happen (e.g. corrupted or manually manipulated state). Unlike the GC'd job case, it does not return nil — it fails the update.
Source
Thrown at nomad/state/state_store.go:6073
summaryRaw, err := txn.First("job_summary", "id", alloc.Namespace, alloc.JobID)
if err != nil {
return fmt.Errorf("unable to lookup job summary for job id %q in namespace %q: %v", alloc.JobID, alloc.Namespace, err)
}
if summaryRaw == nil {
// Check if the job is de-registered
rawJob, err := txn.First("jobs", "id", alloc.Namespace, alloc.JobID)
if err != nil {
return fmt.Errorf("unable to query job: %v", err)
}
// If the job is de-registered then we skip updating it's summary
if rawJob == nil {
return nil
}
return fmt.Errorf("job summary for job %q in namespace %q is not present", alloc.JobID, alloc.Namespace)
}
// Get a copy of the existing summary
jobSummary := summaryRaw.(*structs.JobSummary).Copy()
// Not updating the job summary because the allocation doesn't belong to the
// currently registered job
if jobSummary.CreateIndex != alloc.Job.CreateIndex {
return nil
}
tgSummary, ok := jobSummary.Summary[alloc.TaskGroup]
if !ok {
return fmt.Errorf("unable to find task group in the job summary: %v", alloc.TaskGroup)
}
summaryChanged := false
if existingAlloc == nil {View on GitHub (pinned to 482b49bf1a)
Solutions
- Verify state consistency: nomad operator raft list-peers / inspect job via API — does GET /v1/job/:id work and show summary data?
- Resubmit (re-register) the job with nomad job run to recreate the summary row
- If corruption persists, take a fresh server snapshot, rebuild the cluster, and restore
Example fix
/* before: inconsistent state — job exists, summary lost, alloc updates keep failing */ nomad status example-job // summary missing // after: re-register the job to recreate its JobSummary row nomad job run example.nomad.hcl
Defensive patterns
Strategy: validation
Validate before calling
// before depending on alloc updates, confirm job + summary exist
job, _, err := client.Jobs().Info(jobID, nil)
if err != nil {
return fmt.Errorf("job %q gone or unreadable: %w", jobID, err)
}
summary, _, err := client.Jobs().Summary(jobID, nil)
if err != nil || summary == nil {
// summary row missing: re-register the job to recreate it
_, _, err = client.Jobs().Register(job, nil)
} Try / catch
if err != nil && strings.Contains(err.Error(), "job summary for job") {
// state inconsistency: recreate the summary by re-registering the job
return reRegisterJob(alloc.Namespace, alloc.JobID)
} Prevention
- Never hand-edit raft snapshots or the Nomad data dir
- Restore state only via nomad operator snapshot restore
- Re-register jobs after any state restore/upgrade
- Compare jobs and job_summary tables if you suspect corruption
When it happens
Trigger: updateAlloc paths: alloc update arrives for a job whose summary row is absent while txn.First("jobs", ...) confirms the job row exists.
Common situations: State store corruption, manual edits to raft snapshots, or version-upgrade/restore bugs where job_summary rows were lost while job rows survived.
Related errors
- detected corrupted token within the state store: missing rol
- error getting job summary: %v
- unable to create job summary: %v
- unknown old job status %q
- job_summary lookup failed: %v
AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04).
Data as JSON: /api/errors/f52cadd63532b7b7.
Report an issue: GitHub.