问题
When testing the Open JDK 11 HTTP client over HTTP/2, there is a server-side error which looks like a JDK 11 bug.
The test runs several threads against a Tomcat 9 server, testing that all threads use HTTP/2 and TLS1.3.
The concern is that the error is inside the 'sun.security.ssl.SSLHandshake.produce', which means it is not Tomcat, but the JDK causing the error.
Can anyone confirm that you have had the same experience when load testing the HTTP layer of JDK 11? If so, I will reported to the Open JDK team.
The error is only evident when running a load test:
java.util.NoSuchElementException: No value present
at java.base/java.util.Optional.get(Optional.java:148) ~[na:na]
at java.base/sun.security.ssl.ServerHello$T13ServerHelloProducer.produce(ServerHello.java:551) ~[na:na]
at java.base/sun.security.ssl.SSLHandshake.produce(SSLHandshake.java:436) ~[na:na]
at java.base/sun.security.ssl.ClientHello$T13ClientHelloConsumer.goServerHello(ClientHello.java:1224) ~[na:na]
at java.base/sun.security.ssl.ClientHello$T13ClientHelloConsumer.consume(ClientHello.java:1160) ~[na:na]
at java.base/sun.security.ssl.ClientHello$ClientHelloConsumer.onClientHello(ClientHello.java:849) ~[na:na]
at java.base/sun.security.ssl.ClientHello$ClientHelloConsumer.consume(ClientHello.java:810) ~[na:na]
at java.base/sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392) ~[na:na] ...
This github project was used for testing. See the project readme for more details.
来源:https://stackoverflow.com/questions/54636285/open-jdk-11-http-2-handshake-serverhello-java-util-nosuchelementexception