如何解决运行调试测试时,在Jmeter中重置Connection
-
执行测试时,我在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 举报,一经查实,本站将立刻删除。