ssl - Jmeter 3.1-javax.net.ssl.SSLException : Received fatal alert: protocol_version

标签 ssl jmeter ssl-certificate performance-testing jmeter-plugins

我们正在尝试在 Jmeter 3.1 中运行 https 请求。

enter image description here 但是在执行时出现以下错误。

javax.net.ssl.SSLException: Received fatal alert: protocol_version
at sun.security.ssl.Alerts.getSSLException(Unknown Source)
at sun.security.ssl.Alerts.getSSLException(Unknown Source)
at sun.security.ssl.SSLSocketImpl.recvAlert(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.writeRecord(Unknown Source)
at sun.security.ssl.AppOutputStream.write(Unknown Source)
at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
at java.io.BufferedOutputStream.flush(Unknown Source)
at  org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(HttpConnection.java:828)
at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2116)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
at org.apache.jmeter.protocol.http.sampler.HTTPHC3Impl.sample(HTTPHC3Impl.java:269)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1166)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1155)
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:475)
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:418)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:249)
at java.lang.Thread.run(Unknown Source)

我们尝试了以下解决方案但没有解决问题:

  1. 在“jmeter.properties”文件中添加了“https.default.protocol=TLSv1”
  2. 提供的尝试过的解决方案 http://rajanmanoj.blogspot.in/2011/02/how-to-test-ssl-using-jmeter.html 这个链接

我们正在使用 Jmeter 3.1、Java Jdk 1.7、Windows 7

最佳答案

Https 默认协议(protocol)可能因 JVM 版本而异。 你可以改变它。转到 jmeter 主目录。打开 jmeter.properties 文件。取消注释行:

https.default.protocol=SSLv3

可能你需要在更改后重新启动 jmeter。不确定。

关于ssl - Jmeter 3.1-javax.net.ssl.SSLException : Received fatal alert: protocol_version,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42610309/

相关文章:

java - 我如何知道服务器使用 Java 提供的默认密码套件

.htaccess - htaccess for www force on Domain + Subdomain and only SSL for Subdomain

jmeter - 错误 : unsatisfiable constraints: curl (missing): while building for jmeter dockerfile

php - 如何禁用 guzzle ssl 验证 laravel

amazon-web-services - 如何删除默认证书(需要更改为其他证书)

ssl - TYPO3 中的可选 SSL

jmeter - 如何避免 JMeter 在每个 HTTP 请求节点中记录服务器名称或 IP?

java - 使用 jmeter 模拟 200 个用户,每个用户都有唯一的登录名

仅 Firefox 不信任的 SSL 证书

security - 应用手动 AES 加密而不是使用 HTTPS