We are running a JMeter script which posts json data to an internal https endpoint. But we get javax.net.ssl.SSLHandshakeException intermittently (around 3 times out of 100 calls) while running the script.
This issue is very similar to following SO question but all of the solutions discussed there don't work for me: javax.net.ssl.SSLHandshakeException: handshake_failure when using JMeter with SSL (JDK8)
I am using JDK8 and latest JMeter version 4.0. I turned on ssl debugging and from ClientHello and ServerHello messages, it looks like the server supports TLS 1.2 and TLS_RSA_WITH_AES_128_CBC_SHA cipher suite which is supported by JMeter as well.
But I see following in SSL logs for failed JMeter requests:
WRITE: TLSv1.2 Handshake, length = 64
READ: TLSv1.2 Alert, length = 2
RECV TLSv1.2 ALERT: fatal, handshake_failure
%% Invalidated: [Session-17, TLS_RSA_WITH_AES_128_CBC_SHA]
I have tried following solutions:
1. Added server cert to jre cacerts
2. Downloaded local policy jars for unsupported ciphers and copied them to jre lib security folder
3. Update httpclient jar (4.5) for JMeter
4. Explicitly enabled TLS 1.2 in JMeter configuration
I used TestSSLServer to test SSL capability of our server and this is what it returns:
SSLv3:
server selection: enforce server preferences
3-- (key: RSA) RSA_WITH_RC4_128_SHA
3-- (key: RSA) RSA_WITH_AES_128_CBC_SHA
3-- (key: RSA) RSA_WITH_AES_256_CBC_SHA
3-- (key: RSA) RSA_WITH_3DES_EDE_CBC_SHA
TLSv1.0: idem
TLSv1.2:
server selection: enforce server preferences
3-- (key: RSA) RSA_WITH_RC4_128_SHA
3-- (key: RSA) RSA_WITH_AES_128_CBC_SHA
3-- (key: RSA) RSA_WITH_AES_256_CBC_SHA
3-- (key: RSA) RSA_WITH_3DES_EDE_CBC_SHA
3-- (key: RSA) RSA_WITH_AES_128_CBC_SHA256
3-- (key: RSA) RSA_WITH_AES_256_CBC_SHA256
Any ideas as to what could be going wrong?