HTTP/2 Cleartext Config Seems Incompatible with Health Check Feature
S
Sven
In order to migrate seamlessly from HTTP/1.1 to HTTP/2 cleartext (rationale), I went through the following steps:
- I kept my HTTP/1.1 server on port 8080 and added a secondary h2c server on port 8081. The deployment was fine.
- I edited the app spec via the web frontend to change the service's port from 8080 to 8081 and add protocol: HTTP2as outlined in the documentation.
- Unfortunately the deployment failed as it looks like the health check was never successful.
Here's what I got from the deployment log:
> Sep 12 10:26:59 ERROR failed health checks after 12 attempts with error Readiness probe failed: Get "http://<private-ip-address>:8081/v1/health-check": net/http: HTTP/1.x transport connection broken: malformed HTTP response "\x00\x00\f\x04\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00d\x00\x06\x00\x00@\x00\x00\x00\b\a\x00\x00\x00\x00\x00\x7f\xff\xff\xff\x00\x00\x00\x01"
Is it possible the health check feature doesn't support h2c yet?
S
Sven
As a workaround, expose
8080
in internal_ports
and explicitly specify services[].health_check.port: 8080
.While it works, I think it's cleaner to allow the health check endpoint to use h2c as well.