{"record":{"id":"f2ed10dc1dff802f","repo":"hashicorp/nomad","slug":"parameterized-job-not-found","errorCode":null,"errorMessage":"parameterized job not found","messagePattern":"parameterized job not found","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/job_endpoint.go","lineNumber":2023,"sourceCode":"\t\treturn structs.ErrJobRegistrationDisabled\n\t}\n\n\t// Lookup the parameterized job\n\tif args.JobID == \"\" {\n\t\treturn fmt.Errorf(\"missing parameterized job ID\")\n\t}\n\n\tsnap, err := j.srv.fsm.State().Snapshot()\n\tif err != nil {\n\t\treturn err\n\t}\n\tws := memdb.NewWatchSet()\n\tparameterizedJob, err := snap.JobByID(ws, args.RequestNamespace(), args.JobID)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif parameterizedJob == nil {\n\t\treturn fmt.Errorf(\"parameterized job not found\")\n\t}\n\n\tif !parameterizedJob.IsParameterized() {\n\t\treturn fmt.Errorf(\"Specified job %q is not a parameterized job\", args.JobID)\n\t}\n\n\tif parameterizedJob.Stop {\n\t\treturn fmt.Errorf(\"Specified job %q is stopped\", args.JobID)\n\t}\n\n\t// Set priority to match parent job if unset\n\tif args.Priority == 0 {\n\t\targs.Priority = parameterizedJob.Priority\n\t}\n\n\t// Validate the arguments and parameterized job\n\tagentConfig := j.srv.config\n\tif err := validateDispatchRequest(args, parameterizedJob, agentConfig); err != nil {","sourceCodeStart":2005,"sourceCodeEnd":2041,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/job_endpoint.go#L2005-L2041","documentation":"After the JobID is validated, Dispatch looks up the job in the request's namespace via state store snap.JobByID. If no job with that ID exists in that namespace, the lookup returns nil and the server rejects the dispatch with this error.","triggerScenarios":"Dispatching against a JobID that does not exist in the request namespace: job never registered, already GC'd, typo in the ID, or dispatching into the wrong namespace (RequestNamespace differs from where the job lives).","commonSituations":"Automated pipelines dispatching jobs that were garbage collected after their stop-time/dispatch deadline; multi-namespace setups where ACL token resolves to a different namespace than where the job was created; typos or renamed jobs in CI scripts.","solutions":["Check `nomad job status <job-id>` in the target namespace to confirm the parameterized job exists","Verify the request namespace (and ACL token namespace) matches the namespace where the job is registered","Re-register the parameterized job if it was stopped and garbage collected","Correct the job ID spelling in your dispatch call"],"exampleFix":"// before\nreq := &structs.JobDispatchRequest{JobID: \"batch-proces\"}\n// after\nreq := &structs.JobDispatchRequest{Namespace: \"prod\", JobID: \"batch-process\"}","handlingStrategy":"validation","validationCode":"job, _, err := client.Jobs().Info(jobID, &nomad.QueryOptions{Namespace: ns})\nif err != nil || job == nil {\n    return fmt.Errorf(\"parameterized job %q not found in namespace %s\", jobID, ns)\n}","typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"parameterized job not found\") {\n    // re-register the job or fail fast; retrying will not help\n}","preventionTips":["Confirm job existence with Jobs().Info in the same namespace before dispatch","Pin the namespace in QueryOptions/WriteOptions explicitly","Account for GC: stopped jobs disappear and cannot be dispatched","Use consistent job IDs shared between provisioning and dispatch code"],"tags":["nomad","api","not-found","namespace"],"backgroundTag":"resource-not-found","analyzedSha":"482b49bf1aec006f089bcfc7e632d8f6ac303e5e","analyzedAt":"2026-09-04T07:54:14.808Z","contentChangedAt":"2026-09-04T07:54:14.808Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}