My problem is regarding Jmeter when I am trying to use the non-GUI mode - jmeter

When I am passing the command in command prompt then I am getting the below error-
C:\Users\ShivangiT\Downloads\apache-jmeter-5.3\apache-jmeter-5.3\bin>Jmeter.bat -Jjmeter.save.saveservice.output_format=xml -n -t \Users\ShivangiT\Downloads\apache-jmeter-5.3\apache-jmeter-5.3\bin\vieweventpage.jmx -l \Users\ShivangiT\Downloads\apache-jmeter-5.3\apache-jmeter-5.3\bin\rr.jtl
Creating summariser <summary>
Created the tree successfully using \Users\ShivangiT\Downloads\apache-jmeter-5.3\apache-jmeter-5.3\bin\vieweventpage.jmx
Starting standalone test # Fri Aug 21 07:29:38 BST 2020 (1597991378434)
Waiting for possible Shutdown/StopTestNow/HeapDump/ThreadDump message on port 4445
summary = 41 in 00:00:14 = 2.9/s Avg: 5256 Min: 7 Max: 13688 Err: 13 (31.71%)
Tidying up ... # Fri Aug 21 07:29:52 BST 2020 (1597991392905)
... end of run
The JVM should have exited but did not.
The following non-daemon threads are still running (DestroyJavaVM is OK):
Thread[DestroyJavaVM,5,main], stackTrace:
Thread[AWT-EventQueue-0,6,main], stackTrace:sun.misc.Unsafe#park
java.util.concurrent.locks.LockSupport#park
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject#await
java.awt.EventQueue#getNextEvent
java.awt.EventDispatchThread#pumpOneEventForFilters
java.awt.EventDispatchThread#pumpEventsForFilter
java.awt.EventDispatchThread#pumpEventsForHierarchy
java.awt.EventDispatchThread#pumpEvents
java.awt.EventDispatchThread#pumpEvents
java.awt.EventDispatchThread#run
Thread[AWT-Shutdown,5,system], stackTrace:java.lang.Object#wait
sun.awt.AWTAutoShutdown#run
java.lang.Thread#run
Can anybody please help me with this.

This is a known issue of JMeter 5.3 when test plan contains Http(s) Test script recorder.
The workaround is to remove it.
See:
https://bz.apache.org/bugzilla/show_bug.cgi?id=64479
Alternatively you can try nightly build:
https://ci.apache.org/projects/jmeter/nightlies/

Shiva, I would suggest that you should use the older version of JMeter always. The reason is very simple. There is not much of a change in JMeter since JMeter 4. JMeter is more inclined towards its compatibility with JDK 11 as currently, it supports JDK 8 flawlessly in the older versions. Use JMeter 4 from the JMeter official archive and you'll be able to execute everything smoothly. No need to look for workarounds. Make sure you use JMeter 4

Related

Error while generating report in apache-jmeter-5.4.1.tgz

