Jmeter stops working in NON GUI mode - jmeter

I am trying to post messages from JMETER into to Weblogic in non-gui mode. As soon as I execute the command
./jmeter.sh -n -t testplan.jmx -l log.jtl
Jmeter is not responding and displays the following info
Creating summariser <summary>
Created the tree successfully using JMS Point-to-Point.jmx
Starting the test # Mon Feb 13 09:51:22 GMT 2017 (1486979482989)
Waiting for possible shutdown message on port 4445.
Since I am trying to post messages to weblogic, I have also added wlfulclient.jar to lib dir of JMETER.
Both jmeter and wls are hosted on Linux servers
I have tried on 2.13 and 3.1 jmeter versions
Any hints on this issue?
Thanks

The message you display is a regular message and nothing indicates any issue occured.
Could you check the jmeter.log file for errors if any ?
And then provide more details on your test plan .

As others mentioned, what are you seeing in the jmeter.log? If you suspect that it is hanging which I doubt in your case, please launch JMeter using the following options. Launch JVISUALVM and collect thread dumps. From the thread dumps, try to figure out what the threads are doing.
java -Djsse.enableSNIExtension=false -XX:+HeapDumpOnOutOfMemoryError -Xms4g -Xmx4g -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:+CMSClassUnloadingEnabled -Dgroovy.use.classvalue=true -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.port=9010 -Dcom.sun.management.jmxremote.ssl=false -jar "<Jmeter install directory>\bin\ApacheJMeter.jar"

Related

VisualVm : cpu graph pannel show "Not supported for this JVM"

I'm going to debug springBoot application using visualvm. In local environment I could monitor,
heap
class
cpu
thread
But when I trying to monitor application instance running in remote server All grapg pannels works except cpu graph. cpu graph pannel show "Not supported for this JVM".
I have started jstatd deamon in remote server using following command
jstatd -p 1099 -J-Djava.security.policy=<(echo 'grant codebase "file:${java.home}/../lib/tools.jar" {permission java.security.AllPermission;};')
Any help to enable cpu matrics is highly appreciate
As I mentioned in my answer I have run jstatd deamon to collection and expose metrics.I couldn't recover cpu graph with this approach. Finally I decided to take another approach with jmx,
Run the application.jar with following command
java -Dcom.sun.management.jmxremote.port=15000 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.rmi.port=15001 -jar application.jar
Add jmx connection to remote visualVm
then I could get all the metrics

Jmeter perfmon :EXCEPTION_ACCESS_VIOLATION

I am trying to run a performance test of my server using jmeter perfmon plugin. But I am getting an error as in the following image. I have searched a lot for a solution but couldn't find an answer. I tried setting JVM arguments but it didn't work. Link to error image.How can I get it worked?
INFO 2019-12-30 14:11:25.114 [kg.apc.p] (): Binding UDP to 4444
INFO 2019-12-30 14:11:25.155 [kg.apc.p] (): Binding TCP to 4444
INFO 2019-12-30 14:11:25.161 [kg.apc.p] (): JP#GC Agent v2.2.3 started
INFO 2019-12-30 14:11:37.974 [kg.apc.p] (): Accepting new TCP connection
INFO 2019-12-30 14:11:37.978 [kg.apc.p] (): Yep, we received the 'test' command
INFO 2019-12-30 14:11:37.979 [kg.apc.p] (): Starting measures: memory: cpu:
A fatal error has been detected by the Java Runtime Environment:
EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000010014ed4, pid=12236, tid=6844
JRE version: Java(TM) SE Runtime Environment (11.0.4+10) (build 11.0.4+10-LTS)
Java VM: Java HotSpot(TM) 64-Bit Server VM (11.0.4+10-LTS, mixed mode, tiered, compressed oops, g1
gc, windows-amd64)
Problematic frame:
C [sigar-amd64-winnt.dll+0x14ed4]
No core dump will be written. Minidumps are not enabled by default on client versions of Windows
An error report file with more information is saved as:
E:\\hs_err_pid12236.log
If you would like to submit a bug report, please visit:
http://bugreport.java.com/bugreport/crash.jsp
The crash happened outside the Java Virtual Machine in native code.
See problematic frame for where to report the bug.
I downloaded another sigar 1.6.4 jar (1.6.4.129 (17.1.2016) release) from below link and replaced sigar jar with this in specific tool lib path (ServerAgent-2.2.3\lib).., then it worked for me.
https://javalibs.com/artifact/org.hyperic/sigar
Looking into JVM crashes occassionally with access violation when using Sigar.getProcMem with disabled Windows performance counters #77 issue it might be the case that Windows don't have performance counters enabled hence Sigar fails to query the CPU status from Windows PerfMon
Check if CPU (and other stats) are exposed in PerfMon
Try running Powershell and Server Agent as Administrator
Try using cmd.exe interpreter instead of powershell
Try running ServerAgent.bat --sysinfo to see if there are any errors there
Inspect e:\hs_err_pid12236.log file for any clues
If nothing helps be aware that you can use SSHMon plugin for server monitoring, it doesn't require server-side software installation
I faced the same issue. Error code as follows:
"JRE version: OpenJDK Runtime Environment (11.0+28) (build 11+28)
Java VM: OpenJDK 64-Bit Server VM (11+28, mixed mode, tiered, compressed oops, g1 gc, windows-amd64)
Problematic frame:
C [sigar-amd64-winnt.dll+0x14ed4]"
I downgraded the JDK and JRE to the version : 8u241
Go to the Oracle download page here and search for the below JRE & JDK and install it in the Windows server and then start the serverAgent.bat
jdk-8u241-windows-x64.exe
jre-8u241-windows-x64.exe
This should fix the issue 100% sure. It worked for me.
Follow the below step.
Disable firewall setting
if still having same issue
Download the below .dll file and replace it(lib folder)
https://github.com/cnstar9988/sigar/raw/master/sigar-amd64-winnt.dll
It was solved at my end using the below steps:
Download ‘jre 1.8’ from this link https://java.com/en/download/win10.jsp
Once the jre is installed, copy the folder named ‘jre1.8.0_261’.
Image
Visit the ServerAgent folder that was downloaded >> Paste the ‘jre1.8.0_261’ folder inside the ‘ServerAgent-2.2.1’ folder.
Open ‘startAgent.bat’ file in Notepad ++ >>Initially it would look like this
Image
Replace text ‘java’ with the path of java.exe that is within the jre folder placed inside the ServerAgent-2.2.1 folder
Open command prompt in the ServerAgent-2.2.1 folder path and enter ‘startAgent.bat’ file to run the file
Execute JMeter script and now error should not happen.

