Unable to open Jmeter frm cmd prompt - jmeter

Facing this exception while trying to open Jmeter.
java.lang.IllegalArgumentException: Problem loading XML from:'D:\PerformanceTest\trunk\v2\Jmeter\loadscript\loadscript.jmx'.
Cause:
CannotResolveClassException: com.tag.jmeter.ext.config.PropertyReader
Detail:com.thoughtworks.xstream.converters.ConversionException:
---- Debugging information ----
cause-exception : com.thoughtworks.xstream.converters.ConversionException
cause-message :
first-jmeter-class : org.apache.jmeter.save.converters.HashTreeConverter.unmarshal(HashTreeConverter.java:67)
class : org.apache.jmeter.save.ScriptWrapper
required-type : org.apache.jmeter.save.ScriptWrapper
converter-type : org.apache.jmeter.save.ScriptWrapperConverter
path : /jmeterTestPlan/hashTree/hashTree/com.tag.jmeter.ext.config.PropertyReader
line number : 50

It's because the author of the script for some unknown reason included this useless plugin into his test plan.
You need to install the plugin in order to be able to open it in JMeter
I would suggest to remove the plugin from the test plan on next available opportunity and switch to built-in mechanisms for configuring JMeter and reading properties, if reading an external .properties file is a must you can pass it to JMeter via -q command-line argument

Related

How to install plugin manager and perfmon metric collector on remote server in Non- GUI mode?

I have installed jmeter 5.2.1 on one of remote AWS server.
I want to collect summary report of response and server information as well with perfmon metric.
I have downloaded jmeter-plugins-manager-1.6.jar and jmeter-plugins-perfmon-2.1.jar and copied to /lib/ext
I then created a test script from jmeter on my local machine and copied to server and tried to run the same jmeter -n -t AWS.jmx -l awsresults.jtl
But I am getting an error as :
Error in NonGUIDriver java.lang.IllegalArgumentException: Problem loading XML from:'/root/apache-jmeter-5.2.1/bin/AWS.jmx'.
Cause:
ClassNotFoundException: kg.apc.jmeter.vizualizers.CorrectedResultCollector
Detail:com.thoughtworks.xstream.converters.ConversionException:
---- Debugging information ----
cause-exception : java.lang.NoClassDefFoundError
cause-message : kg/apc/jmeter/vizualizers/CorrectedResultCollector
first-jmeter-class : org.apache.jmeter.save.SaveService$XStreamWrapper$1.realClass(SaveService.java:98)
class : org.apache.jmeter.save.ScriptWrapper
required-type : org.apache.jmeter.save.ScriptWrapper
converter-type : org.apache.jmeter.save.ScriptWrapperConverter
path : /jmeterTestPlan/hashTree/hashTree/hashTree/kg.apc.jmeter.perfmon.PerfMonCollector
line number : 219
version : 5.2.1
When I run this on local machine in jmeter its working as expected.
Can someone please help me to understand and solve the error.?
Edit:
`
2021-03-01 09:23:36,931 INFO k.a.j.p.PerfMonCollector: PerfMon metrics will be stored in /tmp/perfmon_7034792572732251249.jtl
2021-03-01 09:23:36,931 ERROR o.a.j.JMeter: Uncaught exception in thread Thread[StandardJMeterEngine,5,main]
java.lang.NoClassDefFoundError: kg/apc/perfmon/metrics/MetricParams
at kg.apc.jmeter.perfmon.PerfMonCollector.initiateConnector(PerfMonCollector.java:200) ~[jmeter-plugins-perfmon-2.1.jar:?]
at kg.apc.jmeter.perfmon.PerfMonCollector.initiateConnectors(PerfMonCollector.java:175) ~[jmeter-plugins-perfmon-2.1.jar:?]
at kg.apc.jmeter.perfmon.PerfMonCollector.testStarted(PerfMonCollector.java:126) ~[jmeter-plugins-perfmon-2.1.jar:?]
at org.apache.jmeter.reporters.ResultCollector.testStarted(ResultCollector.java:351) ~[ApacheJMeter_core.jar:5.2.1]
at kg.apc.jmeter.vizualizers.CorrectedResultCollector.testStarted(CorrectedResultCollector.java:28) ~[jmeter-plugins-cmn-jmeter-0.4.jar:?]
at org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfStart(StandardJMeterEngine.java:206) ~[ApacheJMeter_core.jar:5.2.1]
at org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:381) ~[ApacheJMeter_core.jar:5.2.1]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_282]
Caused by: java.lang.ClassNotFoundException: kg.apc.perfmon.metrics.MetricParams
at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[?:1.8.0_282]
at java.lang.ClassLoader.loadClass(ClassLoader.java:418) ~[?:1.8.0_282]
at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_282]
... 8 more
2021-03-01 09:23:36,937 INFO o.a.j.r.ResultCollector: Shutdown hook started
2021-03-01 09:23:36,937 INFO o.a.j.r.ResultCollector: Shutdown hook ended
`
Thanks,
The error means that you don't have the PerfMon plugin installed on your AWS instance, I don't think that the current version of JMeter Plugins Manager can detect/install the missing plugins in non-GUI mode so you will need to do this manually.
Something like:
Download JMeter Plugins Manager:
wget https://jmeter-plugins.org/get/ -O /opt/apache-jmeter-5.2.1/lib/ext/jmeter-plugins-manager.jar
Download JMeter Plugins Command Line Runner
wget https://repo1.maven.org/maven2/kg/apc/cmdrunner/2.2/cmdrunner-2.2.jar -P /opt/apache-jmeter-5.2.1/lib/
Install JMeter Plugins Manager Command Line Utility:
java -cp /opt/apache-jmeter-5.2.1/lib/ext/jmeter-plugins-manager.jar org.jmeterplugins.repository.PluginManagerCMDInstaller
Install the PerfMon Plugin:
/opt/apache-jmeter-5.2.1/bin/./PluginsManagerCMD.sh install jpgc-perfmon
That's it, now you should be able to execute your test
P.S. According to JMeter Best Practices you should always be using the latest version of JMeter so consider upgrading to JMeter 5.4.1 or whatever its the current JMeter latest stable version

