hashicorp/nomad · error
Error querying job evaluations: %s
Error message
Error querying job evaluations: %s
What it means
Raised by outputJobInfo when Jobs().Evaluations(jobID, q) fails while collecting evaluation history for the status output. The raw API error is wrapped into this message. Allocations were already fetched successfully at this point, so the failure is specific to the evaluations read (usually permissions or a transient server error).
Source
Thrown at command/job_status.go:441
// outputJobInfo prints information about the passed non-periodic job. If a
// request fails, an error is returned.
func (c *JobStatusCommand) outputJobInfo(client *api.Client, job *api.Job) error {
var q *api.QueryOptions
if job.Namespace != nil {
q = &api.QueryOptions{Namespace: *job.Namespace}
}
// Query the allocations
jobAllocs, _, err := client.Jobs().Allocations(*job.ID, c.allAllocs, q)
if err != nil {
return fmt.Errorf("Error querying job allocations: %s", err)
}
// Query the evaluations
jobEvals, _, err := client.Jobs().Evaluations(*job.ID, q)
if err != nil {
return fmt.Errorf("Error querying job evaluations: %s", err)
}
latestDeployment, _, err := client.Jobs().LatestDeployment(*job.ID, q)
if err != nil {
return fmt.Errorf("Error querying latest job deployment: %s", err)
}
jobActions := make([]map[string]string, 0)
for _, tg := range job.TaskGroups {
for _, task := range tg.Tasks {
for _, action := range task.Actions {
jobActions = append(jobActions, map[string]string{
"group": *tg.Name,
"task": task.Name,
"action": action.Name,
})
}
}View on GitHub (pinned to 482b49bf1a)
Solutions
- Check the wrapped cause: if it's permission denied, add evaluation read rights to the ACL policy for the namespace.
- Confirm namespace/region flags match the job's scope.
- Retry the command if the server just failed over (no cluster leader / 500).
- Verify agent connectivity and NOMAD_ADDR if the cause is a connection error.
Example fix
// before (HCL policy missing eval read)
namespace "default" {
job = "read"
}
// after
namespace "default" {
job = "read"
eval = "read"
allocation = "read"
} Defensive patterns
Strategy: retry
Validate before calling
curl -sf -H "X-Nomad-Token: $NOMAD_TOKEN" \ "$NOMAD_ADDR/v1/job/$JOB_ID/evaluations?namespace=$NOMAD_NAMESPACE" > /dev/null
Try / catch
jobEvals, _, err := client.Jobs().Evaluations(id, q)
if err != nil {
if strings.Contains(err.Error(), "No path to a job") || isTransient(err) {
// retry or adjust namespace
}
return err
} Prevention
- Include eval = read in least-privilege ACL policies used for status tooling.
- Use consistent -namespace/-region across all queries in one command invocation.
- Retry reads after server failover events.
- Version-pin CLI against the cluster to avoid endpoint drift.
When it happens
Trigger: client.Jobs().Evaluations(*job.ID, q) returns an error: agent unreachable mid-command, ACL token cannot read evaluations in the namespace, namespace/region mismatch in q, or server-side error during the read.
Common situations: Fine-grained ACL policy allowing job/alloc reads but not evaluation reads; leadership change on the server between the alloc and eval queries; temporary network blip during a long status command.
Related errors
- Failed to retrieve allocation %q: %w
- Error querying job: %s
- Error querying job allocations: %s
- Error querying latest job deployment: %s
- Error querying job summary: %s
AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04).
Data as JSON: /api/errors/3864e9dc92a4ab7f.
Report an issue: GitHub.