hashicorp/nomad · error
Consul Ingress Listener requires protocol of %s, got %q
Error message
Consul Ingress Listener requires protocol of %s, got %q
What it means
ConsulIngressListener.Validate found a protocol outside the supported set {tcp, http, http2, grpc} on an ingress listener; the listener protocol must match one of Consul's supported L4/L7 protocols.
Source
Thrown at nomad/structs/services.go:2497
if l.Protocol != o.Protocol {
return false
}
return ingressServicesEqual(l.Services, o.Services)
}
func (l *ConsulIngressListener) Validate() error {
if l == nil {
return nil
}
if l.Port <= 0 {
return fmt.Errorf("Consul Ingress Listener requires valid Port")
}
protocols := []string{"tcp", "http", "http2", "grpc"}
if !slices.Contains(protocols, l.Protocol) {
return fmt.Errorf(`Consul Ingress Listener requires protocol of %s, got %q`, strings.Join(protocols, ", "), l.Protocol)
}
if len(l.Services) == 0 {
return fmt.Errorf("Consul Ingress Listener requires one or more services")
}
for _, service := range l.Services {
if err := service.Validate(l.Protocol); err != nil {
return err
}
}
return nil
}
func ingressServicesEqual(a, b []*ConsulIngressService) bool {
return helper.ElementsEqual(a, b)
}View on GitHub (pinned to 482b49bf1a)
Solutions
- Set the listener protocol to one of tcp, http, http2, or grpc
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at nomad/structs/services.go:2497 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/21057ec6661edbb5.
Report an issue: GitHub.