Jmeter run in ubuntu server none gui mode not show nothing result - jmeter

I try to run command ./jmeter.sh -n -t ../../apache-jmeter-4.0/test-case-2018/jmeter_cron.jmx and i got log message :
Starting the test # Mon Jul 09 17:44:48 ICT 2018 (1531133088159)
Waiting for possible Shutdown/StopTestNow/Heapdump message on port 4445
summary = 0 in 00:00:00 = ******/s Avg: 0 Min: 9223372036854775807 Max: -9223372036854775808 Err: 0 (0.00%)
Tidying up ... # Mon Jul 09 17:44:48 ICT 2018 (1531133088762)
... end of run
It's seem nothing run .
PS: But i run in my desktop ( Windows 10) it's show result as normal . it's the log message from my desktop :
Starting the test # Mon Jul 09 17:09:03 ICT 2018 (1531130943233)
Waiting for possible Shutdown/StopTestNow/Heapdump message on port
4445 summary + 1 in 00:00:01 = 1.4/s Avg: 346 Min: 346
Max: 346 Err: 1 (100.00%) Active: 1 Started: 1 Finished: 0
summary + 6 in 00:00:01 = 5.1/s Avg: 179 Min: 176 Max:
184 Err: 0 (0.00%) Active: 0 Started: 2 Finished: 2 summary =
7 in 00:00:02 = 3.7/s Avg: 203 Min: 176 Max: 346 Err: 1
(14.29%) Tidying up ... # Mon Jul 09 17:09:05 ICT 2018
(1531130945291) ... end of run
Could anyone can help me ?

CSV Data Set Config filename can be tricky in different environments,
Notice you can use absolute path (not in distributed test) but it may be specific for each OS.
You can use Relative path according to path of the active test plan
Notice that Linux can be case sensitive so make sure driven_data.csv all in lower case
Filename Name of the file to be read. Relative file names are resolved with respect to the path of the active test plan. For distributed testing, the CSV file must be stored on the server host system in the correct relative directory to where the JMeter server is started. Absolute file names are also supported, but note that they are unlikely to work in remote mode, unless the remote server has the same directory structure. If the same physical file is referenced in two different ways - e.g. csvdata.txt and ./csvdata.txt - then these are treated as different files. If the OS does not distinguish between upper and lower case, csvData.TXT would also be opened separately.

Double check that:
The file /data/driven_data.csv exists, you will have to copy it from the master node as JMeter doesn't do this automatically
The user account has read access to the /data/driven_data.csv path, if not - grant it using the following command:
sudo chmod -R a+rX /data/driven_data.csv
See online chmod manual page or type man chmod in your terminal to get full help on the command.
Just FYI: the easiest way to implement the data-driven distributed testing in JMeter is using HTTP Simple Table Server which allows sharing the same data file between multiple slave instances so you will not have to copy the file to the remote slaves.
You can install HTTP Simple Table Server using JMeter Plugins Manager

Related

In jmeter 5.4.3 v have used stoptest.sh command. Now am not able to run any Test suite . can someone help to solve it

error Waiting for possible Shutdown/StopTestNow/HeapDump/ThreadDump message on port 4445
on linux
We are not able to provide a comprehensive answer without:
Knowing whether it is standalone or distributed mode
What does STDOUT say
What does jmeter.log say on all machines
If the Waiting for possible Shutdown/StopTestNow/HeapDump/ThreadDump message on port 4445 message is absolutely normal, it's just an information that JMeter is listening for shutdown or dump signals
You should also see Summariser output once per 30 seconds with some baseline statistical metrics looking like:
summary + 5 in 00:00:26 = 0.2/s Avg: 246 Min: 59 Max: 498 Err: 0 (0.00%) Active: 1 Started: 1 Finished: 0
summary + 1 in 00:00:10 = 0.1/s Avg: 128 Min: 128 Max: 128 Err: 0 (0.00%) Active: 0 Started: 1 Finished: 1
Demo:

JMeter port issue

