jmeter 异常错误:连接到...失败连接被拒绝:联机]

vsikbqxv  于 2022-11-09  发布在  其他
关注(0)|答案(1)|浏览(623)

Im trying to execute a scenario in jmeter. While I test from my local system I'm not getting any errors (tested for 1000 users). However, when I execute through a remote desktop connection from my client's network Im getting error even for 2 users/threads.
org.apache.http.conn.HttpHostConnectException: Connect to ---[] failed: Connection refused: connect at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:156) 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)
Im unable to understand where Im going wrong. Kindly help with suggestions/fixes.

n53p2ov0

n53p2ov01#

这里没有什么可以从JMeter端“修复”的,错误意味着JMeter无法在给定主机的给定端口连接到被测系统。
尝试使用Web浏览器访问端点,如果它工作-那么最有可能的是您的“客户端”正在使用某种形式的代理服务器,您需要让JMeter知道这个代理。
如果没有,请联系客户端的网络管理员,因为您尝试测试的系统可能被防火墙或类似的东西阻止了。
您还可以通过将下一行添加到 log4j2.xml 文件中来执行enable debug logging for JMeter's HTTP Request samplers

<Logger name="org.apache.http" level="debug" />

并且在JMeter重新启动之后,您应该在jmeter.log文件中看到更多关于幕后发生的事情的信息。比较来自您的本地机器和客户端网络中的远程机器的日志,并报告差异。

相关问题