使用Jmeter4,Java 10 No Client ALPNProcessors导致HTTP2请求样本崩溃 [英] HTTP2 request sample crashes with Jmeter4, Java 10 No Client ALPNProcessors

查看:465
本文介绍了使用Jmeter4,Java 10 No Client ALPNProcessors导致HTTP2请求样本崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法使用Jmeter 4.0创建HTTP2请求. 我已经安装了最新的JDK和HTTP/2协议采样器插件.

I am unable to create a HTTP2 request using Jmeter 4.0. I have installed latest JDK, and HTTP/2 protocol sampler plugin.

我还观察到:"penJDK8ClientALPNProcessor @ e23ec5a不适用于Java 10.0.2" 使用Java 9进行了尝试,但我得到了同样的东西.

I have also observed that: "penJDK8ClientALPNProcessor@e23ec5a not applicable for java 10.0.2" Tried using Java 9, but I get the same thing.

PS:我已经尝试添加JVM_ARGS = ...

完整的堆栈跟踪为:

java.util.concurrent.ExecutionException: java.lang.IllegalStateException: No Client ALPNProcessors!
    at org.eclipse.jetty.util.FuturePromise.get(FuturePromise.java:138)
    at com.blazemeter.jmeter.http2.sampler.HTTP2Connection.connect(HTTP2Connection.java:65)
    at com.blazemeter.jmeter.http2.sampler.HTTP2Request.setConnection(HTTP2Request.java:247)
    at com.blazemeter.jmeter.http2.sampler.HTTP2Request.sample(HTTP2Request.java:121)
    at com.blazemeter.jmeter.http2.sampler.HTTP2Request.sample(HTTP2Request.java:107)
    at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:490)
    at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:416)
    at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:250)
    at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: No Client ALPNProcessors!
    at org.eclipse.jetty.alpn.client.ALPNClientConnectionFactory.<init>(ALPNClientConnectionFactory.java:57)
    at org.eclipse.jetty.http2.client.HTTP2Client.lambda$doStart$1(HTTP2Client.java:155)
    at org.eclipse.jetty.http2.client.HTTP2Client$ClientSelectorManager.newConnection(HTTP2Client.java:438)
    at org.eclipse.jetty.io.ManagedSelector.createEndPoint(ManagedSelector.java:222)
    at org.eclipse.jetty.io.ManagedSelector.access$1500(ManagedSelector.java:60)
    at org.eclipse.jetty.io.ManagedSelector$CreateEndPoint.run(ManagedSelector.java:825)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:754)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:672)
    ... 1 more
    Suppressed: java.lang.IllegalStateException: org.eclipse.jetty.alpn.java.client.OpenJDK8ClientALPNProcessor@e23ec5a not applicable for java 10.0.2
        at org.eclipse.jetty.alpn.java.client.OpenJDK8ClientALPNProcessor.init(OpenJDK8ClientALPNProcessor.java:41)
        at org.eclipse.jetty.alpn.client.ALPNClientConnectionFactory.<init>(ALPNClientConnectionFactory.java:77)
        ... 8 more

推荐答案

此依赖性列表对于Java 9+无效.

This list of dependencies are invalid for Java 9+.

尤其是,jetty-alpn-openjdk8-client依赖项无效,并且不适用于Java 9+. 对于Java 9+,应改为使用jetty-alpn-java-client.

In particular, the jetty-alpn-openjdk8-client dependency is invalid and not appropriate for Java 9+. For Java 9+, the jetty-alpn-java-client should be used instead.

历史记录:

在Java 8时代,需要支持HTTP/2,这需要TLS的ALPN层.

Back in the days of Java 8, there was a need to support HTTP/2, which requires the ALPN layers for TLS.

Java 8没有对ALPN的官方支持,因此Jetty项目维护了JVM -Xbootclasspath/p:<path-to-alpn-boot.jar>替换JVM中的核心SSL层,以允许使用ALPN.

Java 8 had no official support for ALPN, so the Jetty project maintained a JVM -Xbootclasspath/p:<path-to-alpn-boot.jar> replacement of the core SSL layers in the JVM to allow ALPN to be used.

这是JVM本身未提供的自定义API.

This was a custom API not provided by the JVM itself.

https://www.eclipse.org/jetty/documentation /current/alpn-chapter.html

Jetty之外的其他项目也开始使用此API.

Other projects outside of Jetty started using this API as well.

当Java 9网络讨论开始时,需要将ALPN支持纳入JVM本身.

When the Java 9 networking discussions started, there was a demand to have ALPN support be baked into the JVM itself.

openjdk的这项工作成为ALPN的官方API.

This effort at openjdk became the official API for ALPN.

此新的官方API与Jav​​a 8 API不同.

This new official API is different then the Java 8 API.

简而言之,您必须为所使用的JVM使用适当的API层.

In short, you have to use the appropriate API layer for the JVM you are using.

如果您需要支持,请在 jmeter上打开一个新主题. -plugins论坛(可以参考这个stackoverflow答案)

If you want support for this, please open a new topic on the jmeter-plugins forum (feel free to reference this stackoverflow answer)

这篇关于使用Jmeter4,Java 10 No Client ALPNProcessors导致HTTP2请求样本崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