# Haproxy not work h2c(proto h2) in http protocol

**URL:** <https://discourse.haproxy.org/t/haproxy-not-work-h2c-proto-h2-in-http-protocol/3750>\
**Category:** Help!\
**Created:** [April 22, 2019, 8:35am UTC](https://discourse.haproxy.org/t/haproxy-not-work-h2c-proto-h2-in-http-protocol/3750 "2019-04-22T08:35:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![criss](https://avatars.discourse-cdn.com/v4/letter/c/7c8e57/32.png) [@criss](https://discourse.haproxy.org/u/criss)\
**Post date:** [April 22, 2019, 8:35am UTC](https://discourse.haproxy.org/t/haproxy-not-work-h2c-proto-h2-in-http-protocol/3750/1 "2019-04-22T08:35:18Z")

</div>

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？

> <https://github.com/haproxy/haproxy/issues/77>

---

<div class="post-metadata">

**Author:** ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)\
**Post date:** [April 22, 2019, 8:43am UTC](https://discourse.haproxy.org/t/haproxy-not-work-h2c-proto-h2-in-http-protocol/3750/2 "2019-04-22T08:43:43Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![criss](https://avatars.discourse-cdn.com/v4/letter/c/7c8e57/32.png) [@criss](https://discourse.haproxy.org/u/criss)\
**Post date:** [April 22, 2019, 10:26am UTC](https://discourse.haproxy.org/t/haproxy-not-work-h2c-proto-h2-in-http-protocol/3750/3 "2019-04-22T10:26:39Z")

</div>

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
```

---

<div class="post-metadata">

**Author:** ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)\
**Post date:** [April 22, 2019, 10:28am UTC](https://discourse.haproxy.org/t/haproxy-not-work-h2c-proto-h2-in-http-protocol/3750/4 "2019-04-22T10:28:52Z")

</div>

Your backend server responds with a `404 Not Found` error. You will have to find out why.

---

<div class="post-metadata">

**Author:** ![criss](https://avatars.discourse-cdn.com/v4/letter/c/7c8e57/32.png) [@criss](https://discourse.haproxy.org/u/criss)\
**Post date:** [April 23, 2019, 3:30am UTC](https://discourse.haproxy.org/t/haproxy-not-work-h2c-proto-h2-in-http-protocol/3750/5 "2019-04-23T03:30:26Z")

</div>

sorry.The problem is in the backend.I error
