JMeter load-testing : ClassNotFoundException: com.blazemeter.jmeter.threads.concurrency.ConcurrencyThreadGroup

一曲冷凌霜 提交于 2019-12-12 03:53:59

问题


I'm trying non-GUI and distributed JMeter load-testing.

Before I go distributed, I tested it locally. I installed JMeter on my laptop and setup a testplan targeting the system under test. I installed the plugin manager and install the concurrent thread plugin. I found my JMX file to be correct and working, so I decided to rollout the distributed setting.

I setup three machines for load generation : load-1, load-2 and load-3. I installed JMeter as follow : apt update ; apt upgrade on all of them apt install jmeter on all of them copied the JARs located in /usr/share/jmeter/lib/ext of my laptop to all of them, in the same directory :

jmeter-plugins-casutg-2.1.jar
jmeter-plugins-cmn-jmeter-0.3.jar
jmeter-plugins-manager-0.11.jar

I started the JMeter server on two of them as follow :

export JMETER_HOME=/usr ; $JMETER_HOME/bin/jmeter-server -Djava.rmi.server.hostname=207.112.137.21
export JMETER_HOME=/usr ; $JMETER_HOME/bin/jmeter-server -Djava.rmi.server.hostname=207.112.137.22

I use the third one to start the distributed testing as follow :

jmeter -n -t ~/JMeter_API_TestPlan.jmx -R207.112.137.21,207.112.137.22

The distrubuted setting seems to start correctly, but the thread start fail probably because of a class not being found :

java.lang.ClassNotFoundException: com.blazemeter.jmeter.threads.concurrency.ConcurrencyThreadGroup (no security manager: RMI class loader disabled)

A I missing a JAR or a configuration parameter ?

The jmeter.log shows the following :

2017/06/23 09:34:33 INFO  - jmeter.util.JMeterUtils: Setting Locale to en_US 
2017/06/23 09:34:33 INFO  - jmeter.JMeter: Loading user properties from: /usr/share/jmeter/bin/user.properties 
2017/06/23 09:34:33 INFO  - jmeter.JMeter: Loading system properties from: /usr/share/jmeter/bin/system.properties 
2017/06/23 09:34:33 INFO  - jmeter.JMeter: Copyright (c) 1998-2014 The Apache Software Foundation 
2017/06/23 09:34:33 INFO  - jmeter.JMeter: Version 2.11.20151206 
2017/06/23 09:34:33 INFO  - jmeter.JMeter: java.version=1.8.0_131 
2017/06/23 09:34:33 INFO  - jmeter.JMeter: java.vm.name=OpenJDK 64-Bit Server VM 
2017/06/23 09:34:33 INFO  - jmeter.JMeter: os.name=Linux 
2017/06/23 09:34:33 INFO  - jmeter.JMeter: os.arch=amd64 
2017/06/23 09:34:33 INFO  - jmeter.JMeter: os.version=4.4.0-64-generic 
2017/06/23 09:34:33 INFO  - jmeter.JMeter: file.encoding=ANSI_X3.4-1968 
2017/06/23 09:34:33 INFO  - jmeter.JMeter: Default Locale=English (United States) 
2017/06/23 09:34:33 INFO  - jmeter.JMeter: JMeter  Locale=English (United States) 
2017/06/23 09:34:33 INFO  - jmeter.JMeter: JMeterHome=/usr/share/jmeter 
2017/06/23 09:34:33 INFO  - jmeter.JMeter: user.dir  =/usr/share/jmeter/lib/ext 
2017/06/23 09:34:33 INFO  - jmeter.JMeter: PWD       =/usr/share/jmeter/lib/ext 
2017/06/23 09:34:33 INFO  - jmeter.JMeter: IP: 127.0.1.1 Name: load-srv-1 FullName: load-srv-1.localdomain 
2017/06/23 09:34:33 INFO  - jmeter.services.FileServer: Default base='/usr/share/jmeter/lib/ext' 
2017/06/23 09:34:33 INFO  - jmeter.services.FileServer: Set new base='/home/ubuntu' 
2017/06/23 09:34:33 INFO  - jmeter.JMeter: Loading file: /home/ubuntu/JMeter_API_TestPlan.jmx 
2017/06/23 09:34:33 INFO  - jmeter.save.SaveService: Testplan (JMX) version: 2.2. Testlog (JTL) version: 2.2 
2017/06/23 09:34:33 INFO  - jmeter.save.SaveService: Using SaveService properties file encoding UTF-8 
2017/06/23 09:34:33 INFO  - jmeter.save.SaveService: Using SaveService properties version 2.6 
2017/06/23 09:34:33 INFO  - jmeter.save.SaveService: Using SaveService properties file version 1554411 
2017/06/23 09:34:33 INFO  - jmeter.save.SaveService: All converter versions present and correct 
2017/06/23 09:34:33 INFO  - jmeter.protocol.http.control.CookieManager: Settings: Delete null: true Check: true Allow variable: true Save: false Prefix: COOKIE_ 
2017/06/23 09:34:33 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase: Cannot find .className property for htmlParser, using default 
2017/06/23 09:34:33 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/html is  
2017/06/23 09:34:33 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for application/xhtml+xml is  
2017/06/23 09:34:33 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for application/xml is  
2017/06/23 09:34:33 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/xml is  
2017/06/23 09:34:33 INFO  - jmeter.protocol.http.sampler.HTTPSamplerBase: Parser for text/vnd.wap.wml is org.apache.jmeter.protocol.http.parser.RegexpHTMLParser 
2017/06/23 09:34:33 INFO  - jmeter.JMeter: Creating summariser <summary> 
Creating summariser <summary>
Created the tree successfully using /home/ubuntu/JMeter_API_TestPlan.jmx
Configuring remote engine for 207.112.137.21
2017/06/23 09:34:33 INFO  - jmeter.JMeter: Configuring remote engine for 207.112.137.21
Using remote object: UnicastRef [liveRef: [endpoint:[207.112.137.21:33454](remote),objID:[-48d954a6:15cd4392e27:-7fff, 7098811430065264906]]]
Configuring remote engine for 207.112.137.22
2017/06/23 09:34:33 INFO  - jmeter.JMeter: Configuring remote engine for 207.112.137.22
Using remote object: UnicastRef [liveRef: [endpoint:[207.112.137.22:39449](remote),objID:[-238f015b:15cd4393abf:-7fff, 6897427020325789391]]]
Starting remote engines
2017/06/23 09:34:33 INFO  - jmeter.JMeter: Starting remote engines 
Starting the test @ Fri Jun 23 09:34:33 UTC 2017 (1498210473781)
2017/06/23 09:34:33 INFO  - jmeter.engine.ClientJMeterEngine: running clientengine run method 
2017/06/23 09:34:33 INFO  - jmeter.engine.util.CompoundVariable: Note: Function class names must contain the string: '.functions.' 
2017/06/23 09:34:33 INFO  - jmeter.engine.util.CompoundVariable: Note: Function class names must not contain the string: '.gui.' 
2017/06/23 09:34:33 INFO  - jmeter.samplers.SampleEvent: List of sample_variables: [] 
2017/06/23 09:34:33 INFO  - jmeter.samplers.BatchSampleSender: Using batching (client settings) for this run. Thresholds: num=100, time=60000 
2017/06/23 09:34:33 INFO  - jmeter.samplers.DataStrippingSampleSender: Using DataStrippingSampleSender for this run 
2017/06/23 09:34:34 INFO  - jmeter.samplers.BatchSampleSender: Using batching (client settings) for this run. Thresholds: num=100, time=60000 
2017/06/23 09:34:34 INFO  - jmeter.samplers.DataStrippingSampleSender: Using DataStrippingSampleSender for this run 
2017/06/23 09:34:34 INFO  - jmeter.samplers.BatchSampleSender: Using batching (client settings) for this run. Thresholds: num=100, time=60000 
2017/06/23 09:34:34 INFO  - jmeter.samplers.DataStrippingSampleSender: Using DataStrippingSampleSender for this run 
2017/06/23 09:34:34 INFO  - jmeter.samplers.BatchSampleSender: Using batching (client settings) for this run. Thresholds: num=100, time=60000 
2017/06/23 09:34:34 INFO  - jmeter.samplers.DataStrippingSampleSender: Using DataStrippingSampleSender for this run 
2017/06/23 09:34:34 ERROR - jmeter.engine.ClientJMeterEngine: Error in rconfigure() method java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: 
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: 
    java.lang.ClassNotFoundException: com.blazemeter.jmeter.threads.concurrency.ConcurrencyThreadGroup (no security manager: RMI class loader disabled) 
