jmeter4和java10,使用Jmeter4,Java 10 No Client ALPNProcessors导致HTTP2请求样本崩溃

I am unable to create a HTTP2 request using Jmeter 4.0.

I have installed latest JDK, and HTTP/2 protocol sampler plugin.

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: I already tried adding the JVM_ARGS=...

Complete stack-trace is:

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.(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.(ALPNClientConnectionFactory.java:77)

... 8 more

解决方案

The default installation of the HTTP/2 Sampler uses the dependencies ...

Install library: http2-client

Install library: jetty-alpn-openjdk8-client

Install library: jetty-alpn-client

Install library: http2-common

Install library: http2-hpack

Install library: jetty-io

Install library: jetty-http

Install library: jetty-util

Install plugin: bzm-http2 1.2

This list of dependencies are invalid for Java 9+.

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.

History:

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

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

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

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

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

This effort at openjdk became the official API for ALPN.

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

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

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值