当我通过远程从机上的jenkins运行jmeter测试时,我不断收到此错误(错误代码如下):
[INFO] -------------------------------------------------------
[INFO] P E R F O R M A N C E T E S T S
[INFO] -------------------------------------------------------
[INFO]
[INFO]
[info]
[debug] JMeter is called with the following command line arguments: -n -t C:\Performance_Framework\Project\src\test\jmeter\Example.jmx -l C:\Performance_Framework\Project\target\jmeter\results\Example.jtl -d C:\Performance_Framework\Project\target\jmeter -L DEBUG -j C:\Performance_Framework\CMS\target\jmeter\logs\Example.jmx.log -r -R 10.0.20.100,10.0.20.101 -X -Djava.rmi.server.hostname 10.0.20.200 -Dsun.net.http.allowRestrictedHeaders true
[info] Executing test: Example.jmx
[info] Creating summariser <summary>
[info] Created the tree successfully using C:\Performance_Framework\Project\src\test\jmeter\Example.jmx
[info] Configuring remote engine: 10.0.20.100
[info] error unmarshalling return; nested exception is:
[info] java.lang.ClassNotFoundException: org.apache.jmeter.engine.RemoteJMeterEngineImpl_Stub (no security manager: RMI class loader disabled)
[info] Failed to configure 10.0.20.100
[info] Configuring remote engine: 10.0.20.101
[info] error unmarshalling return; nested exception is:
[info] java.lang.ClassNotFoundException: org.apache.jmeter.engine.RemoteJMeterEngineImpl_Stub (no security manager: RMI class loader disabled)
[info] Failed to configure 10.0.20.101
[info] Stopping remote engines
[info] Remote engines have been stopped
[info] Error in NonGUIDriver java.lang.RuntimeException: Following remote engines could not be configured:[10.0.20.100, 10.0.20.101]
[info] Completed Test: Example.jmx
现在我对机器的当前POM设置:
<configuration>
--------------------------------
<propertiesSystem>
<java.rmi.server.hostname>10.0.20.200</java.rmi.server.hostname>
</propertiesSystem>
<remoteConfig>
<startServersBeforeTests>true</startServersBeforeTests>
<serverList>10.0.20.100,10.0.20.101</serverList>
<stopServersAfterTests>true</stopServersAfterTests>
</remoteConfig>
</configuration>
如果我从JMETER GUI运行测试一切正常,远程主机启动并成功执行测试。
我认为一切都设置正确,jmeter-server.bat在每个奴隶运行测试之前启动。
此外,还有一些我从jmeter maven插件维基上的这句话中无法理解的东西:
将runremote命令发送到JMeter,它将启动任何远程 您第一次在jmeter.properties中定义的服务器 测试开始。
项目的哪个jmeter.properties文件?如果是,那么我不知道如何定义,因为每次测试运行时都会清理目标文件夹,从而得到生成的jmeter属性文件。 / p>
稍后编辑:我甚至创建了jmeter.properties文件并添加到src / test / jmeter目录中并在那里定义了远程主机,但仍然没有。
那么你有什么建议吗?
答案 0 :(得分:0)
首先需要修复的是服务器地址: https://github.com/jmeter-maven-plugin/jmeter-maven-plugin/wiki/Remote-Server-Configuration
10.0.x.100,10.0.x.101的IP地址不正确。您可以在错误日志中看到这一点。
答案 1 :(得分:0)
我通过添加java.rmi.server.hostname来编辑jmeter-server文件,以某种方式解决了连接问题。
但是我不喜欢的是测试执行时间,它很可怕,即使有一个线程应该在不到1-2秒内完成,但它仍然显示正在尝试接收关闭消息。 / p>
[INFO] -------------------------------------------------------
[INFO] P E R F O R M A N C E T E S T S
[INFO] -------------------------------------------------------
[INFO]
[INFO]
[info]
[debug] JMeter is called with the following command line arguments: -n -t C:\Performance_Framework\CMS\src\test\jmeter\Example.jmx -l C:\Performance_Framework\CMS\target\jmeter\results\Example.jtl -d C:\Performance_Framework\CMS\target\jmeter -L DEBUG -q C:\Performance_Framework\CMS\src\test\jmeter\jmeter.properties -j C:\Performance_Framework\CMS\target\jmeter\logs\Example.jmx.log -r -X -Djava.rmi.server.hostname 10.0.20.200 -Dsun.net.http.allowRestrictedHeaders true
[info] Executing test: SearchForModule.jmx
[info] Creating summariser <summary>
[info] Created the tree successfully using C:\Performance_Framework\CMS\src\test\jmeter\SearchForModule.jmx
[info] Configuring remote engine: 10.0.20.100
[info] Configuring remote engine: 10.0.20.101
[info] Starting remote engines
[info] Starting the test @ Thu Jul 30 13:48:23 BST 2015 (1438260503717)
[info] Remote engines have been started
[info] Waiting for possible shutdown message on port 4445
jenkins方面有什么问题,tomcat webapp?