cloudflare / quiche

🥧 Savoury implementation of the QUIC transport protocol and HTTP/3
https://docs.quic.tech/quiche/
BSD 2-Clause "Simplified" License
9.34k stars 701 forks source link

quiche quic mode cannot accept any POST requests. #1159

Open Leozaki opened 2 years ago

Leozaki commented 2 years ago

2022/02/17 07:08:58 [alert] 93333#93333: 4 epoll_ctl(1, 15) failed (17: File exists), client: 10.115.205.7, server: example.com, request: "POST /pma/index.php?route=/database/structure/favorite-table&ajax_request=1&favorite_table=1&sync_favorite_tables=1 HTTP/3", host: "example.com" 2022/02/17 07:09:02 [alert] 93333#93333: 4 epoll_ctl(1, 15) failed (17: File exists), client: 10.115.205.7, server: example.com, request: "POST /pma/index.php?route=/navigation&ajax_request=1 HTTP/3", host: "example.com" 2022/02/17 07:09:02 [alert] 93333#93333: 4 epoll_ctl(1, 15) failed (17: File exists), client: 10.115.205.7, server: example.com, request: "POST /pma/index.php?route=/navigation&ajax_request=1 HTTP/3", host: "example.com" 2022/02/17 07:09:05 [alert] 93333#93333: 4 epoll_ctl(1, 15) failed (17: File exists), client: 10.115.205.7, server: example.com, request: "POST /pma/index.php?route=/navigation&ajax_request=1 HTTP/3", host: "example.com" 2022/02/17 07:09:05 [alert] 93333#93333: 4 epoll_ctl(1, 15) failed (17: File exists), client: 10.115.205.7, server: example.com, request: "POST /pma/index.php?route=/navigation&ajax_request=1 HTTP/3", host: "example.com" 2022/02/17 07:09:07 [alert] 93333#93333: 4 epoll_ctl(1, 15) failed (17: File exists), client: 10.115.205.7, server: example.com, request: "POST /pma/index.php?route=/navigation&ajax_request=1 HTTP/3", host: "example.com" 2022/02/17 07:09:07 [alert] 93333#93333: 4 epoll_ctl(1, 15) failed (17: File exists), client: 10.115.205.7, server: example.com, request: "POST /pma/index.php?route=/navigation&ajax_request=1 HTTP/3", host: "example.com" 2022/02/17 07:09:10 [alert] 93333#93333: 4 epoll_ctl(1, 15) failed (17: File exists), client: 10.115.205.7, server: example.com, request: "POST /pma/index.php?route=/navigation&ajax_request=1 HTTP/3", host: "example.com" 2022/02/17 07:09:10 [alert] 93333#93333: 4 epoll_ctl(1, 15) failed (17: File exists), client: 10.115.205.7, server: example.com, request: "POST /pma/index.php?route=/navigation&ajax_request=1 HTTP/3", host: "example.com" 2022/02/17 07:14:57 [alert] 93461#93461: 1 epoll_ctl(1, 25) failed (17: File exists), client: 10.115.205.7, server: example.com, request: "POST /pma/index.php?route=/config/get HTTP/3", host: "example.com" 2022/02/17 07:14:57 [alert] 93461#93461: 1 epoll_ctl(1, 25) failed (17: File exists), client: 10.115.205.7, server: example.com, request: "POST /pma/index.php?route=/navigation&ajax_request=1 HTTP/3", host: "example.com" 2022/02/17 07:14:57 [alert] 93461#93461: 1 epoll_ctl(1, 25) failed (17: File exists), client: 10.115.205.7, server: example.com, request: "POST /pma/index.php?route=/config/get HTTP/3", host: "example.com" 2022/02/17 07:15:00 [alert] 93461#93461: 1 epoll_ctl(1, 25) failed (17: File exists), client: 10.115.205.7, server: example.com, request: "POST /pma/index.php?route=/navigation&ajax_request=1 HTTP/3", host: "example.com" 2022/02/17 07:15:00 [alert] 93461#93461: 1 epoll_ctl(1, 25) failed (17: File exists), client: 10.115.205.7, server: example.com, request: "POST /pma/index.php?route=/navigation&ajax_request=1 HTTP/3", host: "example.com" 2022/02/17 07:15:01 [alert] 93461#93461: 1 epoll_ctl(1, 25) failed (17: File exists), client: 10.115.205.7, server: example.com, request: "POST /pma/index.php?route=/navigation&ajax_request=1 HTTP/3", host: "example.com" 2022/02/17 07:15:03 [alert] 93461#93461: 1 epoll_ctl(1, 25) failed (17: File exists), client: 10.115.205.7, server: example.com, request: "POST /pma/index.php?route=/navigation&ajax_request=1 HTTP/3", host: "example.com" 2022/02/17 07:15:03 [alert] 93461#93461: 1 epoll_ctl(1, 25) failed (17: File exists), client: 10.115.205.7, server: example.com, request: "POST /pma/index.php?route=/navigation&ajax_request=1 HTTP/3", host: "example.com" 2022/02/17 07:15:04 [alert] 93461#93461: 1 epoll_ctl(1, 25) failed (17: File exists), client: 10.115.205.7, server: example.com, request: "POST /pma/index.php?route=/navigation&ajax_request=1 HTTP/3", host: "example.com" 2022/02/17 07:15:04 [alert] 93461#93461: 1 epoll_ctl(1, 25) failed (17: File exists), client: 10.115.205.7, server: example.com, request: "POST /pma/index.php?route=/navigation&ajax_request=1 HTTP/3", host: "example.com" 2022/02/17 07:30:33 [alert] 93456#93456: 109 epoll_ctl(1, 20) failed (17: File exists), client: 10.115.205.7, server: example.com, request: "POST /pma/index.php?route=/navigation&ajax_request=1 HTTP/3", host: "example.com" 2022/02/17 07:32:17 [alert] 93461#93461: 119 epoll_ctl(1, 25) failed (17: File exists), client: 10.115.205.7, server: example.com, request: "POST /yhtz7-https.php HTTP/3", host: "example.com", referrer: "https://example.com/yhtz7-https.php" 2022/02/17 07:32:31 [alert] 93461#93461: 119 epoll_ctl(1, 25) failed (17: File exists), client: 10.115.205.7, server: example.com, request: "POST /yhtz7-https.php HTTP/3", host: "example.com", referrer: "https://example.com/yhtz7-https.php" 2022/02/17 07:35:00 [alert] 93560#93560: 1 epoll_ctl(1, 15) failed (17: File exists), client: 10.115.205.7, server: example.com, request: "POST /yhtz7-https.php HTTP/3", host: "example.com", referrer: "https://example.com/yhtz7-https.php" 2022/02/17 07:42:32 [alert] 93724#93724: 1 epoll_ctl(1, 27) failed (17: File exists), client: 10.115.205.7, server: example.com, request: "POST /yhtz7-https.php HTTP/3", host: "example.com" 2022/02/17 07:42:39 [alert] 93724#93724: 1 epoll_ctl(1, 27) failed (17: File exists), client: 10.115.205.7, server: example.com, request: "POST /yhtz7-https.php HTTP/3", host: "example.com", referrer: "https://example.com/yhtz7-https.php" 2022/02/17 07:42:42 [alert] 93724#93724: 1 epoll_ctl(1, 27) failed (17: File exists), client: 10.115.205.7, server: example.com, request: "POST /yhtz7-https.php HTTP/3", host: "example.com", referrer: "https://example.com/yhtz7-https.php"

