automatictester

my thoughts on test automation

SSLHandshakeException while recording JMeter scripts

When I recently tried to record JMeter tests for web app front end, I came across SSLHandshakeException. Page was perfectly accessible for web browser using default network settings, but browser couldn’t get through while proxied via JMeter’s HTTP(S) Test Script Recorder.

Investigation took a while. Key thing to understand this problem is to be aware every web browser supports a particular list of ciphers which can be used when establishing secure connection with web app server. There must be some intersection between ciphers supported by browser and required by web server. If there isn’t any, secure connection will not be established. This will make your application inaccessible.

When you proxy web browser requests via JMeter test script recorder, this is now up to JMeter (or actually Java installed on your local machine) to provide cipher supported by web server. Ciphers supported by web browser are no longer important, as this is now JMeter proxy which establishes connection with remote web server. That’s why application could work for me in web browser, but not when proxied through JMeter.

If you encounter SSLHandshakeException, first upgrade Java version on machine you try to record your tests. It can fix the problem. If it won’t, list of ciphers supported by your Java version can be determined using this simple utility. Talk to your WebOps Engineer, compare it with web app server config (it was Nginx in my case) and amend configuration.

Advertisements

One response to “SSLHandshakeException while recording JMeter scripts

  1. geoff October 29, 2015 at 11:07 pm

    great upgrading the java version works thanks!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: