问题
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.
回答1:
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
- Change "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
For more information on different JMeter properties and ways of setting and altering them refer to Apache JMeter Properties Customization Guide
回答2:
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.
回答3:
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
回答4:
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
来源:https://stackoverflow.com/questions/27942583/non-http-response-message-the-target-server-failed-to-respond-is-my-server-fai