I am running JMeter in distributed mode (1 master & 2 slaves).
In my master machine, I issue below command
jmeter -n -t script.jmx -r
It starts the test in both slave machines & works great. If i need to stop the test (in non-gui mode), If i press ctrl+c
, It just stops the master. slaves keep executing the test. I also tried shutdown.cmd
. master shows that 'shutdown received from 127.0.0.1` but did nothing.
Question:
What is the best way to stop test while it is running?
Additional Information: If you want to stop a test in the middle then navigate to 'bin' folder of JMeter and use stoptest command (for Windows) or use ./stoptest.sh command (for Unix).
To run JMeter in remote node, start the JMeter server component on all machines you wish to run on by running the JMETER_HOME/bin/jmeter-server (unix) or JMETER_HOME/bin/jmeter-server. bat (windows) script. Note that there can only be one JMeter server on each node unless different RMI ports are used. Since JMeter 2.3.
By default, JMeter uses the standard RMI port 1099. It is possible to change this. For this to work successfully, all the following need to agree: On the server, start rmiregistry using the new port number.
Running shutdown.sh or stoptest.sh works well for me.
I run it on the master, the slaves receives the shutdown/stopsignal and starts to close down.
When running through jenkins, I issue the shutdown/stop command on the jenkins slave running the test.
to stop the distributed test, you need to run the following command on the wizard: ./shutdown.sh
do not forget to go to the jmeter / bin folder first. after running this command, the master will send all subordinates a command to stop the test
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With