sh jmeter.sh -n -t filePath.jmx -l outFilePath.jtl -e -o folderPath
Error generating the report: org.apache.jmeter.report.dashboard.GenerationException: Error while processing samples: Consumer failed with message :Consumer failed with message :Consumer failed with message :Consumer failed with message :Begin size 0 is not equal to fixed size 5
In resume
Consumer failed with message :Begin size 0 is not equal to fixed size 5
currently using Java version "17" 2021-09-14 LTS
MacOS big SUR version 11.4
the properties files are fresh and values are equal to the default ones
Jmeter 5.4.1
outFile.jtl
timeStamp,elapsed,label,responseCode,responseMessage,threadName,dataType,success,failureMessage,bytes,sentBytes,grpThreads,allThreads,URL,Latency,IdleTime,Connect
1632430450882,1117,HTTP Request,200,OK,FIRST_Jmeter_Test 1-3,text,true,,3824,557,3,3,Url_hidden,1111,0,256
1632430450448,1755,HTTP Request,200,OK,FIRST_Jmeter_Test 1-2,text,true,,3836,557,3,3,Url_hidden,1755,0,690
1632430450448,1755,HTTP Request,200,OK,FIRST_Jmeter_Test 1-1,text,true,,3828,557,3,3,Url_hidden,1755,0,690
1632430452312,585,HTTP Request,200,OK,FIRST_Jmeter_Test 1-2,text,true,,3836,557,3,3,Url_hidden,585,0,144
1632430452238,758,HTTP Request,200,OK,FIRST_Jmeter_Test 1-3,text,true,,3832,557,3,3,Url_hidden,757,0,137
1632430452301,806,HTTP Request,200,OK,FIRST_Jmeter_Test 1-1,text,true,,3828,557,3,3,Url_hidden,805,0,136
1632430452962,550,HTTP Request,200,OK,FIRST_Jmeter_Test 1-2,text,true,,3824,557,3,3,Url_hidden,550,0,152
1632430453328,593,HTTP Request,200,OK,FIRST_Jmeter_Test 1-1,text,true,,3828,557,2,2,Url_hidden,592,0,135
1632430453276,815,HTTP Request,200,OK,FIRST_Jmeter_Test 1-3,text,true,,3840,557,1,1,Url_hidden,814,0,142
The thread run successfully and the jtl file is created as well.
I quite new on Jmeter and tried to see where that "size" attribute is currently locate to see how change it, but could not find it on any *.properties file
any though how can be this fixed, what the message is referring to?
thanks
This error is likely due to an incompatibility of JMeter with Java 17 (as mentioned by Dmitri T).
Whilst we wait for a fix, a workaround would be downgrading to Java 16. I can confirm this solved the issue for me.
I had the same issue with:
MacOS big SUR version 11.6
Jmeter 5.4.1 (installed via brew)
Temurin 11 (LTS) OpenJDK & Temurin 8 (LTS) OpenJDK
Running Jmeter with Java 8 solved my issue. The problem was, that Jmeter always used Java 11. I struggled some days to find out, how to set the Jmeter Java version:
set the correct Java 8 Home in: /usr/local/Cellar/jmeter/5.4.1/bin/jmeter:
JAVA_HOME=$JAVA_8_HOME exec "/usr/local/Cellar/jmeter/5.4.1/libexec/bin/jmeter" "$#"
Maybe there are easier ways to set Java 8 for Jmeter - but this was the only solution which worked for me.
I had Java 8 installed however, the JMeter was picking up Java 1.17 which was nowhere in my system. So uninstalling and reinstalling jmeter, worked like a charm for me.
I cannot reproduce your issue using:
openjdk:8-jre-alpine docker image
JMeter 5.4.1
Test plan Test.jmx from extras folder of JMeter
Demo:
If you cannot reproduce the above behaviour I think you made some changes either to Results File Configuration or to Reporting Configuration or both so you need to inspect all the JMeter Properties which differ from the defaults and restore their values to the original ones.
If you need further support you need to share at least first 2 lines of your outFilePath.jtl results file. Better if possible the full file and all the .properties files from JMeter's "bin" folder.
exec commandline /usr/libexec/java_home -V
enter image description here
replace bin of jmeter JAVA_HOME
enter image description here
and then ,it is success.

Jmeter master slave not all threads finishing

I have a master/slave for jmeter set up using jmeter 5.1
For time to time I am noticing the tests just hangs up while waiting for threads to shutdown.
In the jmeter.logs I am seeing:
2020-02-06 00:06:35,100 INFO o.a.j.r.Summariser: summary + 9 in 00:30:34 = 0.0/s Avg: 5647 Min: 5520 Max: 5833 Err: 0 (0.00%) Active: 1 Started: 4 Finished: 3
I tried waiting but it never finishes this 1 active thread and it causes issue for rest of the steps I have in the pipeline to read the jmeter test result file and generate HTML report.
Any suggestions how to debug this?
I saw this post:
Threads keep running even after test finishes in Jmeter
But would be nice to understand the issue, rather than just forcing the threads to stop.
Regards,
Vikas
If you want to "understand" the issue you need to understand what this thread is doing and the only way to get the information is taking a JVM thread dump, the options are in:
Starting from JMeter version 3.2 there is an option to take a thread dump directly from JMeter GUI
You can use jstack tool and provide to it the PID of the Java process where JMeter is running
On Linux you can use kill -3 command which will print the status of threads into the console window
You can also check jmeter-server.log for for any suspicious entries.

Show aggregate report info in console when running jmeter tests with mvn

