How to specify http 1.1 in prometheus scrape config job

336 views
Skip to first unread message

Pragya Singh

unread,
Sep 14, 2023, 9:22:18 AM9/14/23
to Prometheus Users
We are getting this error in prometheus while connecting to an endpoint
Get "https://10.14.0.42:443/health": stream error: stream ID 7; HTTP_1_1_REQUIRED; received from peer

When checked manually: curl https://10.14.0.42:443/health -k -v --http1.1
This works fine and provides list of metrics

I added scheme: http but that didn't work and I am getting the same error. Something like this
scrape_configs: 
   - job_name: 'example' 
     scheme: http

Any recommendations on what else I can try here?


Regards,
Pragya

Brian Candler

unread,
Sep 14, 2023, 10:59:58 AM9/14/23
to Prometheus Users
Try this:

enable_http2: false

Pragya Singh

unread,
Sep 22, 2023, 6:59:24 AM9/22/23
to Prometheus Users
I got a new error when I added enable_http2: false
local error : tls: no renegotiation

Brian Candler

unread,
Sep 22, 2023, 8:14:52 AM9/22/23
to Prometheus Users
Googling for that error:

However, as far as I can see, Prometheus doesn't have this option:

You could try playing with min_version/max_version (see if you can tell which TLS version was used by curl)

Brian Candler

unread,
Sep 22, 2023, 9:24:45 AM9/22/23
to Prometheus Users
BTW, TLS renegotiation has security problems, and was removed entirely from TLS1.3.

I suggest you get the target server updated. If you cannot, then you may need to put a proxy in between prometheus and that server - and the proxy must be configured to allow renegotiation, at least on the outbound session.

Reply all
Reply to author
Forward
0 new messages