check_jvm Nagios plugin to monitor java threads and heap memory not running

I have a Nagios monitoring system to monitor servers. I have a server in which WebSphere portal has been installed. I want to configure a system in which when there is high CPU usage/thread count increases, it automatically takes a thread dump. For this, I am using nagios plugin check_jvm. This plugin uses a jar called JvmInspector.jar. JvmInspector.jar should list all the jvm names which are running in the system.
Usage of JvmInspector.jar is as follows:
java -jar JvmInspector.jar all
When I am running this, it is showing an empty result although I have a running WebSphere portal server running. Inspite of this, I tried to run 'check_jvm' plugin but it shows the following result:
[root#dev03 libexec]# sudo -u root /usr/local/nagios/libexec/check_jvm -n WebSphere_Portal -p threads -w 105 -c 135
UNKNOWN Can't connect to the JVM:
Can anybody help me in this?

Jmeter server.bat file error

Please give me solution for the below error.
Could not find ApacheJmeter_core.jar ... ... Trying JMETER_HOME=.. Found ApacheJMeter_core.jar Created remote object: UnicastServerRef [liveRef: [endpoint:192.168.8.108:50019 ,objID:[-30cb105c:15ca098204b:-7fff, 5736149660821635846]]]
I tried the below way also, am not able to launch
"I just hard coded the path in my jmeter_server.bat."
Am doing testing now.. if any one knows please update here.
This is not an error at all, it means that you successfully launched a JMeter slave which is now waiting for a command from the JMeter master.
So now you need to start JMeter Master using one of the following approaches:
Pass slave IP address via -R command-line argument like:
jmeter -R 192.168.8.108 -n -t test.jmx -l result.jtl
Define remote_hosts JMeter Property by adding the next line to user.properties file on JMeter Master node:
remote_hosts=192.168.8.108
References:
JMeter Distributed Testing Step-by-step
Apache JMeter Properties Customization Guide
If you need just to open JMeter GUI you will need to launch jmeter.bat script or alternatively directly call java from JMeter's "bin" folder like:
java -jar ApacheJMeter.jar

Jmeter GUI testplan jmx VS Jmeter Command line testplan jmx

What are the differences between GUI and Non_GUI JMX files ?
Why I am getting these errors ?
Can I just take a JMX file created by Jmeter
GUI and use it on command line Jmeter ?
I tried jmeter on my windows box, works !! Now I want to run this on some remote server ( LINUX ) which does not have GUI, I tried using command line jmeter
Command : ./jmeter.sh -n -t loop.jmx -l log.jtl
following is taken from jmeter.log
2015/03/04 14:21:53 INFO - jmeter.engine.StandardJMeterEngine: Running the test!
2015/03/04 14:21:53 INFO - jmeter.engine.util.CompoundVariable: Note: Function class names must contain the string: '.functions.'
2015/03/04 14:21:53 INFO - jmeter.engine.util.CompoundVariable: Note: Function class names must not contain the string: '.gui.'
2015/03/04 14:21:53 ERROR - jmeter.JMeter: Uncaught exception: java.lang.VerifyError: org.apache.xpath.functions.SecuritySupport
at java.lang.ClassLoader.defineClass(ClassLoader.java:275)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:69)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:540)
at java.t java.lang.ClassLoader.defineClass(ClassLoader.java:275)
I was able to resolve this issue after looking at this question
Causes of getting a java.lang.VerifyError
I also realized that, I can create JMX on GUI jmeter and use it over Commandline jmeter
.jmx files for GUI and non-GUI aren't different, JMeter .jmx files are basically XML files. Moreover, non-GUI way is the recommended option of running a JMeter test.
So use the following checklist:
Use the latest JMeter version (2.12 as for now)
Use the latest Java version. JMeter 2.12 is compatible with Java 8. It is recommended to use Java SDK from Oracle and if your operating system allows choose 64-bit version.
Make sure that JVM options are identical
You can check your JVM version and vendor by executing java --version command.

Resources