我在所有 5 台机器上运行带有 JMeter 4.0 r1823414 的 Windows 7 Pro,所有这些机器上也都安装了 Java JDK 1.8.0_144。所有机器上的所有路径和 ENV 变量都是相同的。我在主服务器中设置了我的远程主机,我可以在主服务器内的 GUI 上看到它们。我在从属机器上构建了 rmi_keystore.jks 并将其复制到每台机器的 bin 文件夹中。我成功启动了slave机器上的所有服务器,看到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 中运行和工作,而不是在命令行中?不可能是对的。