while during load testing for one site through j meter getting below
error:Response code: Non HTTP response code:
org.apache.http.conn.ConnectTimeoutException Response message: Non
HTTP response message: Connect to 172.17.4.213:80 timed out
You most probably didn't configure the proxy for JMeter as per:
http://jmeter.apache.org/usermanual/get-started.html#proxy_server
Look at your browser (where request works) proxy configuration for the settings.
I think you should check your URL/ip address is pointing to your code properly by some online ping tool. And If it is working, check if your network is not blocking site access.
Related
I'm able to verify the webhook using glitch from the getting started:
https://glitch.com/edit/?fbclid=IwAR2YTjZuGGM9Hi6T_v1eZh_nV6_HY3RYn_8lll4gY1REa_bJy6ZAuq6tkKQ#!/whatsapp-cloud-api-echo-bot
my local server (in a subdomain with https enabled) has the same behavior as glitch and show "WEBHOOK_VERIFIED" on the log for the request:
/webhook?hub.mode=subscribe&hub.verify_token=xpto123&hub.challenge=123
but when try to verify my local server the request from meta does not reach the server.
chrome showing that the connection to the server is secured
After more tests I found that my local server was been blocked by the ISP, understood it after test with another connection.
I made my own server and had tried ngrok and other programs to run it from local host with https redirect but whatsapp doesn't allow the use of those programs.
In the end, my error was that the URL HAS to end in /webhook or else, it won't even send the request. Then it'll send a GET request and you have to return the hub.challenge query param after making sure that the provided token from them is the one you set up. This is my code using NodeJS
if(req.query['hub.verify_token'] === process.env.VERIFY_TOKEN) return res.status(200).send(req.query['hub.challenge'])
I am trying to perform a test against an endpoint with 1 thread. I configured a HTTP request with JSON Monk endpoint URL using JMEter.
But when I run the test I get Response code:504 in the Sampler result. The same when I use the URL in a browser I get also 504 Gateway Time-out
Can anyone help me with this issue? - I tried in another pc and I got the same error!
I have installed JMeter correctly and my code is correct too. I am working on a Windows 10.
HTTP Request:
As per HTTP Status Code 504 description
The HyperText Transfer Protocol (HTTP) 504 Gateway Timeout server error response code indicates that the server, while acting as a gateway or proxy, did not get a response in time from the upstream server that it needed in order to complete the request.
Note: A Gateway might refer to different things in networking and a 504 error is usually not something you can fix, but requires a fix by the web server or the proxies you are trying to get access through.
So it indicates the problem with the server you're trying to test, if you own the website - go and fix it, if you know someone who is responsible for it - inform him/her/them.
There is nothing you can do from JMeter perspective. If you know how response should look like you can use a Dummy Sampler to return this response so you could play with the response data
By the way, it's down for me as well:
Could anyone please help me to understand the below issue or share any references to resolve
I am getting below error message when going to save my test plan:
Couldn't save test plan to file: C:\Windows\System32\View Results Tree.jmx C:\Windows\System32\View Results Tree.jmx (Access is denied)
While running the result by adding listener .i am getting the below error.
Response code:Non HTTP response code: java.net.MalformedURLException Response message:Non HTTP response message: unknown protocol:
The user you're running JMeter from doesn't have write access to C:\Windows\System32\ folder, you need to choose another location to save your test plan, for example into your home directory. If you have to store the .jmx test plan under C:\Windows\System32 folder consider running JMeter as administrator
The error indicates misconfiguration of the HTTP Request sampler, you need to use one of the following protocols:
http - for HTTP
https - for HTTPS
file - for reading a local file
example configuration:
If you're uncertain regarding the HTTP Request sampler(s) configuration you can consider recording the test scenario using your browser either using HTTP(S) Test Script Recorder or JMeter Chrome Extension
[Non HTTP response message: unknown protocol][1]
include the https in the textbook , if its http you can leave it blank
write the url in the server name
Please see image below
https://i.stack.imgur.com/xqFa7.png
I have read and tried the solutions shared in the previous posts for this error but nothing helped me to fix this. Kindly help.
I am making a HTTPS API call. A very simple call which accepts a 2 KB JSON message via POST method and sends a one word acknowledgement. It works perfectly fine in Postman tool. In JMeter, no. of threads (users) is kept as 25. It works perfectly fine one time with all 25 success response and at times getting few failure response as
Response code: Non HTTP response code: java.net.SocketException
Response message: Non HTTP response message: Unexpected end of file from server
No consistency at all. I have also tried with both enabling and disabling "use keepalive" checkbox. Both giving me all success one time ; few/all failure at another time with the above error. Please help. Thank you.
Below are the JMeter settings:
HTTP Header Manager : Content-Type - application/json
HTTPRequest sampler : protocol - HTTPS
Server Name or IP : project server name
Method : POST
PATH : The required path with https authentication details passed as parameters
IMPLEMENTATION : Set to JAVA (HTTPCLIENT4 was giving me “443 failed to respond” error)
Add header
Connection Keep-Alive
Both errors (Java implementation and Apache HTTPClient4 implementation), are essentially saying the same thing: The server closed the connection, without providing any response. I think there could be the following reasons:
Authentication problem. If server side checks authentication before processing a request (e.g. using Spring), it may be rejecting your request, it may be not bothering with any response if authentication is not considered correct.
Request Issue. Some less noticeable properties of the request you send via Jmeter are different from what you send in Postman. It could be some minor thing with formatting, or some headers server expects. Some of such inconsistencies can also cause Load Balancer (if you use one) to reject request before it's delivered to the server.
Certificate issues. Since you are using HTTPS, you need to make sure your certificate is setup correctly on JMeter side.
So I suggest:
Review server logs and see if your request makes it to the server. If yes, you might be able to see how it was rejected. If not, you need to trace back and see who rejected it (LB, authentication, etc)
Compare headers and body sent by JMeter vs Postman line to line (use TCPDump for example to obtain it).
I am getting this error in a sub request while navigating to a site.The sub-request is not captured in the script but I am able to see in Results Tree. Please refer below image for details: enter image description here
Could someone please help me resolve this issue?
You are not load testing fonts.googleapis.com host, are you?
I suggest adding the following entry to "URSs must match" section of your HTTP Request sampler (or better for HTTP Request Defaults)
^((?!googleapis).)*$
This will filter out the calls to googleapis host so you could focus on your application solely.
See Excluding Domains From The Load Test article for more detailed explanation and example on how to exclude several domains.
As i am suspecting "Attached image" URL is not useful for you, and you want to
exclude that So need to uncheck "Retrieve all embedded resources" form each
"HTTP REQUEST" and "HTTP REQUEST DEFAULTS"
The reason why you see this exception - the server terminated TCP connection established between client (your Jmeter) and server (googleapi). So, Jmeter expects correct HTTP answer but receives nothing (TCP RST or FIN flag, you can check it by parsing tcpdump).
Possible reasons:
I don't see any cookies sent within the request. As you said, it's a sub-request. So, it should contain session cookies established by server. You can use HTTP Cookie Manager for that.
Your Jmeter can't establish HTTPS connection (you do use HTTPS in this request). Make sure that all is OK with your certificates/keys.