JMeter:响应数据中的“java.net.ConnectException:连接超时:连接”错误

时间:2015-09-03 06:42:22

标签: timeout server client jmeter distributed

我试图在分布式模式下执行JMeter测试计划,但是每次都会出现连接超时错误,但是当测试计划在非分布式模式下执行时它会起作用。

帮助表示赞赏!

以下是来自Listener的响应数据:

org.apache.http.conn.HttpHostConnectException: Connection to http://URL refused
 at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:190)
 at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294)
 at org.apache.jmeter.protocol.http.sampler.MeasuringConnectionManager$MeasuredConnection.open(MeasuringConnectionManager.java:107)
 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.jmeter.protocol.http.sampler.HTTPHC4Impl.executeRequest(HTTPHC4Impl.java:517)
 at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:331)
 at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
 at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1146)
 at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1135)
 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: java.net.ConnectException: Connection timed out: connect
 at java.net.DualStackPlainSocketImpl.connect0(Native Method)
 at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
 at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
 at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
 at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
 at java.net.PlainSocketImpl.connect(Unknown Source)
 at java.net.SocksSocketImpl.connect(Unknown Source)
 at java.net.Socket.connect(Unknown Source)
 at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:127)
 at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180)
 ... 14 more

1 个答案:

答案 0 :(得分:0)

由于连接被拒绝,这意味着防火墙可能切断了连接。

有2种选择: