JMeter AWS HTTPS SNI问题

时间:2016-02-16 10:53:04

标签: amazon-web-services jmeter apache-httpclient-4.x amazon-cloudfront sni

有没有办法让JMeter使用AWS HTTPS SNI?

现在,当我尝试通过HTTPS和CloudFront SNI访问我的资源时,我收到以下异常:

javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)
    at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:2023)
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1125)
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
    at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:563)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
    at org.apache.jmeter.protocol.http.sampler.HTTPJavaImpl.sample(HTTPJavaImpl.java:483)
    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)

2 个答案:

答案 0 :(得分:3)

使用HTTPClient 4时,这是JMeter的已知问题:

因此您可以选择在HTTP请求上切换到HttpClient3.1实现。

编辑2016年2月17日:

  • 问题在夜间构建中得到修复,如果你明天能够得到它并且对你的HTTPClient 4有效,那就很好了

答案 1 :(得分:1)

是的,CloudFront支持SNI [1]。您确定要发送SNI标头并使用支持的密码[2]吗?要进行验证,您可以执行以下操作: