{"record":{"id":"4c6008eb023aaaac","repo":"hashicorp/nomad","slug":"consul-gateway-proxy-connection-timeout-must-be-se","errorCode":null,"errorMessage":"Consul Gateway Proxy connection_timeout must be set","messagePattern":"Consul Gateway Proxy connection_timeout must be set","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/structs/services.go","lineNumber":2162,"sourceCode":"\tif !reflect.DeepEqual(p.Config, o.Config) {\n\t\treturn false\n\t}\n\n\treturn true\n}\n\nconst (\n\tstrictDNS  = \"STRICT_DNS\"\n\tlogicalDNS = \"LOGICAL_DNS\"\n)\n\nfunc (p *ConsulGatewayProxy) Validate() error {\n\tif p == nil {\n\t\treturn nil\n\t}\n\n\tif p.ConnectTimeout == nil {\n\t\treturn fmt.Errorf(\"Consul Gateway Proxy connection_timeout must be set\")\n\t}\n\n\tswitch p.EnvoyDNSDiscoveryType {\n\tcase \"\", strictDNS, logicalDNS:\n\t\t// Consul defaults to logical DNS, suitable for large scale workloads.\n\t\t// https://www.envoyproxy.io/docs/envoy/v1.16.1/intro/arch_overview/upstream/service_discovery\n\tdefault:\n\t\treturn fmt.Errorf(\"Consul Gateway Proxy Envoy DNS Discovery type must be %s or %s\", strictDNS, logicalDNS)\n\t}\n\n\tfor _, bindAddr := range p.EnvoyGatewayBindAddresses {\n\t\tif err := bindAddr.Validate(); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}","sourceCodeStart":2144,"sourceCodeEnd":2180,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/structs/services.go#L2144-L2180","documentation":"ConsulGatewayProxy.Validate requires connection_timeout because Consul's Envoy gateway proxy API treats it as mandatory; a nil ConnectTimeout in the gateway proxy stanza triggers this error.","triggerScenarios":"Thrown at nomad/structs/services.go:2162 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add connection_timeout (e.g. \"5s\") to the connect gateway proxy block"],"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"}