Runnint Jmeter分布式负载测试时出错

时间:2020-08-15 08:45:48

标签: java server jmeter rmi

我正在执行jmeter分布式负载测试,在以gui模式从本地计算机启动远程服务器时,测试启动,但无法在本地计算机上启动。它在本地计算机上提供rmi UnmarshalException。详细错误是

2020-08-15 15:09:51,364 INFO o.a.j.JMeter: Version 5.1.1 r1855137
2020-08-15 15:09:51,364 INFO o.a.j.JMeter: java.version=1.8.0_131
2020-08-15 15:09:51,364 INFO o.a.j.JMeter: java.vm.name=Java HotSpot(TM) 64-Bit Server VM
2020-08-15 15:09:51,364 INFO o.a.j.JMeter: os.name=Mac OS X
2020-08-15 15:09:51,364 INFO o.a.j.JMeter: os.arch=x86_64
2020-08-15 15:09:51,364 INFO o.a.j.JMeter: os.version=10.15.4
2020-08-15 15:09:51,364 INFO o.a.j.JMeter: file.encoding=UTF-8
2020-08-15 15:09:51,364 INFO o.a.j.JMeter: java.awt.headless=true
2020-08-15 15:09:51,364 INFO o.a.j.JMeter: Max memory     =1908932608
2020-08-15 15:09:51,365 INFO o.a.j.JMeter: Available Processors =4
2020-08-15 15:09:51,895 INFO o.a.j.e.DistributedRunner: Configuring remote engine: 1.2.3.4:8113
2020-08-15 15:09:51,898 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true'
2020-08-15 15:09:52,055 INFO o.a.j.e.DistributedRunner: Starting remote engines
2020-08-15 15:09:52,056 INFO o.a.j.e.DistributedRunner: Starting the test @ Sat Aug 15 15:09:52 CST 2020 (1597475392055)
2020-08-15 15:09:52,056 INFO o.a.j.e.ClientJMeterEngine: running clientengine run method
2020-08-15 15:09:52,063 INFO o.a.j.e.u.CompoundVariable: Note: Function class names must contain the string: '.functions.'
2020-08-15 15:09:52,063 INFO o.a.j.e.u.CompoundVariable: Note: Function class names must not contain the string: '.gui.'
2020-08-15 15:09:52,541 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true'
2020-08-15 15:09:52,546 INFO o.a.j.s.SampleEvent: List of sample_variables: []
2020-08-15 15:09:52,559 INFO o.a.j.s.BatchSampleSender: Using batching (client settings) for this run. Thresholds: num=100, time=60000
2020-08-15 15:09:52,559 INFO o.a.j.s.DataStrippingSampleSender: Using DataStrippingSampleSender for this run
2020-08-15 15:09:52,561 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true'
2020-08-15 15:09:53,108 INFO o.a.j.s.BatchSampleSender: Using batching (client settings) for this run. Thresholds: num=100, time=60000
2020-08-15 15:09:53,108 INFO o.a.j.s.DataStrippingSampleSender: Using DataStrippingSampleSender for this run
2020-08-15 15:09:53,108 INFO o.a.j.r.RmiUtils: Disabling SSL for RMI as server.rmi.ssl.disable is set to 'true'
2020-08-15 15:09:53,109 INFO o.a.j.s.BatchSampleSender: Using batching (client settings) for this run. Thresholds: num=100, time=60000
2020-08-15 15:09:53,109 INFO o.a.j.s.DataStrippingSampleSender: Using DataStrippingSampleSender for this run
2020-08-15 15:10:53,356 ERROR o.a.j.e.ClientJMeterEngine: Error in rconfigure() method
java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is: 
    java.io.EOFException
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:229) ~[?:1.8.0_131]
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:162) ~[?:1.8.0_131]
    at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:227) ~[?:1.8.0_131]
    at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:179) ~[?:1.8.0_131]
    at com.sun.proxy.$Proxy19.rconfigure(Unknown Source) ~[?:?]
    at org.apache.jmeter.engine.ClientJMeterEngine.runTest(ClientJMeterEngine.java:153) [ApacheJMeter_core.jar:5.1.1 r1855137]
    at org.apache.jmeter.engine.DistributedRunner.start(DistributedRunner.java:132) [ApacheJMeter_core.jar:5.1.1 r1855137]
    at org.apache.jmeter.engine.DistributedRunner.start(DistributedRunner.java:149) [ApacheJMeter_core.jar:5.1.1 r1855137]
    at org.apache.jmeter.JMeter.runNonGui(JMeter.java:1089) [ApacheJMeter_core.jar:5.1.1 r1855137]
    at org.apache.jmeter.JMeter.startNonGui(JMeter.java:991) [ApacheJMeter_core.jar:5.1.1 r1855137]
    at org.apache.jmeter.JMeter.start(JMeter.java:563) [ApacheJMeter_core.jar:5.1.1 r1855137]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_131]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_131]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_131]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131]
    at org.apache.jmeter.NewDriver.main(NewDriver.java:253) [ApacheJMeter.jar:5.1.1 r1855137]
Caused by: java.io.EOFException
    at java.io.DataInputStream.readByte(DataInputStream.java:267) ~[?:1.8.0_131]
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:215) ~[?:1.8.0_131]
    ... 15 more
2020-08-15 15:10:53,378 INFO o.a.j.e.ClientJMeterEngine: Interrupting RMI Reaper
2020-08-15 15:10:53,380 ERROR o.a.j.u.JMeterUtils: Error in rconfigure() method java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is: 
    java.io.EOFException
2020-08-15 15:10:53,381 INFO o.a.j.e.DistributedRunner: Remote engines have been started

有人知道原因吗?

1 个答案:

答案 0 :(得分:0)

尝试将相关的pkg添加到您的java.security文件中,例如->

sun.rmi.registry.registryFilter = java。**; org.apache。**

编辑

在Java-11中,文件位于$ JAVA_HOME / jdk / conf / security /

在Java-8中,文件位于$ JAVA_HOME / jre / lib / security /