Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8350030 | 21.0.8-oracle | Weibing Xiao | P3 | Resolved | Fixed | master |
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.
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.
- backported by
-
JDK-8350030 Incorrect handling of HTTP/2 GOAWAY frames in HttpClient
-
- Resolved
-
- is blocked by
-
JDK-8301255 Http2Connection may send too many GOAWAY frames
-
- Resolved
-
- links to
-
Commit(master) openjdk/jdk/720b4464
-
Review(master) openjdk/jdk21u-dev/1020
-
Review(master) openjdk/jdk/20442
-
Review(master) openjdk/jdk/20567
-
Review(pr/1416) openjdk/jdk21u-dev/1417
(2 links to)