我正在使用jmeter运行一些http负载测试到我们部署了webapp的远程jboss7.1服务器
它运行顺利,直到大约200/300请求成功,然后jmeter starst返回下面发布的错误,我不得不说在服务器端jboss日志中没有错误。
我的环境:
客户端:
Windows 7
jmeter 2.5 with 5 threads ramp up 5 sec
java version "build 1.7.0-b147 64 bit"
服务器:
CentOS release 6.3 (Final)
open jdk "1.7.0_09-icedtea"
jboss7.1
我怀疑这是一个客户端问题,但不确定如何解决它,任何提示?
jmeter返回的错误是:
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(Unknown Source)
at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:149)
at org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:110)
at org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:264)
at org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponseParser.java:98)
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:252)
at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:281)
at org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:247)
at org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(AbstractClientConnAdapter.java:219)
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:298)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125)
at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:645)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:464)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:262)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:62)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.followRedirects(HTTPSamplerBase.java:1308)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.resultProcessing(HTTPSamplerBase.java:1379)
at org.apache.jmeter.protocol.http.sampler.HTTPAbstractImpl.resultProcessing(HTTPAbstractImpl.java:244)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:334)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:62)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:999)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:985)
at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:381)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:274)
at java.lang.Thread.run(Unknown Source)
答案 0 :(得分:3)
刚刚找到的解决方案是更改jmeter的Http Request默认值中的参数:我必须将HTTP请求实现更改为Java
而不是HttpClient4
。
不知道为什么这会有所帮助,但它有效。
答案 1 :(得分:0)
您正在使用HttpClient 4和JMeter 2.5。
这是2.5.1修复此版本的一个问题。
你使用的是旧的jmeter版本,目前的版本是2.9,我非常鼓励你仔细遵循JMeter版本。