Application Logs monitor script linux to generate mail on ERROR keyword in the log file

I am developing a script to monitor java applications Log files and generate a mail if the logs contain "ERROR keyword" and send mail along with the printed exception on that line.
Also need to make sure that the mail for a given exception is sent only once and repetitive mails are not being sent.
Request help on this.
Below is a sample "ERROR" (exception) log which is generated by the java application.
nsConfig$$EnhancerBySpringCGLIB$$3afe08b : name: NODE_LEFT
2020-08-24 08:01:45.847 INFO 132723 --- [disco-event-worker-#102] nsConfig$$EnhancerBySpringCGLIB$$3afe08b : waNodes: 1
2020-08-24 08:01:45.849 INFO 132723 --- [exchange-worker-#103] .i.p.c.GridCachePartitionExchangeManager : Skipping rebalancing (nothing scheduled) [top=AffinityTopologyVersion [topVer=11, minorTopVer=0], force=false, evt=NODE_LEFT, node=a8161e0e-1441-4f48-b80a-d60c48a46dc8]
2020-08-24 08:01:46.121 ERROR 132723 --- [query-#134] o.a.i.i.p.q.h.t.GridMapQueryExecutor : Failed to execute local query.
org.apache.ignite.cache.query.QueryCancelledException: The query was cancelled while executing.
at org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onQueryRequest0(GridMapQueryExecutor.java:504)
at org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onQueryRequest(GridMapQueryExecutor.java:353)
at org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor.onMessage(GridMapQueryExecutor.java:210)
at org.apache.ignite.internal.processors.query.h2.twostep.GridMapQueryExecutor$2.onMessage(GridMapQueryExecutor.java:170)
at org.apache.ignite.internal.managers.communication.GridIoManager$ArrayListener.onMessage(GridIoManager.java:2333)
at org.apache.ignite.internal.managers.communication.GridIoManager.invokeListener(GridIoManager.java:1556)
at org.apache.ignite.internal.managers.communication.GridIoManager.processRegularMessage0(GridIoManager.java:1184)
at org.apache.ignite.internal.managers.communication.GridIoManager.access$4200(GridIoManager.java:125)
at org.apache.ignite.internal.managers.communication.GridIoManager$9.run(GridIoManager.java:1091)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
2020-08-24 08:01:46.149 ERROR 132723 --- [query-#136] o.a.i.i.p.q.h.t.GridMapQueryExecutor : Failed to execute local query.

Jmeter plugin error for PerfMonCollector listener while running Performance Metrics Collector

I am trying to run performance test using jmeter in non-gui mode to map CPU/Memory Utilization for the server machine. However i am experiencing an error while running the test in non-gui mode.
Error in NonGUIDriver java.lang.IllegalArgumentException: Problem loading XML from:'/Users/vikasgupta/Downloads/apache-jmeter-5.2.1/bin/Check FreePlays.jmx'.
Cause:
CannotResolveClassException: kg.apc.jmeter.perfmon.PerfMonCollector
Detail:com.thoughtworks.xstream.converters.ConversionException:
---- Debugging information ----
cause-exception : com.thoughtworks.xstream.converters.ConversionException
cause-message :
first-jmeter-class : org.apache.jmeter.save.converters.HashTreeConverter.unmarshal(HashTreeConverter.java:67)
class : org.apache.jmeter.save.ScriptWrapper
required-type : org.apache.jorphan.collections.ListedHashTree
converter-type : org.apache.jmeter.save.ScriptWrapperConverter
path : /jmeterTestPlan/hashTree/hashTree/hashTree/kg.apc.jmeter.perfmon.PerfMonCollector
line number : 266
version : 5.0 r1840935
PerfMon (Servers Performance Monitoring) plugin
CannotResolveClassException: kg.apc.jmeter.perfmon.PerfMonCollector
Your test contains PerfMon Metrics Collector listener and your JMeter installation doesn't have this JMeter PerfMon Plugin.
Just install PerfMon (Servers Performance Monitoring) plugin using JMeter Plugins Manager and you should be able to open the script.
If there are any other missing plugins - JMeter Plugins Manager will detect them and ask you whether it should download them

deploying node js web app on aws elastic beanstalk - shows 502 bad gateway nginx/1.8.0

I already changed my web app's port from 3030 to 8081(eb-default). But I still get the "502" bad gateway error.
here is my log file.
[2016-03-26T03:26:57.709Z] DEBUG [12162] : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2016-03-26T03:26:57.709Z] DEBUG [12162] : Checking if the command processor should execute...
[2016-03-26T03:26:57.711Z] DEBUG [12162] : Checking whether the command is applicable to instance (i-525a308a)..
[2016-03-26T03:26:57.711Z] INFO [12162] : Command is applicable to this instance (i-525a308a)..
[2016-03-26T03:26:57.711Z] DEBUG [12162] : Checking if the received command stage is valid..
[2016-03-26T03:26:57.711Z] INFO [12162] : No stage_num in command. Valid stage..
[2016-03-26T03:26:57.711Z] INFO [12162] : Received command CMD-TailLogs: {"execution_data":"{\"aws_access_key_id\":\"ASIAJDXEY3WNMSVE3VPA\",\"signature\":\"+dKY04cX3l4Yd443BItdPVBn6Zc=\",\"security_token\":\"AQoDYXdzEG0a8AJjWGaSl9U1L1NRB5WqSKl198DCqFWu7qQ0veWFkdmJlQwhpIEGZrr41GOHTXgylzOx1aBAZPTp3lTU81YtRqDy4JDS9zysHCn2+6vNv9M1k\\\/ztyanXbzOdZB2ZmwKd9pnj5XwN1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TailLogs","api_version":"1.0","resource_name":"AWSEBAutoScalingGroup","request_id":"92b9ea79-f302-11e5-bc66-9761883272e3","command_timeout":"600"}
[2016-03-26T03:26:57.711Z] INFO [12162] : Command processor should execute command.
[2016-03-26T03:26:57.711Z] DEBUG [12162] : Storing current stage..
[2016-03-26T03:26:57.711Z] DEBUG [12162] : Stage_num does not exist. Not saving null stage. Returning..
[2016-03-26T03:26:57.712Z] INFO [12162] : Executing CMD-TailLogs - stage
[2016-03-26T03:26:57.712Z] INFO [12162] : Executing command: CMD-TailLogs...
[2016-03-26T03:26:57.716Z] DEBUG [12162] : Reading config file: /etc/elasticbeanstalk/.aws-eb-stack.properties
[2016-03-26T03:26:57.717Z] DEBUG [12162] : Refreshing metadata..
[2016-03-26T03:27:05.130Z] DEBUG [12162] : Refreshed environment metadata.
[2016-03-26T03:27:05.130Z] DEBUG [12162] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_ContainerConfigFileContent||commands..
[2016-03-26T03:27:05.132Z] DEBUG [12162] : Retrieving metadata for key: AWS::ElasticBeanstalk::Ext||_API||_Commands..
[2016-03-26T03:27:05.137Z] INFO [12162] : Found enabled addons: ["logpublish"].
[2016-03-26T03:27:05.368Z] INFO [12162] : Updating Command definition of addon logpublish.
[2016-03-26T03:27:05.368Z] DEBUG [12162] : Loaded definition of Command CMD-TailLogs.
[2016-03-26T03:27:05.368Z] INFO [12162] : Executing command CMD-TailLogs activities...
[2016-03-26T03:27:05.368Z] DEBUG [12162] : Setting environment variables..
[2016-03-26T03:27:05.368Z] INFO [12162] : Running AddonsBefore for command CMD-TailLogs...
[2016-03-26T03:27:05.369Z] DEBUG [12162] : Running stages of Command CMD-TailLogs from stage 0 to stage 0...
[2016-03-26T03:27:05.369Z] INFO [12162] : Running stage 0 of command CMD-TailLogs...
[2016-03-26T03:27:05.369Z] DEBUG [12162] : Loaded 1 actions for stage 0.
[2016-03-26T03:27:05.369Z] INFO [12162] : Running 1 of 1 actions: TailLogs...
I think It has something to do with stage num but I have no idea how to resolve this.
The problem was my code wasn't actually building locally. I fixed the code and upload it again.

com.thoughtworks.xstream.converters.ConversionException while running Jmeter from Jenkins shell

While running Jmeter jmx script from Jenkins command line I am getting the below error.
Error in NonGUIDriver java.lang.IllegalArgumentException:
Problem loading XML from:'/Users/msn/apache-jmeter-2.13/bin/testMsn.jmx',
conversion error com.thoughtworks.xstream.converters.ConversionException:
org/apache/commons/lang3/CharUtils : org/apache/commons/lang3/CharUtils
I have all the plug-in installed in my Jmeter/lib/ext.
Can someone help me point out which jar is missing to resolve this issue
Building in workspace /Users/Shared/Jenkins/Home/jobs/Jmeter-First/workspace
[workspace] $ /bin/sh -xe /Users/Shared/Jenkins/tmp/hudson6757313439371769855.sh
+ /Users/msn/apache-jmeter-2.13/bin/jmeter.sh -n -t /Users/msn/apache-jmeter- 2.13/bin/TestPlan.jmx
Error in NonGUIDriver java.lang.IllegalArgumentException: Problem loading XML from:'/Users/msn/apache-jmeter-2.13/bin/TestPlan.jmx', conversion error com.thoughtworks.xstream.converters.ConversionException: org/apache/commons/lang3/CharUtils : org/apache/commons/lang3/CharUtils
---- Debugging information ----
message : org/apache/commons/lang3/CharUtils
cause-exception : java.lang.NoClassDefFoundError
cause-message : org/apache/commons/lang3/CharUtils
first-jmeter-class : org.apache.jmeter.samplers.SampleSaveConfiguration. <clinit>(SampleSaveConfiguration.java:323)
class : org.apache.jmeter.save.ScriptWrapper
required-type : org.apache.jmeter.reporters.ResultCollector
converter-type : org.apache.jmeter.save.ScriptWrapperConverter
path : /jmeterTestPlan/hashTree/hashTree/hashTree/ResultCollector
line number : 46
version : 2.13 r1665067
------------------------------
Finished: SUCCESS
lang3.CharUtils is part of Apache Commons Lang library (http://mvnrepository.com/artifact/org.apache.commons/commons-lang3). So make sure it is available on your classpath (for example commons-lang3-3.3.2.jar).
Also, make sure you are not confusing it with Commons Lang library (http://mvnrepository.com/artifact/commons-lang/commons-lang) which is a predecessor of aforementioned Apache Commons Lang. For example commons-lang-2.4.jar.
After having the same issue and not being able to resolve it by the commonly suggested solution (installing plugins-manager.jar), I was able to fix the issue by reinstalling JMeter on my machine.

Resources