运行调试测试时,在Jmeter中重置Connection

问题描述

  1. 执行测试时,我在Jmeter中遇到以下错误

    javax.net.ssl.SSLException: Connection reset
    at sun.security.ssl.Alert.createSSLException(UnkNown Source)
    at sun.security.ssl.TransportContext.fatal(UnkNown Source)
    at sun.security.ssl.TransportContext.fatal(UnkNown Source)
    at sun.security.ssl.TransportContext.fatal(UnkNown Source)
    at sun.security.ssl.SSLTransport.decode(UnkNown Source)
    at sun.security.ssl.SSLSocketImpl.decode(UnkNown Source)
    at sun.security.ssl.SSLSocketImpl.readHandshakeRecord(UnkNown Source)
    at sun.security.ssl.SSLSocketImpl.startHandshake(UnkNown Source)
    at sun.security.ssl.SSLSocketImpl.startHandshake(UnkNown Source)
    at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createlayeredSocket(SSLConnectionSocketFactory.java:436)
    at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:384)
    at org.apache.jmeter.protocol.http.sampler.hc.LazylayeredConnectionSocketFactory.connectSocket(LazylayeredConnectionSocketFactory.java:91)
    at org.apache.http.impl.conn.DefaultHttpClientConnectionoperator.connect(DefaultHttpClientConnectionoperator.java:142)
    at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl$JMeterDefaultHttpClientConnectionoperator.connect(HTTPHC4Impl.java:401)
    at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376)
    at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393)
    at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
    at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
    at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
    at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
    at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
    at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
    at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.executeRequest(HTTPHC4Impl.java:930)
    at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:641)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:66)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1281)
    at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1270)
    at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:630)
    at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:558)
    at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:489)
    at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256)
    at java.lang.Thread.run(UnkNown Source)
     Suppressed: java.net.socketException: Connection reset by peer: socket write error
     at java.net.socketoutputStream.socketWrite0(Native Method)
     at java.net.socketoutputStream.socketWrite(UnkNown Source)
     at java.net.socketoutputStream.write(UnkNown Source)
     at sun.security.ssl.SSLSocketoutputRecord.encodeAlert(UnkNown Source)
     ... 31 more
     Caused by: java.net.socketException: Connection reset
     at java.net.socketInputStream.read(UnkNown Source)
     at java.net.socketInputStream.read(UnkNown Source)
     at sun.security.ssl.SSLSocketInputRecord.read(UnkNown Source)
     at sun.security.ssl.SSLSocketInputRecord.readHeader(UnkNown Source)
     at sun.security.ssl.SSLSocketInputRecord.decode(UnkNown Source)
    ... 28 more
    

**我已经尝试过对邮递员进行同样的致电,并得到适当的回应。 我已经手动验证了流程并获得了响应。 所有标头和Cookie相关的东西都很好。

   I have tried with wget on window shell and here also I am getting the response.
   Only In case of jmeter I am getting connection reset error.

   I did some changes in property file :
   User.properties :::
   #httpclient4.retrycount=1
   #hc.parameters.file=hc.parameters

   In hc.parameters :
   http.connection.stalecheck$Boolean=true

   In Jmeter.properties ::
   To enable SSL session sharing:
   https.sessioncontext.shared=true

   To set Default HTTPS protocol level:
   https.default.protocol=TLSv1.2

   To enable multiple HTTPS protocols:
   https.socket.protocols=TLSv1 TLSv1.2

   To set retry count on http 4
   httpclient4.retrycount=1

请让我知道一些解决方案。预先感谢。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...