In our specific use case, we were attempting to scrape Prometheus metrics from JupyterHub's hub pod. In our environment, this is done within an Istio Service Mesh. Prometheus attempts to request the /metrics endpoint using HTTP/2 which Tornado does not support and generates error messages like the following:
HTTP message from 127.0.0.6: Malformed HTTP version in HTTP Request-Line: 'HTTP/2.0'
How to reproduce
Deploy JupyterHub to a kubernetes cluster with Istio enabled and the standard hub Service manifest.
Set up a Prometheus ServiceMonitor for the hub Service.
Tail istio-proxy or hub container logs.
Expected behaviour
Allow appProtocol to be set on the hub service (i.e. set to http to "downgrade" requests to the hub service) and specify appProtocol as http.
Actual behaviour
hub application generates errors when HTTP/2 requests are received.
Bug description
In our specific use case, we were attempting to scrape Prometheus metrics from JupyterHub's
hub
pod. In our environment, this is done within an Istio Service Mesh. Prometheus attempts to request the/metrics
endpoint using HTTP/2 which Tornado does not support and generates error messages like the following:How to reproduce
hub
Service manifest.hub
Service.istio-proxy
orhub
container logs.Expected behaviour
Allow
appProtocol
to be set on thehub
service (i.e. set tohttp
to "downgrade" requests to thehub
service) and specifyappProtocol
ashttp
.Actual behaviour
hub
application generates errors when HTTP/2 requests are received.