I have java 1.8.0_151 installed and JMeter 5.1. Trying to send HTTP2 request getting the following error:
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:69)
at com.blazemeter.jmeter.http2.sampler.HTTP2Request.setConnection(HTTP2Request.java:280)
at com.blazemeter.jmeter.http2.sampler.HTTP2Request.sample(HTTP2Request.java:140)
at com.blazemeter.jmeter.http2.sampler.HTTP2Request.sample(HTTP2Request.java:117)
at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:622)
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:546)
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:486)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:253)
at 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.ALPN must be on JVM boot classpath
at org.eclipse.jetty.alpn.java.client.OpenJDK8ClientALPNProcessor.init(OpenJDK8ClientALPNProcessor.java:43)
at org.eclipse.jetty.alpn.client.ALPNClientConnectionFactory.<init>(ALPNClientConnectionFactory.java:77)
... 8 more
I have downloaded alpn-boot-8.1.11.v20170118.jar (according to my java version) to jmeter\lib folder and added the following record to jmeter.bat: set JVM_ARGS="-Xbootclasspath/p:D:\apache-jmeter-5.1\apache-jmeter-5.1\lib\alpn-boot-8.1.11.v20170118.jar;". HTTP2 request still cannot be sent properly. What I missed? Thank you in advance 😊
Your steps look good, I can only think of 2 reasons for the HTTP2 Sampler not working:
Wrong path to the alpn-boot library, you can check it using dir command like:
dir d:\apache-jmeter-5.1\apache-jmeter-5.1\lib\alpn-boot-8.1.11.v20170118.jar
you should see something like:
Check the Java version JMeter is using as it might pick up not the 1.8.0_151, but the one which comes first in PATH. In order to ensure that JMeter is using the correct Java runtime you can explicitly declare it in jmeter.bat file:
set PATH=d:\java\bin;%PATH%
And finally you can use JSR223 Sampler to print Java version and effective Java arguments, the relevant code would be something like:
log.info('Java version: ' + System.getProperty('java.version'))
java.lang.management.ManagementFactory.getRuntimeMXBean().getInputArguments().each {
log.info("Effective JVM argument: " + "$it")
}
If the above checklist items are applied you should be able to normally execute HTTP2 requests:
Also be aware that according to 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure you should always be using the latest version of JMeter so consider upgrading to JMeter 5.2 (or whatever is the latest stable version available at JMeter Downloads page) as soon as possible.
Check this thread also:
HTTP2 request sample crashes with Jmeter4, Java 10 No Client ALPNProcessors .
It says here: 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.
Related
I am testing the Quarkus capabilities for Travel Applications and I found a weird behaviour when I try to establish an URLConnection running in a GraalVM application
based on Quarkus. If I run a Native application:
./target/getting-started-1.0.0-SNAPSHOT-runner
and I Call the REST endpoint:
curl 'http://localhost:8080/api/v1/covid-restrictions'
then I receive the following error:
2022-06-01 17:38:43,844 ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (executor-thread-0) HTTP Request to /api/v1/covid-restrictions failed, error id: f6130b71-c9fb-4a67-a996-c58fba695117-1: com.amadeus.exceptions.NetworkException: [---]
But when I run the same application as a Jar, everything is fine.
java -jar target/quarkus-app/quarkus-run.jar
One example to see the error here:
https://github.com/jabrena/quarkus-amadeus-sdk-demo
Do I need to configure the Quarkus app in some way for GraalVM?
I share the whole StackTrace if it could help:
2022-06-01 17:38:43,844 ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (executor-thread-0) HTTP Request to /api/v1/covid-restrictions failed, error id: f6130b71-c9fb-4a67-a996-c58fba695117-1: com.amadeus.exceptions.NetworkException: [---]
at com.amadeus.HTTPClient.fetch(HTTPClient.java:372)
at com.amadeus.HTTPClient.execute(HTTPClient.java:358)
at com.amadeus.HTTPClient.unauthenticatedRequest(HTTPClient.java:253)
at com.amadeus.client.AccessToken.fetchAccessToken(AccessToken.java:67)
at com.amadeus.client.AccessToken.updateAccessToken(AccessToken.java:53)
at com.amadeus.client.AccessToken.lazyUpdateAccessToken(AccessToken.java:47)
at com.amadeus.client.AccessToken.getBearerToken(AccessToken.java:39)
at com.amadeus.HTTPClient.request(HTTPClient.java:339)
at com.amadeus.HTTPClient.get(HTTPClient.java:67)
at com.amadeus.dutyOfCare.diseases.Covid19AreaReport.get(Covid19AreaReport.java:51)
at org.acme.CovidResource.hello(CovidResource.java:27)
at org.acme.CovidResource$quarkusrestinvoker$hello_a2fbfead069e804ef1bb0315d16c4dc5e7951978.invoke(Unknown Source)
at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)
at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:7)
at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:141)
at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:548)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:833)
at com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:704)
at com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine(PosixPlatformThreads.java:202)
Many thanks in advance.
Juan Antonio
As most APIs nowadays are, the Amadeus library is HTTPS only.
For Quarkus in native mode, you need to explicitly enable SSL in src/main/resources/application.properties (except for certain extensions, see the link below).
quarkus.ssl.native=true
See https://quarkus.io/guides/native-and-ssl
After adding this property you will get a different runtime error:
2022-06-02 00:45:25,381 ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (executor-thread-0) HTTP Request to /api/v1/covid-restrictions failed, error id: 6d821ce1-23fd-4d88-8f63-992b6453830a-1: com.oracle.svm.core.jdk.UnsupportedFeatureError: Code that was considered unreachable by closed-world analysis was reached.
Try to register the following reflection classes (DiseaseAreaReport and all inner classes) as Amadeus will use GSON and therefore also Java reflection to apply the JSON String data to the DiseaseAreaReport POJO.
https://quarkus.io/guides/writing-native-applications-tips#registering-for-reflection
package org.acme;
import io.quarkus.runtime.annotations.RegisterForReflection;
#RegisterForReflection(targets = {
com.amadeus.Amadeus.class,
com.amadeus.HTTPClient.class,
com.amadeus.Params.class,
com.amadeus.Response.class,
com.amadeus.client.AccessToken.class,
com.amadeus.dutyOfCare.diseases.Covid19AreaReport.class,
com.amadeus.exceptions.ResponseException.class,
// com.amadeus.resources.DiseaseAreaReport and all inner classes
com.amadeus.resources.DiseaseAreaReport.class,
com.amadeus.resources.DiseaseAreaReport.Area.class,
com.amadeus.resources.DiseaseAreaReport.AreaAccessRestriction.class,
com.amadeus.resources.DiseaseAreaReport.AreaPolicy.class,
com.amadeus.resources.DiseaseAreaReport.AreaRestriction.class,
com.amadeus.resources.DiseaseAreaReport.AreaVaccinated.class,
com.amadeus.resources.DiseaseAreaReport.Border.class,
com.amadeus.resources.DiseaseAreaReport.DatedInformation.class,
com.amadeus.resources.DiseaseAreaReport.DatedQuarantineRestriction.class,
com.amadeus.resources.DiseaseAreaReport.DatedTracingApplicationRestriction.class,
com.amadeus.resources.DiseaseAreaReport.DeclarationDocuments.class,
com.amadeus.resources.DiseaseAreaReport.DiseaseCase.class,
com.amadeus.resources.DiseaseAreaReport.DiseaseInfection.class,
com.amadeus.resources.DiseaseAreaReport.DiseaseTestingRestriction.class,
com.amadeus.resources.DiseaseAreaReport.DiseaseVaccination.class,
com.amadeus.resources.DiseaseAreaReport.EntryRestriction.class,
com.amadeus.resources.DiseaseAreaReport.ExitRestriction.class,
com.amadeus.resources.DiseaseAreaReport.GeoCode.class,
com.amadeus.resources.DiseaseAreaReport.Link.class,
com.amadeus.resources.DiseaseAreaReport.MaskRestriction.class,
com.amadeus.resources.DiseaseAreaReport.Sources.class,
com.amadeus.resources.DiseaseAreaReport.Transportation.class,
com.amadeus.resources.DiseaseAreaReport.ValidityPeriod.class,
com.amadeus.resources.Resource.class
})
public class AmadeusReflection {
}
I hope this fixes this issue, if not dig deeper which classes or inner classes are missing to be registered for reflection with a debugger or following the stack trace.
P.S. your test shows the following warnings:
[WARNING] [io.quarkus.resteasy.reactive.server.deployment.QuarkusServerEndpointIndexer] Quarkus detected the use of JSON in JAX-RS method 'org.acme.CovidResource#hello' but no JSON extension has been added. Consider adding 'quarkus-resteasy-reactive-jackson' or 'quarkus-resteasy-reactive-jsonb'.
[WARNING] [io.quarkus.resteasy.reactive.server.deployment.QuarkusServerEndpointIndexer] Quarkus detected the use of JSON in JAX-RS method 'org.acme.ConfigResource#hello' but no JSON extension has been added. Consider adding 'quarkus-resteasy-reactive-jackson' or 'quarkus-resteasy-reactive-jsonb'.
Consider to add the RESTEasy Reactive Jackson extension in the pom.xml:
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-reactive-jackson</artifactId>
</dependency>
I am using jmeter 5.2.1 and I have downloaded the compatible version of ALPN boot and using the http2 view results listener. But still getting below error. Can someone please help.
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:69)
at com.blazemeter.jmeter.http2.sampler.HTTP2Request.setConnection(HTTP2Request.java:280)
at com.blazemeter.jmeter.http2.sampler.HTTP2Request.sample(HTTP2Request.java:140)
at com.blazemeter.jmeter.http2.sampler.HTTP2Request.sample(HTTP2Request.java:117)
at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:627)
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:551)
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:490)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)
at java.lang.Thread.run(Unknown Source)
Most probably you missed the important bit of the HTTP2 Plugin installation instructions:
2- On Windows at the start of jmeter.bat add the next line: set JVM_ARGS= -Xbootclasspath/p:<path.to.jar>;
On Linux and Mac at the start of jmeter.sh add the next line (see Notes JMeter for macOS section at the bottom as well): JVM_ARGS="-Xbootclasspath/p:<path.to.jar>"\
3- Restart JMeter
For example my Java version is 1.8.0_202 hence I need alpn-boot-8.1.13.v20181017.jar and the first 3 lines of my jmeter.bat file look like:
#echo off
set JVM_ARGS= -Xbootclasspath/p:c:\apps\jmeter\lib\alpn-boot-8.1.13.v20181017.jar
rem Licensed to the Apache Software Foundation (ASF) under one or more
And HTTP2 plugin is fully functional:
You might also be interested in HTTP/2 - How to get ready for the future article which highlights the main features of the HTTP2 protocol which you should be aware of when it comes to performance testing.
Whenever I run JMeter at the Windows command line, I get this error message. Everything runs fine, but the error message is distracting. Can I do something to get rid of it? I'm using JMeter 5.1.1 r1855137.
2019-10-07 09:12:39,625 main ERROR Unable to invoke factory method in class org.jmeterplugins.repository.logging.LoggerAppender for element Logger: java.lang.IllegalStateException: No factory method found for class org.jmeterplugins.repository.logging.LoggerAppender java.lang.IllegalStateException: No factory method found for class org.jmeterplugins.repository.logging.LoggerAppender
at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.findFactoryMethod(PluginBuilder.java:235)
at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:135)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:959)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:899)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:891)
at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:514)
at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:238)
at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:250)
at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:547)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:619)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:636)
at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:231)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:153)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194)
at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:121)
at org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:43)
at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:46)
at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:29)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:358)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)
at org.apache.jmeter.JMeter.<clinit>(JMeter.java:124)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.apache.jmeter.NewDriver.main(NewDriver.java:251)
Most probably you're experiencing the consequence of JMeter enhancement 60589 which was introduced in JMeter 3.2, it seems that you have an outdated version of the JMeter Plugins Manager somewhere in JMeter Classpath.
Remove previous version(s) of the JMeter Plugins Manager from "lib/ext" folder of your JMeter installation (same for the plugins, if any). A better idea would be getting a "clean" copy of JMeter from JMeter Downloads page)
Obtain a new version of the JMeter Plugins Manager and drop it to /lib/ext folder of your JMeter installation
Restart JMeter - at this stage you should not see any logging-related errors
Install the plugins you need using the Plugins Manager.
I placed plugin manager in "lib\ext" folder and tried to open it showed error:
java.io.IOException: Repository responded with wrong status code: 407
Jmeter version - 3.3
Plugin version - 0.16
Jmeter is invoked from command line by using the following parameters:
C:\Users\princen\Performance Testing\Software\apache-jmeter-3.3\bin\jmeter.bat -H Proxyserver -P 1234 -u princen -a ***
Parameters modified as suggested here
JVM_ARGS="-Dhttps.proxyHost=Proxyserver -Dhttps.proxyPort=1234 -Dhttp.proxyUser=princen -Dhttp.proxyPass=***" C:\Users\princen\Performance Testing\Software\apache-jmeter-3.3\bin\jmeter.bat
Above try gives the following error message
Windows cannot find "JVM_ARGS="-Dhttps.proxyHost=Proxyserver -Dhttps.proxyPort=1234 -Dhttp.proxyUser=princen -Dhttp.proxyPass=***
When I tried to changes command to the following:
C:\Users\princen\Performance Testing\Software\apache-jmeter-3.3\bin\jmeter.bat -Dhttps.proxyHost=Proxyserver -Dhttps.proxyPort=1234 -Dhttp.proxyUser=princen -Dhttp.proxyPass=***
I received an error:
java.io.IOException: Repository responded with wrong status code: 407
Can someone please correct parameters required to load the plugin manager?
Ensure you use last version of jmeter-plugins download manager.
Regarding your parameters, you're mixing different configurations, just set (for both http and https):
JVM_ARGS="-Dhttps.proxyHost=myproxy.com -Dhttps.proxyPort=8080 -Dhttps.proxyUser=john -Dhttps.proxyPass=password -Dhttp.proxyHost=myproxy.com -Dhttp.proxyPort=8080 -Dhttp.proxyUser=john -Dhttp.proxyPass=password"
Where password is your real password.
None of above methods working for me. Its really tough to work with Java(due to Loadrunner background). I added Ultimate thread alone and its working fine.
Thank you all for your inputs..
JMeter is using the official proxy configuration from Oracle (like here: https://memorynotfound.com/configure-http-proxy-settings-java/)
The problem is that the jmeter documentation is wrong about the password parameter: it should be http.proxyPassword not http.proxyPass.
Also you must use the https. properties for secured urls you want to access using the proxy. And the http. properties for non secured.
We are currently using the 2.0.0-M06 snapshot version of the neo4j jdbc driver and are trying to use the latest version available. We found the 2.1.4 version on the maven repository below,
https://m2.neo4j.org/content/repositories/releases/org/neo4j/neo4j-jdbc/
However, while trying to use this we see the below error..
Caused by: java.lang.IllegalStateException: Error during parsing
at org.neo4j.jdbc.rest.StreamingParser$ParserState.nextToken(StreamingParser.java:71)
at org.neo4j.jdbc.rest.StreamingParser.skipTo(StreamingParser.java:313)
at org.neo4j.jdbc.rest.StreamingParser.nextResult(StreamingParser.java:130)
at org.neo4j.jdbc.rest.StreamingParser$2.hasNext(StreamingParser.java:265)
at org.neo4j.jdbc.rest.StreamingParser$2$1.endReached(StreamingParser.java:269)
at org.neo4j.jdbc.rest.StreamingParser$1.hasNext(StreamingParser.java:201)
at org.neo4j.jdbc.IteratorResultSet.hasNext(IteratorResultSet.java:98)
at org.neo4j.jdbc.IteratorResultSet.next(IteratorResultSet.java:63)
at com.mchange.v2.c3p0.impl.NewProxyResultSet.next(NewProxyResultSet.java:2859)
... 92 more
Caused by: java.io.IOException: Stream closed
at sun.nio.cs.StreamDecoder.ensureOpen(StreamDecoder.java:46)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:148)
at java.io.InputStreamReader.read(InputStreamReader.java:184)
at org.codehaus.jackson.impl.ReaderBasedParser.loadMore(ReaderBasedParser.java:117)
at org.codehaus.jackson.impl.ReaderBasedParser._skipWSOrEnd(ReaderBasedParser.java:1476)
at org.codehaus.jackson.impl.ReaderBasedParser.nextToken(ReaderBasedParser.java:368)
at org.neo4j.jdbc.rest.StreamingParser$ParserState.nextToken(StreamingParser.java:67)
... 100 more
We found a reference that this is addressed in the 2.2 version of the driver and are therefore trying to download that. Can someone please point us in the right direction in getting this 2.2 binary for the neo4j-jdbc driver? Also, we currently use the neo4j 2.2 version for our db server.
Thx,
NN
I think version 2.2 is not released yet.
You can try to build your own binaries from the source code - https://github.com/neo4j-contrib/neo4j-jdbc