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

如何解决运行调试测试时,在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.JdbcOdbcDriver发生异常。为什么?
这是用Java进行XML解析的最佳库。
Java的PriorityQueue的内置迭代器不会以任何特定顺序遍历数据结构。为什么?
如何在Java中聆听按键时移动图像。
Java“Program to an interface”。这是什么意思?
Java在半透明框架/面板/组件上重新绘画。
Java“ Class.forName()”和“ Class.forName()。newInstance()”之间有什么区别?
在此环境中不提供编译器。也许是在JRE而不是JDK上运行?
Java用相同的方法在一个类中实现两个接口。哪种接口方法被覆盖?
Java 什么是Runtime.getRuntime()。totalMemory()和freeMemory()?
java.library.path中的java.lang.UnsatisfiedLinkError否*****。dll
JavaFX“位置是必需的。” 即使在同一包装中
Java 导入两个具有相同名称的类。怎么处理?
Java 是否应该在HttpServletResponse.getOutputStream()/。getWriter()上调用.close()?
Java RegEx元字符(。)和普通点?