hashicorp/nomad · error
No Connect services in task group with Connect proxy (%q)
Error message
No Connect services in task group with Connect proxy (%q)
What it means
Validation error from group service validation for Consul Connect proxies: the group declares a connect sidecar_service (proxy) whose service name does not match any Connect-enabled service in the task group, and the group has no Connect services at all. The check builds the list of Connect service names and, when the proxy's target is not found and that list is empty, returns this error.
Source
Thrown at nomad/structs/structs.go:8786
names := make([]string, 0, len(tgServices))
for _, svc := range tgServices {
if svc.Connect == nil || svc.Connect.SidecarService == nil {
continue
}
if svc.Name == serviceName {
found = true
break
}
// Build up list of mismatched Connect service names for error
// reporting.
names = append(names, svc.Name)
}
if !found {
if len(names) == 0 {
return fmt.Errorf("No Connect services in task group with Connect proxy (%q)", serviceName)
} else {
return fmt.Errorf("Connect proxy service name (%q) not found in Connect services from task group: %s", serviceName, names)
}
}
return nil
}
const (
// TemplateChangeModeNoop marks that no action should be taken if the
// template is re-rendered
TemplateChangeModeNoop = "noop"
// TemplateChangeModeSignal marks that the task should be signaled if the
// template is re-rendered
TemplateChangeModeSignal = "signal"
// TemplateChangeModeRestart marks that the task should be restarted if theView on GitHub (pinned to 482b49bf1a)
Solutions
- Add the Connect-enabled service the proxy should attach to: service { name = "..."; connect { sidecar_service {} } }.
- Remove the orphaned sidecar_service/proxy stanza if it is not needed.
- Verify the proxy's target service name (if set in sidecar_service proxy stanza) matches an existing Connect service.
Example fix
// before
service {
name = "web-proxy"
connect { sidecar_service {} }
}
// (no Connect service "web" defined)
// after
service {
name = "web"
port = "http"
connect { sidecar_service {} }
} Defensive patterns
Strategy: validation
Validate before calling
// Before submit: group must contain at least one service with a connect block
if !slices.ContainsFunc(group.Services, func(s Service) bool { return s.Connect != nil }) {
return errors.New("sidecar_service requires a Connect service in the same group")
} Prevention
- Place sidecar_service inside the same service stanza that has the connect block.
- Never create standalone proxy-only service stanzas.
- Validate connect jobs with `nomad job validate` in CI.
When it happens
Trigger: Submitting a job whose service stanza has connect { sidecar_service {} } (or a sidecar_service referencing a name) while the group contains no service with a `connect` block. Triggered when `found == false` and `len(names) == 0` in the proxy-name validation routine.
Common situations: Adding a sidecar_service stanza without defining the actual Connect-enabled service; deleting the app service but leaving the proxy; copying a proxy stanza into a group that lacks Connect services.
Related errors
- Connect proxy service name (%q) not found in Connect service
- Check %s invalid: tcp checks are not valid for Connect enabl
- Service %s is Connect Native and requires setting the task
- Consul Connect must be exclusively native, make use of a sid
- Connect proxy task must not have a service block
AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04).
Data as JSON: /api/errors/15fafd9470519193.
Report an issue: GitHub.