1

我正在使用 jmeter 对我们部署了 webapp 的远程 jboss7.1 服务器运行一些 http 负载测试

它运行顺利,直到大约 200/300 个请求成功,然后 jmeter 开始返回下面发布的错误,我不得不说在服务器端 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)
4

2 回答 2

2

The solution just found was to change the parameter in jmeter's Http Request defaults: I had to change HTTP request implementatnion to Java instead of HttpClient4.

Don't know why this helps but it works.

于 2013-02-27T13:24:40.183 回答
0

您正在将 HttpClient 4 与 JMeter 2.5 一起使用。

这是此版本在 2.5.1 中修复的已知问题。

您使用的是旧的 jmeter 版本,当前版本是 2.9,我强烈建议您仔细遵循 JMeter 版本。

于 2013-02-27T11:45:14.233 回答