2017/06/23 09:34:34 INFO  - jmeter.engine.ClientJMeterEngine: Interrupting RMI Reaper 
Error in NonGUIDriver org.apache.jmeter.engine.JMeterEngineException: Error in rconfigure() method java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: 
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: 
    java.lang.ClassNotFoundException: com.blazemeter.jmeter.threads.concurrency.ConcurrencyThreadGroup (no security manager: RMI class loader disabled)
2017/06/23 09:34:34 ERROR - jmeter.JMeter: Error in NonGUIDriver org.apache.jmeter.engine.JMeterEngineException: Error in rconfigure() method java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: 
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: 
    java.lang.ClassNotFoundException: com.blazemeter.jmeter.threads.concurrency.ConcurrencyThreadGroup (no security manager: RMI class loader disabled)
    at org.apache.jmeter.engine.ClientJMeterEngine.runTest(ClientJMeterEngine.java:156)
    at org.apache.jmeter.JMeter.runNonGui(JMeter.java:831)
    at org.apache.jmeter.JMeter.startNonGui(JMeter.java:733)
    at org.apache.jmeter.JMeter.start(JMeter.java:392)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.jmeter.NewDriver.main(NewDriver.java:259)
Caused by: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: 
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: 
    java.lang.ClassNotFoundException: com.blazemeter.jmeter.threads.concurrency.ConcurrencyThreadGroup (no security manager: RMI class loader disabled)
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:377)
    at sun.rmi.transport.Transport$1.run(Transport.java:200)
    at sun.rmi.transport.Transport$1.run(Transport.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:748)
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:276)
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:253)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:162)
    at org.apache.jmeter.engine.RemoteJMeterEngineImpl_Stub.rconfigure(Unknown Source)
    at org.apache.jmeter.engine.ClientJMeterEngine.runTest(ClientJMeterEngine.java:133)
    ... 8 more
Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: 
    java.lang.ClassNotFoundException: com.blazemeter.jmeter.threads.concurrency.ConcurrencyThreadGroup (no security manager: RMI class loader disabled)
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:337)

I'm running Ubuntu 16.04.2 LTS


回答1:


  1. jmeter-plugins-cmn-jmeter-0.3.jar should go to "lib" folder, not to "lib/ext"
  2. You are using JMeter 2.11 which is 3+ years old, I would recommend upgrading to JMeter 3.2 (or later) by manually downloading it from JMeter downloads page. Ubuntu repositories seem to contain very outdated JMeter's version
  3. To avoid any issues with plugins manual installation I would suggest installing the same plugins set on the master host and all the slaves using JMeter Plugins Manager


来源:https://stackoverflow.com/questions/44720639/jmeter-load-testing-classnotfoundexception-com-blazemeter-jmeter-threads-conc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!