hashicorp/nomad · error
Error querying job summary: %s
Error message
Error querying job summary: %s
What it means
Raised by outputJobSummary (used by periodic, parameterized, and normal `nomad job status` output) when Jobs().Summary(jobID, q) fails to fetch the job's summary (queued/running/failed counts per task group). The client error is wrapped into this message and aborts the summary section. It is purely a read-side API failure.
Source
Thrown at command/job_status.go:735
modTimePretty)
if showDeadline {
row += fmt.Sprintf("|%s", deadlines[i])
}
allocs[i+1] = row
}
}
return formatList(allocs)
}
// outputJobSummary displays the given jobs summary and children job summary
// where appropriate
func (c *JobStatusCommand) outputJobSummary(client *api.Client, job *api.Job) error {
// Query the summary
q := &api.QueryOptions{Namespace: *job.Namespace}
summary, _, err := client.Jobs().Summary(*job.ID, q)
if err != nil {
return fmt.Errorf("Error querying job summary: %s", err)
}
if summary == nil {
return nil
}
periodic := job.IsPeriodic()
parameterizedJob := job.IsParameterized()
// Print the summary
if !periodic && !parameterizedJob {
c.Ui.Output(c.Colorize().Color("\n[bold]Summary[reset]"))
summaries := make([]string, len(summary.Summary)+1)
summaries[0] = "Task Group|Queued|Starting|Running|Failed|Complete|Lost|Unknown"
taskGroups := make([]string, 0, len(summary.Summary))
for taskGroup := range summary.Summary {
taskGroups = append(taskGroups, taskGroup)
}View on GitHub (pinned to 482b49bf1a)
Solutions
- Fix the wrapped cause: connectivity first (curl $NOMAD_ADDR/v1/agent/health), then server errors.
- Set the correct namespace/region: nomad job status -namespace <ns> <job>.
- Grant the ACL token job/summary read rights in the target namespace and retry.
- Retry the command after transient conditions like no cluster leader.
Example fix
// before
nomad job status web // Error querying job summary: permission denied
// after
nomad acl policy apply -job web-read -namespace default \
'namespace "default" { capabilities = ["list-jobs", "read-job", "allocations"] }'
NOMAD_TOKEN=<web-read-token> nomad job status web Defensive patterns
Strategy: retry
Validate before calling
curl -sf -H "X-Nomad-Token: $NOMAD_TOKEN" \ "$NOMAD_ADDR/v1/job/$JOB_ID/summary?namespace=$NOMAD_NAMESPACE" > /dev/null
Try / catch
summary, _, err := client.Jobs().Summary(id, q)
if err != nil {
if isTransient(err) { // 5xx / connection reset
return retry(3, backoff, func() error { ... })
}
return err
} Prevention
- Scope automation tokens with read-job capability so summary reads succeed.
- Standardize namespace/region env vars in CI and ops scripts.
- Health-check the cluster before scheduled status/report jobs.
- Degrade gracefully: if summary fails but allocations succeeded, render partial output.
When it happens
Trigger: client.Jobs().Summary(*job.ID, q) returns an error: agent unreachable, ACL token without job-summary read permission in the namespace, wrong namespace/region in q, or server 5xx.
Common situations: Least-privilege ACL policies that permit job read but omit summary access; periodic/dispatched job inspected from the wrong namespace; network drop or agent restart while paging through status output; leadership failover mid-command.
Related errors
- Failed to retrieve allocation %q: %w
- Error querying job: %s
- Error querying job allocations: %s
- Error querying job evaluations: %s
- Error querying latest job deployment: %s
AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04).
Data as JSON: /api/errors/589e716c9b7a0b47.
Report an issue: GitHub.