hashicorp/nomad · error
Specified job %q is not a parameterized job
Error message
Specified job %q is not a parameterized job
What it means
The job was found by ID, but its ParameterizedJob block is not configured, so IsParameterized() returns false. Dispatch only works on parameterized jobs; a regular batch/service job cannot be dispatched.
Source
Thrown at nomad/job_endpoint.go:2027
if args.JobID == "" {
return fmt.Errorf("missing parameterized job ID")
}
snap, err := j.srv.fsm.State().Snapshot()
if err != nil {
return err
}
ws := memdb.NewWatchSet()
parameterizedJob, err := snap.JobByID(ws, args.RequestNamespace(), args.JobID)
if err != nil {
return err
}
if parameterizedJob == nil {
return fmt.Errorf("parameterized job not found")
}
if !parameterizedJob.IsParameterized() {
return fmt.Errorf("Specified job %q is not a parameterized job", args.JobID)
}
if parameterizedJob.Stop {
return fmt.Errorf("Specified job %q is stopped", args.JobID)
}
// Set priority to match parent job if unset
if args.Priority == 0 {
args.Priority = parameterizedJob.Priority
}
// Validate the arguments and parameterized job
agentConfig := j.srv.config
if err := validateDispatchRequest(args, parameterizedJob, agentConfig); err != nil {
return err
}
// Avoid creating new dispatched jobs for retried requests, by using theView on GitHub (pinned to 482b49bf1a)
Solutions
- Add a `parameterized` stanza to the job spec and resubmit it, or use `nomad job periodic` if it is a periodic job
- Use the correct job that is actually parameterized
- For periodic jobs, use `nomad job periodic <job-id>` instead of dispatch
Example fix
// before (job has no parameterized stanza)
job "batch" { type = "batch" }
// after
job "batch" {
type = "batch"
parameterized {
payload = "optional"
meta_required = ["run_id"]
}
} Defensive patterns
Strategy: validation
Validate before calling
job, _, _ := client.Jobs().Info(jobID, nil)
if job == nil || job.ParameterizedJob == nil {
return fmt.Errorf("%s is not a parameterized job; use dispatch only on parameterized jobs", jobID)
} Type guard
func isParameterized(j *api.Job) bool { return j != nil && j.ParameterizedJob != nil } Prevention
- Check the job spec contains a parameterized stanza before dispatching
- Use `nomad job periodic` for periodic jobs, not dispatch
- Keep a registry of which jobs are dispatchable
When it happens
Trigger: Calling Dispatch (or `nomad job dispatch`) on a normal job that has no `parameterized` stanza in its job spec.
Common situations: Copy-pasting a dispatch command meant for one job onto a regular job; a job spec was edited and the parameterized stanza removed while scripts still dispatch it; confusion between periodic and parameterized jobs (periodic jobs use `nomad job periodic`, not dispatch).
Related errors
- Payload is not provided but required by parameterized job
- Payload provided but forbidden by parameterized job
- Dispatch request included unpermitted metadata keys: %v
- envoy must be used as connect sidecar or gateway
- Disconnect cannot be configured with both lost_after and sto
AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04).
Data as JSON: /api/errors/0623854a09dc9275.
Report an issue: GitHub.