I have a mvn project in which is also integrated jmeter, to test performance. So far I have 6 thread groups in my test plan, all of them contains HTTP Requests. I run the tests using the command "mvn clean verify" from jmeter-maven plugin. Among the results I found multiple rows like this:
summary + 1 in 00:00:02 = 0.6/s Avg: 208 Min: 208 Max: 208 Err: 0 (0.00%) Active: 6 Started: 12 Finished: 6
I would need some extra information in console, especially the name and the avg time of each thread group or of the HTTP Request that ran. For example, something similar with aggregate report from GUI mode :
Label Samples Average Median 90% Line 95% Line 99% Line Min Max ...
AppleCodeRequest 6 196 119 279 284 284 108 284
PearCodeRequest 3 382 485 490 490 490 173 490
I want this because I am using a sh script to run the tests and I would like to trigger some performance issues before opening the html reports.
Is there any way to obtain this? Maby some user properties (even if I searched for one and no result) or some workaround ?
The easiest solution is going for a plugin like BlazeMeter Uploader, this way you will be able to observe real time test metrics in a fancy web UI. You can install BlazeMeter Uploader plugin using JMeter Plugins Manager
Alternative solution would be using JMeterPluginsCMD Command Line Tool.
Add the next lines to your pom.xml file
<configuration>
<jmeterExtensions>
<artifact>kg.apc:jmeter-plugins-cmd:2.2</artifact>
<artifact>kg.apc:jmeter-plugins-synthesis:2.2</artifact>
<artifact>kg.apc:jmeter-plugins-dummy:0.2</artifact>
<artifact>kg.apc:cmdrunner:2.0</artifact>
<artifact>kg.apc:jmeter-plugins-filterresults:2.2</artifact>
<artifact>kg.apc:jmeter-plugins-cmn-jmeter:0.6</artifact>
</jmeterExtensions>
<!-- The plugin uses some broken dependencies
An alternative is to set this to true and use excludedArtifacts, see below
-->
<downloadExtensionDependencies>false</downloadExtensionDependencies>
<propertiesJMeter>
<jmeter.save.saveservice.autoflush>true</jmeter.save.saveservice.autoflush>
</propertiesJMeter>
</configuration>
Add another Thread Group to your Test Plan with 1 user and infinite number of loops
Add JSR223 Sampler to your Thread Group
Put the following code into "Script" area:
SampleResult.setIgnore()
def resultFile = new File('../results').list().first()
"java -jar ../lib/ext/cmdrunner-2.0.jar --tool Reporter --generate-csv temp.csv --input-jtl ../results/$resultFile --plugin-type AggregateReport".execute().waitFor()
println("cat temp.csv".execute().text)
new File("temp.csv").delete()
Control how frequently you want to see this info using i.e. Constant Timer
You should be able to see the results in the console window:

Sonarqube - Resolution changed to FIXED

I have a strange behaviour while analysing my Java Code.
The analysis is done on a daily basis.
On the first run some issue are identified, so far so good.
After the next run there are issues marked as Fixed.
The Message i got in sonarQube:
Juli 2015 10:33 Uhr Created
Juli 2015 20:30 Uhr Resolution changed to FIXED
Status changed to CLOSED (was OPEN)
But there was no change at this File between the two runs.....
Java: JDK 1.8.0_u45
SonarQube: 5.1.1
Any Idea???
Thanks in advance
Kai

Teamcity Configuration Settings

I need to know the teamcity settings which prevents the re-trigger/trigger of outdated builds/jobs if the new builds are successful.
I am facing a issue where teamcity jobs can be re triggered even if the next builds are successful.And If the trigger event is fired before, then it must stop teamcity to run that job if the latest build is successful.
So I have to 2 jobs in TC for 1 branch -- Build-Precheck and the other is Build-compile
So I could see that Build-compile is just picking the latest available successful build from Build-Precheck and then queing up the next which may be the outdated build.
Build-Precheck is just taking 2 min to finish the builds , it quickly triggers the latest builds , I guess following the principal First In First Out
Build-Precheck
06 Oct 14 14:33 - 14:35 (2m:01s) –7.1.4345
06 Oct 14 14:41 - 14:43 (2m:16s)- 7.1.4346
06 Oct 14 14:45 - 14:47 (2m:10s)- 7.1.4347
Build-compile
06 Oct 14 14:35 - 15:00 -7.1.0.4345
06 Oct 14 14:52 - 15:20 (28m:02s)- 7.1.4347
06 Oct 14 16:08 - 16:33 (24m:52s)- 7.1.4346
Is there any fix for this that TC runs incremental builds rather than outdated ones
Sounds like you are looking for Configuring Build Trigger.
AFAIK, there isn't a way to cancel queued builds if a given build passes. However, you can adjust the Build Triggers that queue those builds. Most likely, you'll need to set the Quiet Period on your VCS Build Trigger to longer than it takes for your build.
For example, if your full build takes 5 minutes, you should set the Quiet Period to 7. This way additional builds wont queue while a build is running.

Resources