-1

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,

ganesh.go
  • 39
  • 8

1 Answers1

0

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:

  1. Download JMeter Plugins Manager:

    wget https://jmeter-plugins.org/get/ -O /opt/apache-jmeter-5.2.1/lib/ext/jmeter-plugins-manager.jar
    
  2. 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/
    
  3. 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
    
  4. Install the PerfMon Plugin:

    /opt/apache-jmeter-5.2.1/bin/./PluginsManagerCMD.sh install jpgc-perfmon
    
  5. 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

Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • Thank you. Now earlier error is gone.However getting new error as : Creating summariser Created the tree successfully using /root/apache-jmeter-5.2.1/bin/AWS.jmx Starting standalone test @ Mon Mar 01 09:23:36 UTC 2021 (1614590616582) Waiting for possible Shutdown/StopTestNow/HeapDump/ThreadDump message on port 4445 Uncaught Exception java.lang.NoClassDefFoundError: kg/apc/perfmon/metrics/MetricParams in thread Thread[StandardJMeterEngine,5,main]. See log file for details. I have updated question with log details . – ganesh.go Mar 01 '21 at 09:30
  • Hello , I think I managed to solve above error with https://www.youtube.com/watch?v=F-dHii9qZD0. – ganesh.go Mar 01 '21 at 10:12