2017-06-23 265 views
0

我正在嘗試非GUI和分佈式JMeter負載測試。JMeter負載測試:ClassNotFoundException:com.blazemeter.jmeter.threads.concurrency.ConcurrencyThreadGroup

在我發佈之前,我在本地進行了測試。我在筆記本電腦上安裝了JMeter,並設置了一個針對被測系統的測試計劃。我安裝了插件管理器並安裝了併發線程插件。 我發現我的JMX文件是正確的,所以我決定推出分佈式設置。

我爲負載生成設置了三臺機器:負載1,負載2和負載3。我安裝的JMeter如下: apt update ; apt upgrade上所有的人個個 apt install jmeter的 複製位於/ usr /共享/ JMeter的/ lib中/我的筆記本電腦的分機中的JAR所有的人,在同一個目錄:

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

我開始JMeter的服務器上的兩個人如下:

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 

我用的是第三個啓動分佈式測試如下:

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

的distrubuted設置似乎正常啓動,但線程啓動可能會失敗,因爲沒有被發現的一類:

拋出java.lang.ClassNotFoundException:com.blazemeter.jmeter.threads.concurrency.ConcurrencyThreadGroup(無安全管理:禁用RMI類加載器)

AI缺少JAR或配置參數?

的jmeter.log顯示以下內容:

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) 

我運行Ubuntu 16.04.2 LTS

回答

1
  1. jmeter-plugins-cmn-jmeter-0.3.jar應該去 「LIB」 文件夾,而不是 「lib/ext目錄」
  2. 您正在使用3歲以上的JMeter 2.11,我建議您通過手動從JMeter downloads page下載升級到JMeter 3.2(或更高版本)。 Ubuntu軟件倉庫中似乎含有非常過時的JMeter的
  3. 版本,以避免與插件手動安裝任何問題,我會建議安裝在主控主機上設置相同的插件和所有的奴隸使用JMeter Plugins Manager
+0

第1步的伎倆,比你 ! – SCO