HAProxy community

Haproxy 2.2.x and problem with proto h2 in backend

upgraded haproxy 2.1.x -> 2.2.x, everything working, almost

using haproxy as reverse proxy for apache servers

configuration for apache backends

backend default
server backend:80 maxconn 1000 check proto h2

for H2 apache
Protocols h2 h2c http/1.1

% curl --http2 -I
HTTP/1.1 101 Switching Protocols
Upgrade: h2c
Connection: Upgrade

HTTP/2 200
date: Sun, 00 Jan 1900 00:00:00 GMT
server: Apache
last-modified: Thu, 27 Feb 2020 12:06:34 GMT
etag: W/“0-59f8d8d57d36c”
accept-ranges: bytes
vary: Accept-Encoding,User-Agent
content-type: text/html; charset=UTF-8

there is error log on apache backend with version 2.2.x

[Wed Aug 05 14:39:50.453929 2020] [http2:debug] [pid 205856:tid 139673980614400] h2_filter.c(196): (104)Connection reset by peer: [client] AH03046: h2_session(280): error reading
[Wed Aug 05 14:39:50.453970 2020] [http2:debug] [pid 205856:tid 139673980614400] h2_session.c(2168): (104)Connection reset by peer: [client] AH03403: h2_session(278,IDLE,0): no data, error
[Wed Aug 05 14:39:50.453979 2020] [http2:debug] [pid 205856:tid 139673980614400] h2_session.c(1765): [client] AH03401: h2_session(278,IDLE,0): conn error -> shutdown
[Wed Aug 05 14:39:50.453992 2020] [http2:debug] [pid 205856:tid 139673980614400] h2_session.c(594): [client] AH03068: h2_session(278,IDLE,0): sent FRAME[GOAWAY[error=0, reason=‘timeout’, last_stream=0]], frames=2/4 (r/s)
[Wed Aug 05 14:39:50.454021 2020] [http2:debug] [pid 205856:tid 139673980614400] h2_conn_io.c(283): (32)Broken pipe: [client] AH03044: h2_conn_io(280): pass_out brigade 24 bytes
[Wed Aug 05 14:39:50.454025 2020] [http2:debug] [pid 205856:tid 139673980614400] h2_session.c(720): [client] AH03069: h2_session(278,IDLE,0): sent GOAWAY, err=0, msg=timeout
[Wed Aug 05 14:39:50.454030 2020] [http2:debug] [pid 205856:tid 139673980614400] h2_session.c(1675): [client] AH03078: h2_session(278,DONE,0): transit [IDLE] – local goaway --> [DONE]
[Wed Aug 05 14:39:50.454034 2020] [http2:debug] [pid 205856:tid 139673980614400] h2_conn.c(217): (70014)End of file found: [client] AH03045: h2_session(278,DONE,0): process, closing conn
[Wed Aug 05 14:39:50.454039 2020] [http2:debug] [pid 205856:tid 139673980614400] h2_session.c(1675): [client] AH03078: h2_session(278,CLEANUP,0): transit [DONE] – pre_close --> [CLEANUP]

version 2.1.x without any problems sending over cleartext h2 proto on apache servers

with version 2.2.x there is problem but everyhing looks same as 2.1.x (using same compile options)
Available multiplexer protocols :
(protocols marked as cannot be specified using ‘proto’ keyword)
fcgi : mode=HTTP side=BE mux=FCGI
: mode=HTTP side=FE|BE mux=H1
h2 : mode=HTTP side=FE|BE mux=H2
: mode=TCP side=FE|BE mux=PASS

thanks for help


look like you need to define health check like

option httpchk
http-check connect proto h2
http-check send meth HEAD uri / ver HTTP/2 hdr Host localhost

server backend:80 maxconn 1000 check proto h2

acording to tcpdump, 2.1.x ale lower just used “check proto h2” for tcp check and use H2 then for requests but there were not any H2 check, it all chenged with 2.2.x and H2 health checks

thank for help, hope it helps someone