Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8335181

Incorrect handling of HTTP/2 GOAWAY frames in HttpClient

XMLWordPrintable

    • b11
    • generic
    • generic
    • Verified

        A DESCRIPTION OF THE PROBLEM :
        The setup is
        - nginx as reverse proxy with SSL and http/2
        - REST API behind nginx

        The application performs many requests to that API using HttpClient from JDK, which automatically detects http/2 via ALPN.
        nginx closes connection after 1000 requests, configurable with the keepalive_requests directive (applies for both http/1.1 persistent connections and http/2).

        If specifically configuring the client as http/1.1 then everything works.

        Also happens in java 17.

        The stacktrace is

        java.io.IOException: /172.30.30.7:51892: GOAWAY received
        at java.net.http/jdk.internal.net.http.Http2Connection.handleGoAway(Http2Connection.java:1011)
        at java.net.http/jdk.internal.net.http.Http2Connection.handleConnectionFrame(Http2Connection.java:876)
        at java.net.http/jdk.internal.net.http.Http2Connection.processFrame(Http2Connection.java:751)
        at java.net.http/jdk.internal.net.http.frame.FramesDecoder.decode(FramesDecoder.java:155)
        at java.net.http/jdk.internal.net.http.Http2Connection$FramesController.processReceivedData(Http2Connection.java:232)
        at java.net.http/jdk.internal.net.http.Http2Connection.asyncReceive(Http2Connection.java:677)
        at java.net.http/jdk.internal.net.http.Http2Connection$Http2TubeSubscriber.processQueue(Http2Connection.java:1313)

        All suggesting to either downgrade to http/1.1 or change the client.


              jpai Jaikiran Pai
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: