Jmeter HTTP2 plug-in

1,592 views
Skip to first unread message

subbu...@gmail.com

unread,
Apr 19, 2018, 5:55:36 AM4/19/18
to jmeter-plugins
Hi
I have installed Jmeter 4.0 with HTTP2 plugin for testing one of my clients website which was built on http2 protocol.

The HTTP2 request sampler works fine for GET request but throwing a null pointer exception in response when I do a POST request. I could see in View results tree HTTP2 that the body doesn’t have any parameters getting passed during the run is this a bug ?

Also the same happens with GET request when using Send parameters with Request field.

subbu...@gmail.com

unread,
Apr 23, 2018, 7:35:11 PM4/23/18
to jmeter-plugins
Hi,
Can anyone please let me know if we have a solution for the below issue ?

Thanks
Subbu

gar...@gmail.com

unread,
May 10, 2018, 11:21:30 PM5/10/18
to jmeter-plugins
If you are using Jmeter plugin manager to install HTTP 2 Sampler it has too old jetty dependencies (dated Dec, 2016) Updating to the last version with adding jetty jdk8 libraries can solve your issue.

Steps to resolve:

1. Open jmeter and install HTTP2 Sampler with jmeter plugin manager
2. Go to jmeter/lib and delete all jars that start with `jetty-` and `http2-`
3. Copy last versions of jetty jars from the list below to  jmeter/lib:

- http2-client-9.4.10.v20180503.jar
- http2-common-9.4.10.v20180503.jar
- http2-hpack-9.4.10.v20180503.jar
- jetty-alpn-client-9.4.10.v20180503.jar
- jetty-alpn-conscrypt-client-9.4.10.v20180503.jar
- jetty-alpn-java-client-9.4.10.v20180503.jar
- jetty-alpn-openjdk8-client-9.4.10.v20180503.jar
- jetty-client-9.4.10.v20180503.jar
- jetty-http-9.4.10.v20180503.jar
- jetty-io-9.4.10.v20180503.jar
- jetty-osgi-alpn-9.4.10.v20180503.jar
- jetty-util-9.4.10.v20180503.jar

4. Download alpn-boot according to your JVM version https://www.eclipse.org/jetty/documentation/9.4.x/alpn-chapter.html
5. Go to jmeter/bin and open file:
  - MacOS: `jmeter.sh`
  - Windows: `jmeter.bat`
6. Put `set JVM_ARGS= -Xbootclasspath/p:<YOUR_PATH_TO_ALPN_JAR>` at the start of the file and save changes
7. Run jmeter with `jmeter.sh` on MacOS  or `jmeter.bat` on Windows

subbu...@gmail.com

unread,
May 11, 2018, 12:23:57 AM5/11/18
to jmeter-plugins
Hi,

Thanks. Tried the steps below but still getting Null pointer exception error for POST http2 request. Below are the details. 

java.lang.NullPointerException
at com.blazemeter.jmeter.http2.sampler.HTTP2Request.saveConnectionCookies(HTTP2Request.java:506)
at com.blazemeter.jmeter.http2.sampler.HTTP2Request.sample(HTTP2Request.java:195)
at com.blazemeter.jmeter.http2.sampler.HTTP2Request.sample(HTTP2Request.java:119)
at com.blazemeter.jmeter.http2.sampler.HTTP2Request.sample(HTTP2Request.java:105)
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.lang.Thread.run(Unknown Source)

note - HTTP2 GET request is working as expected

The only change what i could see from last time after upgrading the latest jetty and http2 jars is that i am able to see some post data getting sent as part of the request earlier it used to be blank. 

But the post data sent now is not the expected data "POST data: DataFrame@52173844#25{length:0,end=true}"

Expected post data should be something like this " os_username=xxxxx&os_password=yyyyy&login=Log+in&os_destination="


Based on the error message above i disabled the cookie manager and reran the POST request which throwed me the below timeout error

java.util.concurrent.TimeoutException
at java.util.concurrent.CompletableFuture.timedGet(Unknown Source)
at java.util.concurrent.CompletableFuture.get(Unknown Source)
at com.blazemeter.jmeter.http2.sampler.HTTP2Connection.awaitResponses(HTTP2Connection.java:169)
at com.blazemeter.jmeter.http2.sampler.HTTP2Request.sample(HTTP2Request.java:188)
at com.blazemeter.jmeter.http2.sampler.HTTP2Request.sample(HTTP2Request.java:119)
at com.blazemeter.jmeter.http2.sampler.HTTP2Request.sample(HTTP2Request.java:105)
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.lang.Thread.run(Unknown Source)

Please assist. Let me know if you require any further details. 

Thanks once again,
Subbu
Message has been deleted

yasararu...@cse.mrt.ac.lk

unread,
May 12, 2018, 12:27:35 AM5/12/18
to jmeter-plugins

Hi,

Can you please tell me how to do step 6???  (Put `set JVM_ARGS= -Xbootclasspath/p:<YOUR_PATH_TO_ALPN_JAR>` at the start of the file and save changes)
where I need to set the path??? 

subbu...@gmail.com

unread,
May 14, 2018, 1:02:04 AM5/14/18
to jmeter-plugins
Hi,

Put the below as your first line in Jmeter.sh (Mac) or Jmeter.bat(windows)

set JVM_ARGS= -Xbootclasspath/p:C:\xxxxx\xxxxxx\alpn-boot-8.1.12.v20180117.jar (jar varies based on the version of your jvm)

Check for the version of the ALPN from the following link https://www.eclipse.org/jetty/documentation/9.4.x/alpn-chapter.html

Thanks
Subbu

ragh...@gmail.com

unread,
May 17, 2018, 5:34:32 AM5/17/18
to jmeter-plugins
Hi Subbu,

Did you got the resolution for HTTP 2 POST requests.

subbu...@gmail.com

unread,
May 17, 2018, 7:23:20 PM5/17/18
to jmeter-plugins
Nope its still not working. 

gar...@gmail.com

unread,
May 21, 2018, 8:21:49 PM5/21/18
to jmeter-plugins
Please, check new version of the plugin tomorrow. BZ team planning to release new version with the fix for this issue. Install it using plugin manager.

subbu...@gmail.com

unread,
May 21, 2018, 8:33:58 PM5/21/18
to jmeter-plugins
Thanks.
Reply all
Reply to author
Forward
0 new messages