haproxy not work http2(h2/GRPC) in http protocol not working.
my [HAProxy version 1.9.6, released 2019/03/29]
My service is GRPC, Intranet.so we don’t use the HTTPS protocol.
my haproxy-config :
frontend grpc
mode http
option http-use-htx
bind *:8080 proto h2
default_backend http2-server
backend http2-server
mode http
option http-use-htx
server k8s1 10.80.78.1:80 check proto h2
Can you fix this problem?
We don’t know anything about your problem and the issue you found on github is probably completely unrelated to your problem.
So why don’t you elaborate what actual problem you are facing is?
i used option http-use-htx.
I used config (bind *:8443 ssl crt /usr/local/etc/haproxy/haproxy.pem alpn h2) [https://] web is good.
frontend proto h2 ->backend proto h2 is 404.
my config:
global log 127.0.0.1 local0 log 127.0.0.1 local1 notice ssl-default-bind-ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS ssl-default-bind-options ssl-min-ver TLSv1.1 defaults log global maxconn 40960 mode http option dontlognull timeout connect 5000ms listen stats bind :19090 mode http stats uri /haproxy_stats frontend grpc mode http option http-use-htx bind *:80 proto h2 default_backend http2-server backend http2-server mode http option http-use-htx server k8s1 10.80.78.1:80 check proto h2
my web is HTTP2 is good. code 200,but look this error 404.
# curl -vosa "http://www.iftest.com/" --http2-prior-knowledge * Expire in 0 ms for 6 (transfer 0x55e4eec165c0) * Expire in 1 ms for 1 (transfer 0x55e4eec165c0) % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Expire in 1 ms for 1 (transfer 0x55e4eec165c0) * Expire in 2 ms for 1 (transfer 0x55e4eec165c0) * Expire in 1 ms for 1 (transfer 0x55e4eec165c0) * Expire in 1 ms for 1 (transfer 0x55e4eec165c0) * Expire in 1 ms for 1 (transfer 0x55e4eec165c0) * Trying 10.21.8.224... * TCP_NODELAY set * Expire in 200 ms for 4 (transfer 0x55e4eec165c0) * Connected to www.iftest.com (10.21.8.224) port 80 (#0) * Using HTTP2, server supports multi-use * Connection state changed (HTTP/2 confirmed) * Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0 * Using Stream ID: 1 (easy handle 0x55e4eec165c0) > GET / HTTP/2 > Host: www.iftest.com > User-Agent: curl/7.64.0 > Accept: */* > * Connection state changed (MAX_CONCURRENT_STREAMS == 250)! < HTTP/2 404 < content-type: text/plain; charset=utf-8 < x-content-type-options: nosniff < content-length: 19 < date: Mon, 22 Apr 2019 10:04:31 GMT < { [19 bytes data] 100 19 100 19 0 0 260 0 --:--:-- --:--:-- --:--:-- 260 * Connection #0 to host www.iftest.com left intact
Your backend server responds with a 404 Not Found
error. You will have to find out why.
sorry.The problem is in the backend.I error