Open JDK 11 HTTP/2 Handshake ServerHello java.util.NoSuchElementException

淺唱寂寞╮ 提交于 2020-06-25 09:29:07

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!