Bug 58236 - SSLException on protocol_version using HTTPS
Summary: SSLException on protocol_version using HTTPS
Status: RESOLVED WORKSFORME
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: HTTP (show other bugs)
Version: 2.13
Hardware: PC Linux
: P2 major (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-12 09:53 UTC by Joviano
Modified: 2015-12-29 21:13 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joviano 2015-08-12 09:53:33 UTC
I can'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
    	at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
    	at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)
    	at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:2011)
    	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1113)
    	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1363)
    	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1391)
    	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1375)
    	at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:436)
    	at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
    	at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
    	at org.apache.jmeter.protocol.http.sampler.MeasuringConnectionManager$MeasuredConnection.open(MeasuringConnectionManager.java:107)
    	at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:643)
    	at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479)
    	at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
    	at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
    	at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.executeRequest(HTTPHC4Impl.java:517)
    	at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:331)
    	at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
    	at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1146)
    	at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1135)
    	at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:434)
    	at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:261)
    	at java.lang.Thread.run(Thread.java:745)

I have tried with Redirect automatically and follow redirects.

My site uses https only. Any clue?
Comment 1 Sebb 2015-08-12 10:08:28 UTC
As the stack trace shows, this error is generated by the underlying JVM, not JMeter.

What version of Java are you using?
Havd you tried a different version?
Comment 2 Joviano 2015-08-12 10:39:05 UTC
My Java version is 1.8.0_45
I did a wireshark and the https curl seems to utilize TLSV1
JMeter seems to do SSLv3 which does not seem to work.

I'm trying to see if I can use https.default.protocol.
Comment 3 Joviano 2015-08-12 11:00:30 UTC
@Sebb
Added this property as it works now.

added in jmeter.propeties
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.
Comment 4 Philippe Mouawad 2015-08-21 21:12:22 UTC
I think this bug should be closed as WORKFORME , but maybe the side note should be fixed:
https.default.protocol=TLS exists commented in jmeter.properties, But uncommenting that still defaulted to SSLv3. Had to explicitly change it to TLSv1.


Isn't this related to https.protocols System property :
https://blogs.oracle.com/java-platform-group/entry/diagnosing_tls_ssl_and_https


Does TLS really exist ? or should it be TLSv1 ?
Comment 5 Felix Schumacher 2015-08-23 11:05:40 UTC
In http://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html#SSLContext TLS is a valid protocol name.
Comment 6 Philippe Mouawad 2015-12-24 13:34:10 UTC
@Joviano,
what version of Java where you using ?
Isn't this your issue:
- http://stackoverflow.com/questions/16541627/javax-net-ssl-sslexception-received-fatal-alert-protocol-version

Thanks
Comment 7 Philippe Mouawad 2015-12-29 21:13:32 UTC
AS per previous comment JVM version was 1.8
So the issue is really the one pointed in SO:
- http://stackoverflow.com/questions/16541627/javax-net-ssl-sslexception-received-fatal-alert-protocol-version

See:
-https://blogs.oracle.com/java-platform-group/entry/diagnosing_tls_ssl_and_https

Document:
Author: pmouawad
Date: Tue Dec 29 21:12:57 2015
New Revision: 1722236

URL: http://svn.apache.org/viewvc?rev=1722236&view=rev
Log:
Bug 58236 - SSLException on protocol_version using HTTPS
Bugzilla Id: 58236

Modified:
    jmeter/trunk/bin/jmeter.properties
Comment 8 The ASF infrastructure team 2022-09-24 20:38:00 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3645