brithwulf
brithwulf

Reputation: 548

JMeter HTTP Request failed

I'm really new to JMeter. I'm trying to make a simple test as I saw in some videos. When I try to run simple test it gives me an error in results tree. It says: Response code: Non HTTP response code. I saw a lot of things on stackoverflow, but nothing with the error I have. Really sorry if it is a duplicate question, but I didn't found any solution for my case.

Here is what I'm trying to do: enter image description here

enter image description here

Upvotes: 3

Views: 11194

Answers (5)

Dmitri T
Dmitri T

Reputation: 168072

You should not be load testing web sites you don't own without explicit permissions of these website owners

So my expectation is that:

  1. You should stop sending requests to google.com. Consider using either your own web application or sites which are designed for this form of practice like http://blazedemo.com/ or http://www.newtours.demoaut.com/. If the tutorial you're referring to assumes real life websites - I wouldn't trust this tutorial a lot.
  2. You're being blocked either on Google side or on your ISP side or on your router / firewall which may have automated fraudulent behaviour detection and prevention logic

Upvotes: 4

James Pulley
James Pulley

Reputation: 5682

Please do not point performance testing tools at sites you do not own, manage or control OR have permission from those that do have those roles. Your GOOGLE end user agreement especially forbids the use of automated tools on its interface, with the only supported interfaces for automation the published web services APIs.

Performance Testing tools are the equivalent of tactical nuclear software. They are designed to place maximum stress on the target, up to and including destroying it's ability to continue operation. Pointing any tool of this type at a site you down't own or have permission to target is no different than throwing bombs at random houses from the back of a pickup driving through a neighborhood. I haven't been through the Jmeter license recently, but all commercial performance testing tools ban this activity under license.

Download a GNU application, install it yourself and then test that. May I recommend SugarCRM

Upvotes: 7

Muditha Perera
Muditha Perera

Reputation: 1252

I just went through the sampler result tab of the images. I guess this is not an issue with your Jmeter configuration. If you look at the sampler results it looks like this.

Load time: 21074
Connect Time: 21074
Latency: 0
Size in bytes: 2723
Sent bytes:0
Headers size in bytes: 0
Body size in bytes: 2723
Sample Count: 1
Error Count: 1
Data type ("text"|"bin"|""): text
Response code: Non HTTP response code: 
Response message: Non HTTP response message:  google.com:80 ... connection timeout


HTTPSampleResult fields:
ContentType: 
DataEncoding: null

If you look at the Load time and the Connection time they are more than 27 seconds and both have the same value. Then the Sent bytes value and the Headers size in bytes is 0. The Response message says it's a connection time out

Looking at those results it looks like Jmeter tried make the connection for 27 seconds and then timed out with out sending any request. That's why the sent bytes value is 0.

Since the response says connect to google.com:80 I suspect this is due to a proxy issue or probably due to a slow connection issue.

As a solution first check if your proxy connection is on port 80. if so try to remove proxy and run the test again. If not check the net work connection speed. your script have no issues.

Good luck

Upvotes: 2

George Rylkov
George Rylkov

Reputation: 623

If you look at the response message you may notice the cause of the error: "Connection timed out: Connect".

Your connect time is close to 21 seconds and then you receive a timeout. This is a default TCP connection timeout (see Where does the socket timeout of 21000 ms come from?).

I would suggest to check the network connection to the host where you run JMeter.

Upvotes: 2

Johann
Johann

Reputation: 369

Your configuration works for me. Please try the server adress www.google.com. When calling google.com there are two requests made:

  1. The first request "GET http://google.com/" returns HTTP 301 Moved Permanently. First Request when calling google.com
  2. The following request "GET http://www.google.com/" returns a HTTP 200 Second Request when calling google.com

When you call www.google.com the 301 will not be returned: Request with www result in only one request

Make sure, that you network connection is ok.

Upvotes: 2

Related Questions