{"record":{"id":"a02ea125ff28d7fd","repo":"hashicorp/nomad","slug":"consul-ingress-gateway-requires-at-least-one-liste","errorCode":null,"errorMessage":"Consul Ingress Gateway requires at least one listener","messagePattern":"Consul Ingress Gateway requires at least one listener","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/structs/services.go","lineNumber":2568,"sourceCode":"func (e *ConsulIngressConfigEntry) Equal(o *ConsulIngressConfigEntry) bool {\n\tif e == nil || o == nil {\n\t\treturn e == o\n\t}\n\n\tif !e.TLS.Equal(o.TLS) {\n\t\treturn false\n\t}\n\n\treturn ingressListenersEqual(e.Listeners, o.Listeners)\n}\n\nfunc (e *ConsulIngressConfigEntry) Validate() error {\n\tif e == nil {\n\t\treturn nil\n\t}\n\n\tif len(e.Listeners) == 0 {\n\t\treturn fmt.Errorf(\"Consul Ingress Gateway requires at least one listener\")\n\t}\n\n\tfor _, listener := range e.Listeners {\n\t\tif err := listener.Validate(); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc ingressListenersEqual(a, b []*ConsulIngressListener) bool {\n\treturn helper.ElementsEqual(a, b)\n}\n\ntype ConsulLinkedService struct {\n\tName     string\n\tCAFile   string","sourceCodeStart":2550,"sourceCodeEnd":2586,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/structs/services.go#L2550-L2586","documentation":"ConsulIngressConfigEntry.Validate found zero listeners on an ingress gateway. An ingress gateway with nothing to listen on is meaningless, so at least one listener block is required.","triggerScenarios":"Thrown at nomad/structs/services.go:2568 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add at least one listener block to the ingress stanza"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}