1

I'm running into a problem when sending a QUIC/HTTP3 request to my server.

My server is running nginx with QuicTLS and http3 module enabled. This is the output of my nginx -V

nginx version: NGINX-QuicTLS with ModSec/1.27.1
built by gcc 13.2.0 (Ubuntu 13.2.0-23ubuntu4)
built with OpenSSL 3.3.0+quic 30 Jan 2024
TLS SNI support enabled
configure arguments: --build= --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-threads --with-file-aio --with-libatomic --with-pcre --without-poll_module --without-select_module --with-openssl=/src/openssl --with-openssl-opt='no-ssl3 no-ssl3-method no-weak-ssl-ciphers' --with-mail=dynamic --with-mail_ssl_module --with-stream=dynamic --with-stream_ssl_module --with-stream_ssl_preread_module --with-stream_realip_module --with-http_v2_module --with-http_v3_module --with-http_ssl_module --with-http_realip_module --with-http_gunzip_module --with-http_addition_module --with-http_gzip_static_module --with-http_auth_request_module --with-debug

I'm writing a client-side program that right now is just trying to send a very basic GET request to request the / path of my server using QUIC.

The client-side library I'm using for quic is msquic and I'm using the nghttp3 library for binding the control and qpack encoding and decoding streams.

I've been unable to get a successful response from the server, every time I send a request, my server initiates a shutdown client-side and upon debugging my connection with nginx.

I'm seeing the following logs in my /var/log/nginx/error.log

2024/10/05 00:32:49 [debug] 800#800: *3 http3 send settings
2024/10/05 00:32:49 [debug] 800#800: *3 quic too many server uni streams:0
2024/10/05 00:32:49 [error] 800#800: *3 failed to create server stream while handling frames, client: 174.108.244.188, server: 0.0.0.0:443
2024/10/05 00:32:49 [debug] 800#800: *3 post event 0000634AA9045F68
2024/10/05 00:32:49 [debug] 800#800: *3 quic packet done rc:-1 level:hs decr:1 pn:2 perr:0
2024/10/05 00:32:49 [debug] 800#800: *3 quic close initiated rc:-1
2024/10/05 00:32:49 [debug] 800#800: *3 event timer del: 6: 104359
2024/10/05 00:32:49 [debug] 800#800: *3 quic close immediate term:1 drain:0 app error:259 "failed to create server stream"
2024/10/05 00:32:49 [debug] 800#800: *3 quic sendto app packet max:1200 min:0
2024/10/05 00:32:49 [debug] 800#800: *3 quic frame tx app:0 CONNECTION_CLOSE_APP err:259 failed to create server stream

So it seems like my server doesn't have any remaining unidirectional streams available...

This is my nginx.conf

user  nginx;
worker_processes  auto;

error_log  /var/log/nginx/error.log debug;
pid        /var/run/nginx.pid;

quic_bpf on;

events {
    worker_connections  1024;
    debug_connection 174.108.244.188;
}


http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    log_format quic '$remote_addr - $remote_user [$time_local] '
                    '"$request" $status $body_bytes_sent '
                    '"$http_referer" "$http_user_agent" "$http3"';

    access_log /var/log/nginx/access.log quic;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;


    http3 on;
    http3_hq off;
    http3_max_concurrent_streams 1024;
    http3_stream_buffer_size 64k;
    quic_active_connection_id_limit 128;
    quic_retry off;
    ssl_early_data on;
    quic_gso on;


    include /etc/nginx/conf.d/*.conf;
}

According to the http3 module documentation:

http3_max_concurrent_streams sets the maximum number of concurrent streams, but it doesn't seem to determine if its bidirectional or unidirectional streams.

https://nginx.org/en/docs/http/ngx_http_v3_module.html

I don't see any other way to set this up. I'm looking at the source code: https://github.com/nginx/nginx/blob/e24f7ccc161f1a2a759eb27263ec9af4fc7c8e96/src/event/quic/ngx_event_quic_streams.c#L83C20-L83C50

and it looks like it's comparing against this variable: streams.server_max_streams_uni

but even If I write that in the configuration, nothing different happens, my server still gets me 0 unidirectional streams.

I'm at a loss, and I'm not sure what else I should be doing here.

1

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.