{"record":{"id":"09df34f0ae5b8681","repo":"hashicorp/nomad","slug":"job-registration-dispatch-and-scale-are-disabled","errorCode":null,"errorMessage":"Job registration, dispatch, and scale are disabled by the scheduler configuration","messagePattern":"Job registration, dispatch, and scale are disabled by the scheduler configuration","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"nomad/structs/errors.go","lineNumber":60,"sourceCode":"\terrDeploymentTerminalNoFail      = \"can't fail terminal deployment\"\n\terrDeploymentTerminalNoPause     = \"can't pause terminal deployment\"\n\terrDeploymentTerminalNoPromote   = \"can't promote terminal deployment\"\n\terrDeploymentTerminalNoResume    = \"can't resume terminal deployment\"\n\terrDeploymentTerminalNoUnblock   = \"can't unblock terminal deployment\"\n\terrDeploymentTerminalNoRun       = \"can't run terminal deployment\"\n\terrDeploymentTerminalNoSetHealth = \"can't set health of allocations for a terminal deployment\"\n\terrDeploymentRunningNoUnblock    = \"can't unblock running deployment\"\n)\n\nvar (\n\tErrNoLeader                   = errors.New(errNoLeader)\n\tErrNotReadyForConsistentReads = errors.New(errNotReadyForConsistentReads)\n\tErrNoRegionPath               = errors.New(errNoRegionPath)\n\tErrTokenNotFound              = errors.New(errTokenNotFound)\n\tErrTokenExpired               = errors.New(errTokenExpired)\n\tErrTokenInvalid               = errors.New(errTokenInvalid)\n\tErrPermissionDenied           = errors.New(errPermissionDenied)\n\tErrJobRegistrationDisabled    = errors.New(errJobRegistrationDisabled)\n\tErrNoNodeConn                 = errors.New(errNoNodeConn)\n\tErrUnknownMethod              = errors.New(errUnknownMethod)\n\tErrUnknownNomadVersion        = errors.New(errUnknownNomadVersion)\n\tErrNodeLacksRpc               = errors.New(errNodeLacksRpc)\n\tErrMissingAllocID             = errors.New(errMissingAllocID)\n\tErrIncompatibleFiltering      = errors.New(errIncompatibleFiltering)\n\tErrMalformedChooseParameter   = errors.New(errMalformedChooseParameter)\n\n\t// ErrResultPaginatorCreation is returned by list RPC handlers when the\n\t// result paginator cannot be built, for example when the server cannot\n\t// evaluate a requested filter expression. api.ResultPaginatorErrorContent\n\t// duplicates its message so the CLI can match it without importing structs.\n\t// Keep the two in sync.\n\tErrResultPaginatorCreation = errors.New(errResultPaginatorCreation)\n\n\tErrUnknownNode = errors.New(ErrUnknownNodePrefix)\n\n\tErrDeploymentTerminalNoCancel    = errors.New(errDeploymentTerminalNoCancel)","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/structs/errors.go#L42-L78","documentation":"ErrJobRegistrationDisabled indicates the scheduler configuration has disabled job registration, dispatch, and scaling cluster-wide. Handlers like job register, doRegister, Scale, and Dispatch map their failures through errCodeFromHandler to this sentinel, and the HTTP layer rewrites it to a 403 (command/agent/http.go:765-766). It is a server-side policy state, not an ACL problem.","triggerScenarios":"Calling jobs/register, job dispatch, or job scale endpoints when the region's scheduler config has JobRegistrationEnabled (or equivalent) set to false; errCodeFromHandler translating handler errors carrying this message.","commonSituations":"Operators setting the scheduler config to freeze changes during incident/maintenance windows (a change freeze); clusters migrated or bootstrapped with registration disabled by default; automation (CI deploys) running during such a freeze.","solutions":["Re-enable via 'nomad scheduler set-config -job-registration-enabled=true' (or update the scheduler config via API)","Retry the job registration after the operator lifts the change freeze","Check current state with 'nomad scheduler get-config' before deploying","Avoid blanket 403-handling retries: this error will persist until config changes"],"exampleFix":"// before\n# scheduler config: job_registration_enabled = false\nnomad job run app.nomad  # -> 403 Job registration... disabled\n// after\nnomad scheduler set-config -job-registration-enabled=true\nnomad job run app.nomad","handlingStrategy":"retry","validationCode":"cfg, err := client.Operator().SchedulerGetConfiguration(nil)\nif err == nil && cfg.SchedulerConfig != nil && !cfg.SchedulerConfig.JobRegistrationEnabled {\n    return errors.New(\"job registration is disabled by scheduler config; aborting deploy\")\n}","typeGuard":"func IsJobRegistrationDisabled(err error) bool {\n    return err != nil && strings.Contains(err.Error(), structs.ErrJobRegistrationDisabled.Error())\n}","tryCatchPattern":"err := client.Jobs().Register(job, nil, nil)\nif strings.HasSuffix(err.Error(), structs.ErrJobRegistrationDisabled.Error()) {\n    // do not hot-retry; wait for operators to re-enable registration\n}","preventionTips":["Check 'nomad scheduler get-config' as a pre-deploy gate in CI","Coordinate deploys with maintenance/change-freeze windows","Alert on scheduler config changes in the cluster","Treat this 403 as terminal, not transient, in retry logic"],"tags":["acl","scheduler","nomad","http-403","configuration"],"backgroundTag":"operation-disabled-by-config","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"}