首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >通过Apache JMeter连接到自签名SSL网站。

问通过Apache JMeter连接到自签名SSL网站。
EN

Stack Overflow用户
提问于 2013-03-01 17:07:50
回答 1查看 9.9K关注 0票数 3

我试图在使用自签名SSL证书的网站上进行性能测试.

我的JMeter测试计划在“通常”的SSL站点(有正确签名的证书)和没有SSL的测试页面上正确工作。一旦我访问测试页面(使用自签名证书),JMeter只会创建错误。我试过的是:

  1. 存储证书(通过浏览器)并将其导入Java (通过控制面板"Java")

  1. 将证书添加到密钥存储库并通过以下逗号行启动JMeter (我不知道如何以另一种方式“引用JVM中的密钥存储库”?!) -jar "ApacheJMeter.jar“-Djavax.net.ssl.keyStore="C:\Program \ java \jre7 7\lib\security\cacerts”-Djavax.net.ssl.keyStorePassword=changeit

谢谢关于如何获得JMeter访问测试页面的提示:)

目前的结果(JMeter输出)是:

代码语言:javascript
复制
javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
    at sun.reflect.GeneratedConstructorAccessor28.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at java.net.HttpURLConnection.getResponseCode(Unknown Source)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source)
    at org.apache.jmeter.protocol.http.sampler.HTTPJavaImpl.readResponse(HTTPJavaImpl.java:264)
    at org.apache.jmeter.protocol.http.sampler.HTTPJavaImpl.sample(HTTPJavaImpl.java:520)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:62)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1088)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1077)
    at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:428)
    at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256)
    at java.lang.Thread.run(Unknown Source)
Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
    at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
    at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
    at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown Source)
    at java.net.URLConnection.getHeaderFieldLong(Unknown Source)
    at java.net.URLConnection.getContentLengthLong(Unknown Source)
    at java.net.URLConnection.getContentLength(Unknown Source)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getContentLength(Unknown Source)
    at org.apache.jmeter.protocol.http.sampler.HTTPJavaImpl.readResponse(HTTPJavaImpl.java:230)
    ... 7 more
Caused by: java.io.EOFException: SSL peer shut down incorrectly
    at sun.security.ssl.InputRecord.read(Unknown Source)
    ... 21 more
EN

回答 1

Stack Overflow用户

发布于 2014-03-06 15:22:27

查看这个答案:JMeter and optional SSL client certificate查看JMeter请求中的端口号。https的Stadard端口是443。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/15163081

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档