{"record":{"id":"7d1c1b175c7dd503","repo":"hashicorp/nomad","slug":"specified-job-q-is-stopped","errorCode":null,"errorMessage":"Specified job %q is stopped","messagePattern":"Specified job %q is stopped","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/job_endpoint.go","lineNumber":2031,"sourceCode":"\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 {\n\t\treturn err\n\t}\n\n\t// Avoid creating new dispatched jobs for retried requests, by using the\n\t// idempotency token\n\tif args.IdempotencyToken != \"\" {\n\t\tfound, err := snap.CheckIdempotencyToken(\n\t\t\tparameterizedJob.Namespace, parameterizedJob.ID, args.IdempotencyToken)","sourceCodeStart":2013,"sourceCodeEnd":2049,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/job_endpoint.go#L2013-L2049","documentation":"The parameterized job exists in the namespace but is marked stopped (Stop=true, e.g. it was deregistered or stopped via `nomad job stop`). Nomad refuses to dispatch children from a stopped parameterized job until the stop is purged or the job is re-registered.","triggerScenarios":"Dispatching against a parameterized job that was stopped (job stop, deregister, or its dispatch deadline/gc passed and it is pending GC).","commonSituations":"CI pipelines still dispatching a job a teammate stopped; job stopped for maintenance but automation not paused; stopped jobs awaiting garbage collection still visible in listings, misleading scripts into trying dispatch.","solutions":["Re-register / restart the parameterized job (`nomad job run` its spec) before dispatching","If the stop was intentional, disable the dispatching automation","Wait for GC and re-create the job fresh, then resume dispatch"],"exampleFix":"// before\nnomad job dispatch batch-process\n// after (job was stopped)\nnomad system gc && nomad job run batch-process.nomad && nomad job dispatch batch-process","handlingStrategy":"validation","validationCode":"job, _, _ := client.Jobs().Info(jobID, nil)\nif job != nil && job.Status != nil && *job.Status == \"dead\" {\n    return fmt.Errorf(\"job %s is stopped; re-register before dispatch\", jobID)\n}","typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"is stopped\") {\n    // alert operator / halt automation instead of retrying\n}","preventionTips":["Check job status is 'running' before dispatching in automation","Coordinate job stop operations with teams owning dispatch pipelines","Monitor job lifecycle events to pause dispatchers when jobs are stopped"],"tags":["nomad","api","stopped-job","state"],"backgroundTag":"invalid-resource-state","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"}