Shan
Shan

Reputation: 2832

Apache JMeter - SSL Handshake error

Couple of performance scripts are failing because of the SSL Handshake error and the error message we get is

Response code: Non HTTP response code:javax.net.ssl.SSLHandshakeException
Response message: Non HTTP response message : Received fatal alert handshake failure 

What are the reasons for it?

UPDATE:
I ran this test from two machines

On one machine it got passed On another machine it got failed due to handshake problem

And this issue occurs when HSTS is set to true in the certificate!

Upvotes: 0

Views: 3075

Answers (1)

Dmitri T
Dmitri T

Reputation: 168197

If you have one machine where everything works fine and another one where you see errors the most straightforward solution would be just copying over JMeter from the "good" machine to the "bad" one.

If it doesn't help - do the same for your JRE (or JDK)

You can also try getting to the bottom of the issue and identify the root cause. The first thing you should do is to check jmeter.log file for any suspicious entries. If there is nothing connected with the error there - increase log verbosity by uncommenting the next lines in log4j2.xml file (lives in JMeter's "bin" folder):

<Logger name="org.apache.jmeter.util.HttpSSLProtocolSocketFactory" level="debug" />
<Logger name="org.apache.jmeter.util.JsseSSLManager" level="debug" />

See How to Configure JMeter Logging article to learn more about troubleshooting JMeter issues via log files manipulation.

Don't forget to revert the changes once you determine and fix your problem as excessive logging causes massive disk IO and might ruin your test.

Upvotes: 1

Related Questions