hashicorp/nomad · error
service registration provider "nomad" not enabled
Error message
service registration provider "nomad" not enabled
What it means
The Nomad-native service registration handler returns this error when RegisterWorkload is invoked while the handler's registrationEnabled flag is false. The comment notes that hitting it likely indicates a bug in the implicit constraint or the process using it, since that constraint should prevent allocations landing on clients without the provider enabled.
Source
Thrown at client/serviceregistration/nsd/nsd.go:121
s.backoffInitial = 100 * time.Millisecond
}
if s.backoffMax == 0 {
s.backoffMax = time.Second
}
return s
}
// SetNodeIdentityToken fulfills the NodeIdentityHandler interface, allowing
// the client to update the node identity token used for RPC calls when it is
// renewed.
func (s *ServiceRegistrationHandler) SetNodeIdentityToken(token string) { s.nodeAuthToken.Store(token) }
func (s *ServiceRegistrationHandler) RegisterWorkload(workload *serviceregistration.WorkloadServices) error {
// Check whether we are enabled or not first. Hitting this likely means
// there is a bug within the implicit constraint, or process using it, as
// that should guard ever placing an allocation on this client.
if !s.registrationEnabled {
return errors.New(`service registration provider "nomad" not enabled`)
}
// Collect all errors generating service registrations.
var mErr multierror.Error
registrations := make([]*structs.ServiceRegistration, len(workload.Services))
// Iterate over the services and generate a hydrated registration object for
// each. All services are part of a single allocation, therefore we cannot
// have one failure without all becoming a failure.
for i, serviceSpec := range workload.Services {
serviceRegistration, err := s.generateNomadServiceRegistration(serviceSpec, workload)
if err != nil {
mErr.Errors = append(mErr.Errors, err)
} else if mErr.ErrorOrNil() == nil {
registrations[i] = serviceRegistration
}
}View on GitHub (pinned to 482b49bf1a)
Solutions
- Enable the nomad service registration provider in the client config (service_registration { enabled = true })
- Check that the implicit constraint is correctly excluding clients with the provider disabled
- Remove/adjust job service blocks if native service discovery is not intended on this cluster
- Upgrade Nomad if a known bug in the constraint is the cause
Example fix
// before (client.hcl)
service_registration { enabled = false }
// after
service_registration { enabled = true } Defensive patterns
Strategy: validation
Validate before calling
// before placing workloads using native service discovery
if !clientConfig.ServiceRegistration.Enabled {
return errors.New("nomad service registration provider disabled on client")
} Try / catch
if err := handler.RegisterWorkload(workload); err != nil && strings.Contains(err.Error(), `provider "nomad" not enabled`) {
log.Error("client service registration disabled; check client config/implicit constraint")
return err
} Prevention
- Enable service_registration { enabled = true } on clients using native discovery
- Rely on the implicit placement constraint to exclude disabled clients
- Audit client configs before rolling out jobs with service blocks
- Report/upgrade if the constraint incorrectly places allocs on disabled clients
When it happens
Trigger: Calling ServiceRegistrationHandler.RegisterWorkload on a client where the nomad service registration provider is disabled (client config service_registration{ enabled = false } or default off).
Common situations: Misconfigured client config that disables the nomad provider while jobs still request native service discovery; a bug where the implicit placement constraint failed to exclude the client.
Related errors
- invalid digest format
- unsupported checksum format
- must pass non-nil job
- job is missing ID
- ErrLockConflict
AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04).
Data as JSON: /api/errors/1801bd66527be4fe.
Report an issue: GitHub.