I need to run JMeter in distributed mode behind a firewall, as far as I know JMeter requires 3 ports:
1099 by default
server.rmi.localport ( 50000 in my case )
client.rmi.localport ( 60000 in my case )
Here is how I run my servers
jmeter-server -Dserver.rmi.localport=50000 -Djava.rmi.server.hostname=<PUBLIC IP> -Jserver.rmi.ssl.disable=true
How I run the client
jmeter -n -t sample-test.jmx -l result.log -e -o /var/www/html/jmeter -Djava.rmi.server.hostname=<PUBLIC IP> -Dclient.rmi.localport=60000 -Jserver.rmi.ssl.disable=true -R<SERVER IPS>
When I run the client command the test gets executed on the servers well. But the servers seems to not be able to send any data back to the client, the client gets stuck WITHOUT printing those example lines when it works:
summary + 2 in 00:00:03 = 0.7/s Avg: 282 Min: 278 Max: 286 Err: 0 (0.00%) Active: 42 Started: 42 Finished: 0
summary + 20400 in 00:00:30 = 688.7/s Avg: 105 Min: 100 Max: 292 Err: 0 (0.00%) Active: 500 Started: 500 Finished: 0
summary = 20402 in 00:00:32 = 631.0/s Avg: 105 Min: 100 Max: 292 Err: 0 (0.00%)
summary + 34429 in 00:00:29 = 1192.6/s Avg: 104 Min: 99 Max: 271 Err: 0 (0.00%) Active: 0 Started: 500 Finished: 500
summary = 54831 in 00:01:01 = 895.8/s Avg: 105 Min: 99 Max: 292 Err: 0 (0.00%)
Tidying up remote # Tue Jan 25 21:34:28 UTC 2022 (1643146468961)
... end of run
On the client side, I ran
lsof -i -P -n | grep LISTEN
which gives me
java 1267 root 131u IPv4 78926 0t0 TCP *:60002 (LISTEN)
java 1267 root 132u IPv4 78927 0t0 TCP *:60001 (LISTEN)
Which really surprise me I was expecting to only see the port 60000, I wasn't expecting at all to see two ports and none of them being 60000.
So, when I open the specific 60001,60002 ports on my firewall everything works well. But I really don't understand this behavior at all because everything I read about JMeter just tells to open ( in my case ) the port 60000 (1099,50000 too, but those work well ), it is never mentioned to open 60001,60002 ports ... I'm kind of lost.
Thanks.
As per Remote hosts and RMI configuration chapter of the JMeter Properties Reference:
client.rmi.localport - Parameter that controls the RMI ports used by RemoteSampleListenerImpl and RemoteThreadsListenerImpl (The Controller)
Default value is 0, which means ports are randomly assigned. If this is non-zero, it will be used as the base for local port numbers for the client engine. At the moment JMeter will open up to three ports beginning with the port defined in this property.
You may need to open corresponding ports in the firewall on the Controller machine.
You may find JMeter Distributed Testing with Docker article useful as it explains all the RMI networking related stuff
The only place I could find referring to my issue to:
https://bz.apache.org/bugzilla/show_bug.cgi?id=65028
This guy is right, tutorials don't talk about that and the documentation does not highlight this specific point.
This section tells "If this is non-zero, it will be used as the base for local port numbers for the client engine. At the moment JMeter will open up to three ports beginning with the port defined in client.rmi.localport. If there are any firewalls or other network filters between JMeter client and server, you will need to make sure that they are set up to allow the connections through. If necessary, use monitoring software to show what traffic is being generated."
https://jmeter.apache.org/usermanual/remote-test.html#tips
I read it too quickly.
Hope my problem could help some else ! :)

Jmter stays in Tidying up state end of run and it takes around 2 hours to generated the HTML report for a large volume of results

Using below command I ran a Jmter plan per 2 hours in Centos 7 environment.
nohup jmeter -n -t HTTP_BasicPlan.jmx -l GrafanaTestSummaryreport.csv -j mylog.log -e -o TestResultReportFolder > myprogram.out & 2>&1
At the end of the exaction . TO generate the HTML report, it takes another 2 hours and then generates the HTML report.
summary = 177532912 in 02:15:14 = 21878.8/s Avg: 5 Min: 0 Max: 933392 Err: 13 (0.00%)
Tidying up ... # Thu Oct 07 08:33:22 UTC 2021 (1633595602066)
... end of run
Anyway to speed up the report generation? Thank you.

Jmeter start test run from command line and get result

I want to execute jmeter from command line and get the result on screeen. I am using following command for this,
jmeter -n -t "D:\\apache-jmeter-4.0\\bin\\Test.jmx" -l result.jtl
This command displays the result on screen on summary format like below,
summary + 1 in 2s = 0.5/s Avg: 1917 Min: 1917 Max: 1917 Err: 0 (0.00%) Active: 10 Started: 10 Finished: 0
summary + 99 in 6s = 17.9/s Avg: 482 Min: 203 Max: 2009 Err: 0 (0.00%) Active: 0 Started: 10 Finished: 10
summary = 100 in 6s = 18.1/s Avg: 497 Min: 203 Max: 2009 Err: 0 (0.00%)
And data in result.jtl is
2018/06/05 20:34:58.307,1917,Home Page,200,OK,Thread Group 1-9,text,true,138969,629
2018/06/05 20:34:58.278,2001,Home Page,200,OK,Thread Group 1-5,text,true,138969,658
......
I read in document that Jmeter calculates the summary from this data to display on screen and raw data is directed and stored to result.jtl file. But I want to get the same raw data on console which I may pick for further custom checks and calculation. Is it possible to get the result.jtl data on screen ? if yes, please suggest me how it can be achieved.
Thanks
If you want just to print .jtl file contents into terminal you can use type or more commands like:
type result.jtl
You might also be interested in JMeterPluginsCMD Command Line Tool which allows generation of different tables and charts basing on .jtl results file from command line.
Also be aware that according to JMeter Best Pratices you should always use the latest JMeter version (JMeter 4.0 as of now) as newer versions normally contain bug fixes, performance improvements and new features and JMeter 2.11 is 4+ years old. For example since JMeter 3.0 it is possible to generate HTML Reporting Dashboard.

Jmeter Distributed Environment : Active Threads Over Time : total not displayed

I have a JMeter distributed environment (localhost and host1)
localhost (master and slave)
host1 (slave).
I have a thread group in my test plan with 10 users and 50 loops.
Running the test as bellow :
jmeter.bat -t myscript.jmx -n -r -l results.csv
My test runs successfully and I get a total of 20 threads as displayed on the output
summary + 800 in 30,2s = 26,5/s Avg: 580 Min: 33 Max: 2315 Err: 0 (0,00%) Active: 20 Started: 20 Finished: 0
But when I try to graph "jp#gc - Active Threads Over Time" with data in results.CSV , I just get the number of active threads = 10 .
My question is how can I get a Grape with all 20 threads running?
The main problem is that I suspect that result.csv is not complete and does not contain all performance information such as response time etc.
For JMeter version < 5.0 :
This is because you need to add a unique ID per injector in Thread Group name as per documentation:
https://jmeter-plugins.org/wiki/ActiveThreadsOverTime/
For example:
If running only 1 JMeter per machine:
${__machineName()}_My Threadgroup name
If running multiple injectors per machine::
${__P(JVM_ID,1)}_My Threadgroup name
For version >= JMETER 5.0:
It will work correctly Out Of The Box as per this fix:
https://bz.apache.org/bugzilla/show_bug.cgi?id=62684

Resources