While testing Blazemeter Parallel Controller (0.9) with Jmeter 5.3 version with multiple https requests in the parallel controller, we are getting the following exception -
java.net.SocketException: Socket Closed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
....
I identified that it is passing for only one of the http samplers in the parallel controller. I modified various parameters like ssl socket protocol, or connect timeouts in 5.3 but to no avail.
We tried the same script on JMeter 5.2.1 or lower versions and it works without any changes/issues.Also, if I change the parallel controller to transaction controller in JMeter 5.3, it is starting to work without issues - ruling out any script issues.
It seems to have some issue with newer version of JMeter vs BZM Parallel Controller
(0.9) or I may be missing any new setting to be done on JMeter 5.3 to make this work.
As of now we were running on 5.2.1 to avoid the above scenario exception but seems now, we need to move to JMeter 5.3 as part of our Organization SW upgrade and need to get a workaround for the same.
Could you please help if you have faced this and found any workaround for the same?
Had the same problem on my side with bzm - I wanted to perform in one thread group 1 login, parallel execution of send & receive messages, and 1 logout. Everything worked well except the socket closed exception on one parallel thread whenever the other one ended its job.
I ended up removing the parallel controller.
I instead went to using a combination of setup and tear-down thread groups to login and logout, and worked out the cross thread-group variable sharing problems by going through JMeter properties initialization with beanshell assertion (good article on how to that here : https://medium.com/#priyank.it/jmeter-passing-variables-between-threads-a4dc09903b59).
That worked for my use case, but it might not for yours.
Related
I am using jmeter to perform load testing on my dev cluster. I have used HTTP Authorization Manager and have passed baseurl, username, password etc. Now my thread group have:
Number of threads:100 ,
Ramp-up period: 1 and Loop Count:1
Now for the first 50-60 calls the authorization works as expected but later it starts failing by giving error as 403. can anyone please tell me how to fix this?
I am using jmeter 5.4.1
Is there any response data? Perhaps you are getting rate limited. I also noticed you are reading in variables from a CSV. Are you sure the data in each row is correct? If you are providing auth credentials through the CSV, an incorrect row could lead to a 403.
As a side note, JMeter 5.4.1 has a log4j vulnerability, you might want to upgrade it to the latest version.
If the problem occurs under the load I can think of 2 possible reasons:
Your application gets overloaded and cannot properly handle the requests. Check your application logs and resources usage (CPU, RAM, etc.)
JMeter gets overloaded and not being able to properly send the requests. You're violating several JMeter Best Practices in particular:
you're running JMeter in GUI mode, GUI is only for tests development and debugging, when it comes to execution you should be using command-line non-GUI mode
you're using Listeners, especially View Results Tree, they don't add any value and just consuming resources
you're not using the latest version of JMeter, current stable release is 5.4.3
In continuation to working on this issue - JMeter test not stopping after duration ends in distribution mode
Using JMeter version - 5.4
I got a thread dump and figured out few threads are getting stuck on HTTP Requests.
The resolution figured out is to set timeouts for the HTTP Requests as mentioned here - Configuring response timeout in Apache JMeter
But I'm not the author of the test plan. Hence, the only way I could use is to set JMeter properties.
I've set the following in jmeter.properties (values are for local testing):
httpclient.timeout=100
hc.parameters.file=hc.parameters
os_sampler.poll_for_timeout=100
and in hc.parameters
http.socket.timeout$Integer=100
But unfortunately none of these are working.
The only timeouts working are the ones when I set them in Advanced Tab of HTTP Sampler of the test plan.
Do we have any platform recommendation to control this behavior (like some other setting or property etc.)? Or am I missing anything in the above mentioned properties?
Also, I do sometimes get this exception in response, but I highly doubt if this is related?
Non HTTP response code: java.net.BindException
Non HTTP response message: Address already in use: connect
Your steps are correct so it looks like a bug in JMeter, presumably a side-effect of this commit so you have 2 options:
Downgrade to JMeter 5.0 where this functionality is still working
Raise an issue in JMeter Bugzilla but you will need to wait until someone fixes it and then either for a nightly build or a new release containing this fix
Fix it yourself and contribute the fix to the upstream
I have a workflow to keep a user active in a site. I setup a plan for it in jmeter, but the user drops after a few minutes. The flow is:
https API1 get Login/token API1
https API2 get request for param
https API3 get request for param
Wait for Ping event (single read filter) - Here is where the
socket connection is made.
Reply with a Pong (filter frame)
Every couple of minutes do https patch API4 using parameter from API1
Repeat 4 - 6 indefinitely
The problem is that API4 call is never made. The script only goes up to the websocket single read and never executes API4. I have tried the bzm parallel control, but it never executes API4 either. I considered having two different thread groups but API4 needs the token generated from API1. I have tried several other things but for the sake of simplifying my problem, I am only posting this plan. I also looked at other questions posted here and don't quite address my use case. Any suggestions are very much appreciated
Here is the plan I am using:
using parallel controller with websocket connection initiated inside the loop
creating websocket connect before entering loop
Parallel Controller is not an answer as it will wait for api4 prior to starting a new iteration, the only solution is to call api4 in the separate Thread Group.
The token from api1 can be passed via __setProperty() function or Inter-Thread Communication Plugin
Tried with following approach using Java Request through Jmeter
MQ_Error from JMeter
As per MQ connection is terminating with error code 2009 the reasons could be in:
A firewall that is terminating the connection
An IOException that causes the socket to be closed
An explicit action to cause the socket to be closed by one end
The queue manager is offline
The maximum number of channels allowed by the queue manager are open
A configuration problem in the Queue Connection Factory (QCF)
so follow this checklist, hopefully it will allow you to get to the bottom of the issue.
Also this MQClientSampler doesn't look familiar to me, you may need to reach out to the plugin developer/maintainer as it might be a bug in the plugin.
You can consider using JSR223 Test Elements and IBMMQ client libraries as an alternative solution, check out IBM MQ testing with JMeter - Learn How article for more details.
It might be a bit easier to use Groovy script since it doesn't need to be pre-compiled like Java. I made an example here that works with JMeter 5.3 and MQ9:
https://github.com/djangofan/jmeter-ibm-mq9
Today i got issue Non Http Response code when run script on Jmeter. My script run over some steps (Login - view) but got this issue and have log that issue at NoHttpResponseException.
I'm using Jmeter version 3.3. And I think that maybe this issue from server side, not by my script.
Does anyone fix this issue before? Please support me to resolve it.
This status code is being returned when an Exception occurs during HTTP Request sampler execution. There are hundreds or thousands of possible exceptions and even more potential causes for them.
If it occurs only under the load - most probably it's a server side error and you need to check the application under test logs and monitoring software results to identify the cause
It might be something described in the Connection Reset since JMeter 2.10 ?
It might be the case your JMeter script is badly designed/implemented and you're sending garbage instead of proper HTTP request
So try to collect as much information as you can:
Application under test and JMeter logs (it includes any middleware such as reverse proxies, load balancers, databases, etc.)
Application under test and JMeter machines health metrics (CPU, RAM, Network, Disk, Swap)
Network layer information, i.e. HTTP Request and response details.
Also be aware that according to JMeter Best Practices you should always be using the latest version of JMeter so consider upgrading to JMeter 5.0 (or whatever is the current latest JMeter version available at Downloads page) as soon as it will be possible.