将Jmeter localhost与自定义端口一起使用

时间:2012-12-27 11:11:02

标签: java apache testing localhost jmeter

我有一个Java Web服务器。它使用localhost和端口9090.(自定义,但不是8080)

(Socket[addr=/127.0.0.1,port=59507,localport=9090]) // in the log

它工作正常,我不会使用Apache JMeter测试它。

这是我的结构 (HTTP请求与其名称匹配。) enter image description here

当我启动它时 - 日志显示以下错误:

<httpSample t="157" lt="0" ts="1356605101476" s="false" lb="/index.html" rc="Non HTTP response code: org.apache.http.client.ClientProtocolException" rm="Non HTTP response message: null" tn="Thread Group 1-1" dt="text" by="2021"/>
<httpSample t="10" lt="0" ts="1356605101637" s="false" lb="/about.html" rc="Non HTTP response code: org.apache.http.client.ClientProtocolException" rm="Non HTTP response message: null" tn="Thread Group 1-1" dt="text" by="2021"/>
<httpSample t="16" lt="0" ts="1356605101651" s="false" lb="/404e.html" rc="Non HTTP response code: org.apache.http.client.ClientProtocolException" rm="Non HTTP response message: null" tn="Thread Group 1-1" dt="text" by="2021"/>

如果你给我一些提示,我将非常感激。

1 个答案:

答案 0 :(得分:0)

首先检查localhost:9090在浏览器中是否可以正常使用您使用的URL。 然后尝试将localhost更改为127.0.0.1