mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2026-05-17 00:26:36 +03:00
Clone `http.DefaultTransport` and disable HTTP2 without resetting `TLSClientConfig.NextProtos` in the shadow copy of `http.DefaultTransport` will cause the request to HTTP/2 server to fail. See https://github.com/golang/go/issues/39302. To reproduce it, use a scrape config like: ``` scrape_configs: - job_name: test yandexcloud_sd_configs: - service: compute api_endpoint: https://api.cloud.yandex.net ``` Before the fix, access to the SD service would fail. A solution is to specify `http/1.1` in `TLSClientConfig.NextProtos`. Related golang issue: https://github.com/golang/go/issues/39302 fixes https://github.com/VictoriaMetrics/VictoriaMetrics/issues/9981