-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Http2 plugin not always switch to h2 protocol #67
Comments
Hey @syampol13 i can't reproduce this issue from my end. Do you know of any public server that presents the issue that i can use to debug this? You could enable java network logs to get more info on why it is going to http1. To enable this you can run jmeter with Let me know if you find anything or can provide more details into the issue. |
Hi @diego-ferrand Tried to reproduce this with javax.net.debug but this didn't help me much. Logs are attached. Please take a look, maybe you will see smth interesting. http2_dbg.zip From my pov it sounds weird that there is a application_layer_protocol_negotiation in a ClientHello and then I can see Ignore unsupported extension: application_layer_protocol_negotiation. (there are also other unsupported extension, however I'm not familiar with such details so can't tell whether this is expected or not)
Same request works via HTTP2. |
Hi @syampol13 Looking at the jmeter log we can see that in the ALPN negotiation, when it is detected that it does not have ALPN, it decides to go for HTTP/1.1 2024-06-09 20:10:17,760 DEBUG o.e.j.c.d.HttpClientTransportDynamic: No ALPN protocol, using HTTP11@28c91ad9[http/1.1] If the server does not have TLS/ALPN then it is not following the current RFC standard for HTTP2. There are tools that provide information about the level of HTTP2 support on a server. There are tools that allow you to directly use the protocol without involving negotiation. Probably K6 setting with prior knowledge the http2 and not use ALPN (also I remember LoadRunner do the same change ALPN for a specific protocol). We plan to incorporate in the future that it is possible to force protocol without using negotiation (like in the past for legacy servers). You can try version v2.0.2 or v2.0.1 of the plugin, those versions did not yet have standard-aligned support with TLS/ALPN incorporated, forcing HTTP2 or HTTP1 Upgrade without using ALPN. Tell us if that version works with you problematic server |
Hi @3dgiordano |
@syampol13 Great, perfect. Thanks for the information provided. |
@3dgiordano one more note - 2.0 works but on Jmeter 5.5 Also, for 2.0.4 & 2.0.5 - on those versions not all requests are working via http1.1. Odds are http1.1 and even are http2.0 |
Hi @syampol13 You cannot use any version of JMeter 5.6 in the version prior to 2.0.4 where we added support for JMeter 5.6.x, We will try to raise the priority of this need to be able to specify that ALPN not be used in our latest version, in order to resolve this difficulty that some are having. |
Hi @3dgiordano curl:
openssl:
http2 plugin:
Attaching curl, openssl and java.net logs - http2_debugging.zip |
Hi @syampol13 Try to see from the server logs side if there is any evidence why in the negotiation, the server decides to go for http 1.1 The implementation of SSL and its negotiation in Java may be different from that implemented in cURL and some different step in the negotiation may lead to different results. When the client does not directly indicate the negotiation, it directly uses h2 and the server accepts it directly. |
Hi @3dgiordano |
Jmeter: 5.6.2
http plugin: 2.0.5
I have an internally available service under test. Service located behind the F5 and configured to support both http1/1 & http2.
Tried access it via Jmeter using bzm http2 plugin and faced with an issue where chosen during negotiation protocol appear http1/1 while http2 expected.
Debug logs shows:
Test plan & jmeter.log attached. Endpoint is not available externally so the TP is just to see the request being made.
Test plan also contains publicly available endpoint for different but still http2 service - bzm - HTTP2 Sampler galerabet.
This one just for comparison as this sample does work as expected. It communicates over http2 and negotiation completed with:
Now regarding the original internal service (problematic one) - I've tried to execute exactly the same request (same endpoint, type, headers, body) via K6 and it was done via http2. Protocol check shows that used protocol was http2 and the response starts with 'HTTP/2.0 200 OK'. Tested service also captured incoming request as a http2 one. This all to make sure tested service does support http2 and does work with it
The text was updated successfully, but these errors were encountered: