ptrd / flupke

Java HTTP3 Client and HTTP3 Server plugin for Kwik
GNU General Public License v3.0
12 stars 5 forks source link

Quic connection with nginx.org fails #12

Open zhkl0228 opened 1 week ago

zhkl0228 commented 1 week ago
public void testFlupke() throws Exception {
        URI serverUrl = URI.create("https://quic.nginx.org/test");
        HttpRequest request = HttpRequest.newBuilder()
                .uri(serverUrl)
                .timeout(Duration.ofSeconds(30))
                .build();

        HttpClient client = Http3Client.newBuilder()
                .logger(new SysOutLogger())
                .connectTimeout(Duration.ofSeconds(30))
                .build();
        HttpResponse<String> httpResponse = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(httpResponse.body());
    }
ptrd commented 1 week ago

Hi, Thanks for your interest in Flupke. It would help me a lot if you would describe what the problem is. I now feel like you are giving me a puzzle. I'm not in to puzzles. I like to help you but i would also like to spend as little time on it as needed, so I can spend my valuable time on creating new features. Please help me in helping you. I'm, after all, a human being, you can just talk to me ;-)

zhkl0228 commented 1 week ago

I apologize for my poor English, the above test run will fail

ptrd commented 1 week ago

Your English is ok, don't worry, i'm not a native speaker myself.

It fails with an exception I guess? Can you show the stacktrace?

zhkl0228 commented 1 week ago

53:26.393 Error: Inconsistency error in congestion controller; attempt to set bytes in-flight below 0 53:26.402 Error: Discarding packet (74 bytes) that cannot be decrypted (net.luminis.quic.crypto.MissingKeysException: Missing keys for encryption level Handshake (keys not installed))

java.net.ConnectException: Handshake error: Server closed connection: TLS error 40: handshake failed

at net.luminis.quic.core.QuicClientConnectionImpl.connect(QuicClientConnectionImpl.java:373)
at net.luminis.quic.core.QuicClientConnectionImpl.connect(QuicClientConnectionImpl.java:322)
at net.luminis.http3.impl.Http3ClientConnectionImpl.connect(Http3ClientConnectionImpl.java:92)
at net.luminis.http3.Http3Client.send(Http3Client.java:134)
zhkl0228 commented 1 week ago

flupke-0.5.3

ptrd commented 1 week ago

I reproduced the problem and from the Wireshark capture I can see that nginx immediately sends a "connection close". I have no clue why, asked the nginx people for help.