# Echo-nginx-module and HTTP2

**URL:** <https://www.ruby-forum.com/t/echo-nginx-module-and-http2/243957>\
**Category:** NGINX\
**Created:** [January 28, 2016, 10:45am UTC](https://www.ruby-forum.com/t/echo-nginx-module-and-http2/243957 "2016-01-28T10:45:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sadaf\_N](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@Sadaf\_N](https://www.ruby-forum.com/u/Sadaf_N)\
**Post date:** [January 28, 2016, 10:45am UTC](https://www.ruby-forum.com/t/echo-nginx-module-and-http2/243957/1 "2016-01-28T10:45:34Z")

</div>

Hello,

The echo module ([GitHub - openresty/echo-nginx-module: An Nginx module for bringing the power of "echo", "sleep", "time" and more to Nginx's config file](https://github.com/openresty/echo-nginx-module) / v0.58)  
produce segfaults while accessing the following location:

```
# echo back the client request
location /echoback {
  echo_duplicate 1 $echo_client_request_headers;
  echo "\r";

  echo_read_request_body;

  echo_request_body;
}

```

that happen only if http2 is enabled (usually at https servers).

…  
worker process 20658 exited on signal 11

Andreas

---

<div class="post-metadata">

**Author:** ![ASSchulze](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ac8455/32.png) [@ASSchulze](https://www.ruby-forum.com/u/ASSchulze)\
**Post date:** [January 28, 2016, 8:01pm UTC](https://www.ruby-forum.com/t/echo-nginx-module-and-http2/243957/2 "2016-01-28T20:01:08Z")

</div>

Hello!

On Thu, Jan 28, 2016 at 1:45 AM, A. Schulze wrote:

> ```
> echo_request_body;
> 
> ```
> 
> }
> 
> that happen only if http2 is enabled (usually at https servers).

Yeah, the ngx\_echo module does not support the HTTP/2 mode yet (as the  
maintainer, I’ve never tested it anyway). Patches welcome and  
volunteers welcome 🙂

Best regards,  
-agentzh

---

<div class="post-metadata">

**Author:** ![ASSchulze](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ac8455/32.png) [@ASSchulze](https://www.ruby-forum.com/u/ASSchulze)\
**Post date:** [January 29, 2016, 8:20am UTC](https://www.ruby-forum.com/t/echo-nginx-module-and-http2/243957/3 "2016-01-29T08:20:44Z")

</div>

Yichun Z. (agentzh):

> Yeah, the ngx\_echo module does not support the HTTP/2 mode yet (as the  
> maintainer, I’ve never tested it anyway). Patches welcome and  
> volunteers welcome 🙂

thanks,

I could not support with patches but would do some beta testing.

Just to have ask:  
disabling http2 for a location is not possible, isn’t it?

Andreas

---

<div class="post-metadata">

**Author:** ![ASSchulze](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ac8455/32.png) [@ASSchulze](https://www.ruby-forum.com/u/ASSchulze)\
**Post date:** [January 30, 2016, 5:41am UTC](https://www.ruby-forum.com/t/echo-nginx-module-and-http2/243957/4 "2016-01-30T05:41:14Z")

</div>

Hello,

I was doing some debugging and though I haven’t found a fix. The problem  
is  
in the ngx\_http\_echo\_client\_request\_headers\_variable() function  
c-\>buffer  
is NULL when http v2 is used for some reason (internal to nginx).

–  
Kurt C.  
[https://www.x64architecture.com](https://www.x64architecture.com)

---

<div class="post-metadata">

**Author:** ![ASSchulze](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ac8455/32.png) [@ASSchulze](https://www.ruby-forum.com/u/ASSchulze)\
**Post date:** [February 1, 2016, 11:53pm UTC](https://www.ruby-forum.com/t/echo-nginx-module-and-http2/243957/5 "2016-02-01T23:53:29Z")

</div>

Hello!

On Fri, Jan 29, 2016 at 8:40 PM, Kurt C. wrote:

> I was doing some debugging and though I haven’t found a fix. The problem is  
> in the ngx\_http\_echo\_client\_request\_headers\_variable() function c-\>buffer is  
> NULL when http v2 is used for some reason (internal to nginx).

This is expected since the HTTP/2 mode of NGINX reads the request  
header into a different place. We should branch the code accordingly.

Regards,  
-agentzh

---

<div class="post-metadata">

**Author:** ![ASSchulze](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ac8455/32.png) [@ASSchulze](https://www.ruby-forum.com/u/ASSchulze)\
**Post date:** [January 29, 2016, 9:35pm UTC](https://www.ruby-forum.com/t/echo-nginx-module-and-http2/243957/6 "2016-01-29T21:35:13Z")

</div>

Hello!

On Thu, Jan 28, 2016 at 11:19 PM, A. Schulze wrote:

> I could not support with patches but would do some beta testing.

Thanks.

> Just to have ask:  
> disabling http2 for a location is not possible, isn’t it?

Nope.

Regards,  
-agentzh

---

<div class="post-metadata">

**Author:** ![ASSchulze](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ac8455/32.png) [@ASSchulze](https://www.ruby-forum.com/u/ASSchulze)\
**Post date:** [February 17, 2017, 6:25pm UTC](https://www.ruby-forum.com/t/echo-nginx-module-and-http2/243957/7 "2017-02-17T18:25:28Z")

</div>

I also had the segfaults with the echo module.  
After googling for a while I solved the issue following this nginx echo  
module guide:

> **[How to install nginx echo module latest version](https://tutorials.technology/tutorials/31-how-to-install-nginx-echomodule-latest-version.html)**
>
> Nginx echo module brings
