{"record":{"id":"e12f30b784d998dd","repo":"hashicorp/nomad","slug":"consul-did-not-report-any-supported-envoy-versions","errorCode":null,"errorMessage":"Consul did not report any supported envoy versions","messagePattern":"Consul did not report any supported envoy versions","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"client/allocrunner/taskrunner/envoy_version_hook.go","lineNumber":176,"sourceCode":"\tif len(config) == 0 {\n\t\treturn false\n\t}\n\n\tif _, exists := config[\"image\"]; !exists {\n\t\treturn false\n\t}\n\n\timage := h.taskImage(config)\n\n\treturn strings.Contains(image, envoy.VersionVar)\n}\n\n// tweakImage determines the best Envoy version to use. If no supported versions were\n// detected from the Consul API just return an error.\nfunc (h *envoyVersionHook) tweakImage(configured string, supported map[string][]string) (string, error) {\n\tversions := supported[\"envoy\"]\n\tif len(versions) == 0 {\n\t\treturn \"\", errors.New(\"Consul did not report any supported envoy versions\")\n\t}\n\n\tlatest, err := semver(versions[0])\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\treturn strings.ReplaceAll(configured, envoy.VersionVar, latest), nil\n}\n\n// semver sanitizes the envoy version string coming from Consul into the format\n// used by the Envoy project when publishing images (i.e. proper semver). This\n// resulting string value does NOT contain the 'v' prefix for 2 reasons:\n//  1. the version library does not include the 'v'\n//  2. its plausible unofficial images use the 3 numbers without the prefix for\n//     tagging their own images\nfunc semver(chosen string) (string, error) {\n\tv, err := version.NewVersion(chosen)","sourceCodeStart":158,"sourceCodeEnd":194,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/client/allocrunner/taskrunner/envoy_version_hook.go#L158-L194","documentation":"Fired in envoyVersionHook.tweakImage during Prestart: the Consul API returned no supported Envoy versions (empty 'envoy' list), so the hook cannot pick a version to substitute into the envoy image template.","triggerScenarios":"Thrown at client/allocrunner/taskrunner/envoy_version_hook.go:176 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify Consul is running and supports the /agent/connect/ca/roots or envoy version reporting endpoint used by the hook","Check Consul/Nomad version compatibility and network access from the client to Consul","Set a static envoy image in the task config to bypass version detection"],"exampleFix":null,"handlingStrategy":"fallback","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"}