Opened 7 years ago

Closed 7 years ago

#1266 closed defect (duplicate)

nginx:1.12.0-alpine http2 responds with binary constant without headers

Reported by: soulne4ny@… Owned by:
Priority: minor Milestone:
Component: other Version:
Keywords: Cc:
uname -a: Linux 7f6c116da168 4.4.41-moby #1 SMP Wed Jan 11 01:09:58 UTC 2017 x86_64 Linux
nginx -V: nginx version: nginx/1.12.0
built by gcc 6.2.1 20160822 (Alpine 6.2.1)
built with OpenSSL 1.0.2k 26 Jan 2017
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_geoip_module=dynamic --with-threads --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-stream_realip_module --with-stream_geoip_module=dynamic --with-http_slice_module --with-mail --with-mail_ssl_module --with-compat --with-file-aio --with-http_v2_module

Description

I've just tried docker's image nginx:1.12.0-alpine. With nginx:1.11.13-alpine my config works well, while with 1.12.0 I'm getting binary.

$ http -v http://my.local.00/

http: error: ConnectionError: ('Connection aborted.', BadStatusLine('\x00\x00\x12\x04\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x80\x00\x04\x00\x01\x00\x00\x00\x05\x00ÿÿÿ\x00\x00\x04\x08\x00\x00\x00\x00\x00\x7fÿ\x00\x00\x00\x00\x08\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01',)) while doing GET request to URL: http://my.local.00/

It looks the same for any request. And the problem disappears after removing 'http2' from server's listen directive.

Change History (3)

comment:1 by soulne4ny@…, 7 years ago

Sorry. It is not about nginx version. It is something else, probably docker itself.

comment:2 by soulne4ny@…, 7 years ago

Still not docker. It disappears when I remove http2 from server listen. And it happens with nginx 1.11.13 and 1.11.10 as well.

comment:3 by Maxim Dounin, 7 years ago

Resolution: duplicate
Status: newclosed

It looks like you are trying to use an plain http2 listening socket with http. This is not going to work - unless your client knows to use http2, you have to use http2 with SSL, that is, listen ... http2 ssl;.

Duplicate of #808.

Note: See TracTickets for help on using tickets.