19
votes

I have a prepared a jmx file using jmeter & ran that test case on blazemeter to test load on my server. After the test is done, I can see that one of my services are failing. Though not all the time, but some times. And in the error tab on blazemeter, i can see that is is giving

Non HTTP response message: The target server failed to respond

I am not sure, that is my server failing to handle the load, or is it something else. In My settings, thread is 50. Can any one please help me that, is this because of server is failing to handle to load. Thanks in advance.

5

5 Answers

31
votes

It looks like that you're facing the problem described in Connection Reset since JMeter 2.10 ? Wiki article.

If you upgraded recently to JMeter 2.10 or 2.11, you may have noticed increased errors of this type:

Socket closed

Non HTTP response code: org.apache.http.NoHttpResponseException (the target server failed to respond)

So

  1. Change "Implementation" of your HTTP Requests to HTTPClient4

  2. Add the next 2 lines to user.properties file (usually lives under /bin folder of your JMeter installation)

    httpclient4.retrycount=1
    hc.parameters.file=hc.parameters
    
  3. In hc.parameters file (also lives under JMeter's /bin folder) uncomment the following line:

    http.connection.stalecheck$Boolean=true
    

For more information on different JMeter properties and ways of setting and altering them refer to Apache JMeter Properties Customization Guide

1
votes

Had similar problem for jmeter 2.13 DmitriT solution got me pointed in right direction, but in my case the java or HttpClient3.1 worked, 4.0 did not.

1
votes

I have done everything.

ange "Implementation" of your HTTP Requests to HTTPClient4 Add the next 2 lines to user.properties file (usually lives under /bin folder of your JMeter installation)

httpclient4.retrycount=1 hc.parameters.file=hc.parameters In hc.parameters file (also lives under JMeter's /bin folder) uncomment the following line:

http.connection.stalecheck$Boolean=true

BUT STILL FACING THIS ISSUE in apache jmeter 5.1

1
votes

Encountered the same issue and fixed it by unchecking the "Use KeepAlive" option for HTTP requests. Please refer to the screenshot. I guess, the root cause was related to the connection being closed and the JMeter client trying to use the same connection.

Uncheck KeepAlive option

0
votes

In my case it was the header for the call I was doing that was causing the issue. It was:

Content-Type:application/json;charset=UTF-8

Set it to:

Content-Type:application/json