JMeter:握手期间远程主机关闭连接

时间:2015-12-01 16:25:15

标签: java jmeter

我正在使用“Java Request”采样器运行JMeter测试,该采样器对使用TLS v1.2的HTTPS服务执行POST请求。请求失败,

2015/12/01 19:11:50 ERROR - jmeter.protocol.java.sampler.AbstractJavaSamplerClient: 2015-12-01T16:11:50.189Z message:**** Exception in JMeter node for Login java.lang.RuntimeException: Failed to getServerToken
    at com.chrysler.loadtest.GUIMimicLogin.getServerToken(GUIMimicLogin.java:227)
    at com.chrysler.loadtest.GUIMimicLogin.runTest(GUIMimicLogin.java:97)
    at org.apache.jmeter.protocol.java.sampler.JavaSampler.sample(JavaSampler.java:191)
    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(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 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.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.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:784)
    at com.chrysler.loadtest.GUIMimicLogin.getServerToken(GUIMimicLogin.java:215)
    ... 5 more
Caused by: java.io.EOFException: SSL peer shut down incorrectly
    at sun.security.ssl.InputRecord.read(Unknown Source)
    ... 18 more

JMeter在使用TLS v1.1时曾经使用过该服务器。 JMeter属性中是否有可以设置适用协议的设置。

JMeter版本为2.13,Java版本为1.7。

1 个答案:

答案 0 :(得分:1)

这是一个SSL错误,可能意味着几件事。确保在应用程序中启用了TLS 1.2(JVM参数?)( - Dhttps.protocols = TLSv1.2)。您可以使用openssl检查连接,看看您是否正在取回证书。如果您正在检查您的密钥库并确保您拥有正确的证书。您可能无权访问该服务器。