我在所有5台机器上运行带有JMeter 4.0 r1823414的Windows 7 Pro,所有这些机器上都有Java JDK 1.8.0_144。所有路径和ENV Vars在所有机器上都是相同的。我将远程主机设置在主设备中,我可以在主设备内的GUI上看到它们。我在从机上构建了rmi_keystore.jks并将其复制到每台机器的bin文件夹中。我成功启动了从机上的所有服务器,并看到rmi的成功附件(运行jmeter-server.bat):
Found ApacheJMeter_core.jar
Picked up JAVA_TOOL_OPTIONS: -agentlib:jvmhook
Picked up _JAVA_OPTIONS: -Xbootclasspath/a:"C:\Program Files
(x86)\HP\Unified Functional Testing\bin\java_shared\classes\jasmine.jar"
Created remote object: UnicastServerRef2 [liveRef: [endpoint:
[<ip:port>,SSLRMIServerSocketFactory(host=<host_name/IP>,
keyStoreLocation=rmi_keystore.jks, type=JKS,
trustStoreLocation=rmi_keystore.jks, type=JKS, alias=rmi),
SSLRMIClientSocketFactory(keyStoreLocation=rmi_keystore.jks, type=JKS,
trustStoreLocation=rmi_keystore.jks, type=JKS, alias=rmi)](local),objID:
[<stuff>:-7fff, <more_stuff>]]]
运行基本的HTTP调用我能够从主服务器运行到所有4个从属机器(单独和全部一次)并从GUI获得结果而不会出现问题。我的问题来自命令行。我无法让测试运行。我试过了:
jmeter -n -t distributed_test_4_slaves.jmx -r -l distributedLog_Test.jtl -Jserver.rmi.ssl.keystore.file=rmi_keystore.jks
jmeter -n -t distributed_test_4_slaves.jmx -r -l distributedLog_Test.jtl
jmeter -n -t distributed_test_4_slaves.jmx -R <all_my machine_names> -l distributedLog_Test.jtl (with and without -Jserver.rmi.ssl.keystore.file=rmi_keystore.jks)
jmeter -n -t distributed_test_4_slaves.jmx -R <all_my machine_names:ports> -l distributedLog_Test.jtl (with and without -Jserver.rmi.ssl.keystore.file=rmi_keystore.jks)
jmeter -n -t distributed_test_4_slaves.jmx -R <all_my machine_ips(with and without ports)> -l distributedLog_Test.jtl (with and without -Jserver.rmi.ssl.keystore.file=rmi_keystore.jks)
每次我在命令行中遇到相同的错误:
Creating summariser <summary>
Created the tree successfully using distributed_test_4_slaves.jmx
#The next 5 lines repeat for each slave
Configuring remote engine: <slave_1..4>
Exception creating connection to: <slave_1..4>; nested exception is:
java.io.FileNotFoundException: rmi_keystore.jks (The system cannot
find the file specified)
Failed to configure <slave_1..4>
Stopping remote engines
Remote engines have been stopped
Error in NonGUIDriver java.lang.RuntimeException: Following remote
engines could not be configured:[
<slave_1>, <slave_2>, <slave_3>, <slave_4>]
我错过了什么?为什么它会在GUI中运行和工作,而不是在命令行上运行?有些东西不对。
答案 0 :(得分:1)
确保
rmi_keystore.jks
醇>
因为错误明确指出JMeter尝试加载rmi_keystore.jks
文件并失败
要尝试的另一件事是通过rmi_keystore.jks
属性提供server.rmi.ssl.keystore.file
文件的完整路径。
您还可以通过将server.rmi.ssl.disable
属性设置为true
来完全禁用安全RMI通信
通常 jmeter.log 文件应该包含问题的根本原因,如果它没有或者没有提供足够的信息 - 你可以increase JMeter log verbosity选择clas(ses)或package( S)。