38172
38172

Reputation: 283

Setting up Jmeter to do HTTPS

I am using a jmeter 2.7 for my load testing. When we started of the urls to use were simple http. Now we have moved to HTTPS. Can some one tell me how to enable ssl in jmeter? I did go through the jmeter manual and un-commented the SSL portions (all SSL lines now :( ) from system.properties and also have changed the protocol to be HTTPS under Http Request sampler -> Http Request and still no success. I am lost on how to set ssl url in jmeter any help? Link that some one can point me to?

some more info: I'm running jmeter from my mac and it has Java version 1.6.

Upvotes: 17

Views: 114641

Answers (8)

Venkatesh Yalavatthi
Venkatesh Yalavatthi

Reputation: 11

I had a similar issue. I am on jmeter 3.0. When I tried to access https (by setting the protocol to https) I kept getting a 403.

I then set the Implementation to HttpClient4 and then protocol to https from that instant it started working perfectly.

Upvotes: 0

user5689711
user5689711

Reputation: 81

Three (3) Steps:

1) Open a command line:
openssl s_client -connect hostname:port -showcerts

Copy the 2nd+ certs to notepad or text file, with the BEGIN / END Markers: Application_CA_Public_Cert.cer

2) Create trust store with Java keytool keytool -importcert -alias APPLICATION_NAME_CA_PUBLIC_CERT -file Application_CA_Public_Cert.cer -keystore jmeter_truststore.jks -storepass Password01

3) Update Jmeter system.properties file (per notes in Jmeter, all ssl functionality moved to this file)

JMETER_HOME/bin/system.properties {Jmeter version 2.13}

https.default.protocol=TLSv1 javax.net.ssl.trustStore=C:/jmeter/apache-jmeter-2.13/jmeter_truststore.jks javax.net.ssl.trustStorePassword=Password01

Upvotes: 8

Joviano Dias
Joviano Dias

Reputation: 1110

I couldn't get this to work.

curl -X GET "https://x.com/PROMOT" -k -H "Authorization: Basic YWRtaW46cGFzcw=="

Would work.

However JMeter 2.13 with https and HttpClient3.1/HttpClient4/Java would error on

javax.net.ssl.SSLException: Received fatal alert: protocol_version

My site used https only.

I did a wireshark and the https curl seems to utilize TLSV1 JMeter seemed to do SSLv3 which did not work. Added this property as it works now.

Added in jmeter.propeties and things work now!

https.default.protocol=TLSv1

Or an argument with jmeter.

 --jmeterproperty https.default.protocol=TLSv1

A side note: https.default.protocol=TLS exists commented in jmeter.properties, But uncommenting that still defaulted to SSLv3. Had to explicitly change it to TLSv1.

Upvotes: 2

Anna Sharpe
Anna Sharpe

Reputation: 51

I had the exact same issue using version 2.11 and by changing the Implementation to HttpClient4 and Protocol [http]: to HTTPS in each thread it now works.

Upvotes: 5

Vijay
Vijay

Reputation: 89

I am facing similar issues and now able to run Jmeter version 2.11 successfully with HTTPS. To run it you need to change HTTP request implementation to HTTPClient4 and Protocol to HTTPS.

Upvotes: 8

Somaiah Kumbera
Somaiah Kumbera

Reputation: 7539

I had a similar issue. I am on jmeter 2.9. When I tried to access https (by setting the protocol to https) I kept getting a 403.

I then set the Implementation to HttpClient3.1 and it worked from there.

Upvotes: 0

Becks
Becks

Reputation: 21

You need to configure a keystore containing the SSL certificate against javax.net.ssl.trustStore in [apache path]\bin\system.properties.

Upvotes: 2

ant
ant

Reputation: 22948

No, you need not to change any system properties. Here is random github https example that works for :

enter image description here

Upvotes: 26

Related Questions