hashicorp/nomad · error
connect proxy sidecar task exists but no services configured
Error message
connect proxy sidecar task exists but no services configured with a sidecar
What it means
Fired in envoyBootstrapHook.lookupService during Prestart: a connect-proxy task exists in the task group, but no service in that group matches the proxy's service name (i.e. no service declares a sidecar proxy for it).
Source
Thrown at client/allocrunner/taskrunner/envoy_bootstrap_hook.go:251
return serviceKind, serviceName, nil
}
func (h *envoyBootstrapHook) lookupService(svcKind, svcName string, taskEnv *taskenv.TaskEnv) (*structs.Service, error) {
tg := h.alloc.Job.LookupTaskGroup(h.alloc.TaskGroup)
interpolatedServices := taskenv.InterpolateServices(taskEnv, tg.Services)
var service *structs.Service
for _, s := range interpolatedServices {
if s.Name == svcName {
service = s
break
}
}
if service == nil {
if svcKind == structs.ConnectProxyPrefix {
return nil, errors.New("connect proxy sidecar task exists but no services configured with a sidecar")
} else {
return nil, errors.New("connect gateway task exists but no service associated")
}
}
return service, nil
}
// Prestart creates an envoy bootstrap config file.
//
// Must be aware of both launching envoy as a sidecar proxy, as well as a connect gateway.
func (h *envoyBootstrapHook) Prestart(ctx context.Context, req *ifs.TaskPrestartRequest, resp *ifs.TaskPrestartResponse) error {
if !req.Task.Kind.IsConnectProxy() && !req.Task.Kind.IsAnyConnectGateway() {
return nil
}
serviceKind, serviceName, err := h.extractNameAndKind(req.Task.Kind)
if err != nil {View on GitHub (pinned to 482b49bf1a)
Solutions
- Add a service block with connect { sidecar_service {} } to the task group so the proxy has a matching service
- Fix the proxy task's service name so it matches an existing group service
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at client/allocrunner/taskrunner/envoy_bootstrap_hook.go:251 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of hashicorp/nomad@482b49bf1a (2026-09-04).
Data as JSON: /api/errors/95bd004355c23e08.
Report an issue: GitHub.