HTTP 500

but TLS1.3 mode is normal... i tried disable fastcgi buffer, proxy_request_buffering off; still failed.. i dont know where i do wrong..

dzvon commented 2 years ago

Please describe what you did before the log output specifically, otherwise no one can help you.

Leozaki commented 2 years ago

hi. server: nginx version: nginx/1.21.6 built by gcc 10.2.1 20210110 (Debian 10.2.1-6) built with OpenSSL 1.1.1 (compatible; BoringSSL) (running with BoringSSL) TLS SNI support enabled configure arguments: --add-module=../ngx_brotli --with-openssl=../quiche/quiche/deps/boringssl --with-quiche=../quiche --with-http_v2_module --with-http_v3_module --with-http_ssl_module --with-http_gzip_static_module --with-http_realip_module --with-threads --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-zlib=../zlib --add-module=../ngx_devel_kit --add-module=../headers-more-nginx-module --add-module=../lua-nginx-module-0.10.21rc1 --with-file-aio --add-module=../ngx_http_geoip2_module --add-module=../ngx-fancyindex --add-module=../nginx-dav-ext-module --add-module=../ngx_http_substitutions_filter_module --with-libatomic --with-http_dav_module --with-http_stub_status_module i built nginx-quiche using latest version. installed, i set up php-fpm for backend. enable QUIC and set up a test website. i put phpmyadmin, it works. but cannot login (HTTP 500), i rule out php-fpm because php-fpm don't receive this request... (only QUIC method) then i put some others php applications .. none works great under QUIC mode.... proxy_request_buffering off; not work. sry for my bad english...

lizj3624 commented 2 years ago

@Leozaki You use ngx_lua module,i gruess ngx_lua doesn't support http3 module,i have a similar situation,issue

Leozaki commented 2 years ago

@lizj3624 i rebuilt,and removed ngx_lua but not work...( i removed all about lua.. 2022/02/22 12:01:50 [alert] 196155#196155: *1 epoll_ctl(1, 15) failed (17: File exists), client: 10.113.49.205, server: .com, request: "POST /pma/index.php?route=/ HTTP/3", host: "example.com"

Nginx -V is below.. nginx version: nginx/1.21.6 built by gcc 10.2.1 20210110 (Debian 10.2.1-6) built with OpenSSL 1.1.1 (compatible; BoringSSL) (running with BoringSSL) TLS SNI support enabled configure arguments: --add-module=../ngx_brotli --with-openssl=../quiche/quiche/deps/boringssl --with-quiche=../quiche --with-http_v2_module --with-http_v3_module --with-http_ssl_module --with-http_gzip_static_module --with-http_realip_module --with-threads --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-zlib=../zlib --add-module=../ngx_devel_kit --add-module=../headers-more-nginx-module --with-file-aio --add-module=../ngx_http_geoip2_module --add-module=../ngx-fancyindex --add-module=../nginx-dav-ext-module --add-module=../ngx_http_substitutions_filter_module --with-libatomic --with-http_dav_module --with-http_stub_status_module

ghost commented 2 years ago

Same issue here, no lua module though. Sometimes the first POST request passes, but all the others always results in a 500 Internal Server Error.

2022/02/21 16:55:38 [alert] 28#28: *1 epoll_ctl(1, 37) failed (17: File exists), client:…

May be linked to #640 (see here: https://stackoverflow.com/questions/69843526/nginx-http-3-phpmyadmin-5-1-1-epoll-ctl1-16-failed-17-file-exists)

nginx version: nginx/1.21.6 (nginx-quiche) built by gcc 10.2.1 20210110 (Debian 10.2.1-6) built with OpenSSL 1.1.1 (compatible; BoringSSL) (running with BoringSSL) 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-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --build=nginx-quiche --with-http_v3_module --add-module=/tmp/brotli --with-openssl=/quiche/quiche/deps/boringssl --with-quiche=/quiche

I use a custom version of the following docker image: https://github.com/patrikjuvonen/docker-nginx-http3/