JMeter例外

时间:2014-01-01 17:50:11

标签: jmeter

运行JMeter负载测试时出现以下异常:

java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 502 Tunnel Connection Failed"
at sun.net.www.protocol.http.HttpURLConnection.doTunneling(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(Unknown Source)
at org.apache.jmeter.protocol.http.sampler.HTTPJavaImpl.sample(HTTPJavaImpl.java:487)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1105)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1094)
at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:429)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)
at java.lang.Thread.run(Unknown Source)
------------------------------------------------------------------------

3 个答案:

答案 0 :(得分:2)

如输出所示:

  

无法通过代理隧道。代理返回“HTTP / 1.1 502隧道连接失败”

JMeter正试图通过代理访问目标服务器,并且由于某种原因连接失败。

您需要使用代理吗?如果这样做,请确保已正确配置代理并且目标服务器的IP /端口正确。

答案 1 :(得分:0)

我认为不允许直接连接目标。你可以用putty来建立隧道。 Google Design guidelines for text fields 然后连接到在putty隧道中创建的localhost和localport

答案 2 :(得分:0)

只需将HTTP Request Default添加到您的线程组,然后将您的代理详细信息(服务器名称或IP,PortNumber,用户名和密码)添加如下: enter image description here