jmeterrmiload-testingjmeter-4.0

Jmeter Distributed Setup works in GUI but not the command line


I am running Windows 7 Pro with JMeter 4.0 r1823414 on all 5 machines with Java JDK 1.8.0_144 on all of them as well. All paths and ENV Vars are identical across all machines. I set my remote hosts in the master and I am able to see them on the GUI inside the master. I built the rmi_keystore.jks on a slave machine and copied it into the bin folder in every machine. I successfully started all the servers on the slave machines and see the successful attachment of the rmi (running the 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>]]]

Running a basic HTTP call I am able to run from the master to all 4 slave machines (individually and all at once) and get results without issue from the GUI. My problem is from the command line. I cannot get the test to run. I have tried:

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)

Every time I get the same errors in the command line:

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>]

What am I missing? Why would it run and work in the GUI but not on the command line? Something cannot be right.


Solution

  • Make sure that

    1. You either run JMeter from its "bin" folder
    2. Or have rmi_keystore.jks in the folder where you're running JMeter from

    as the error clearly states that JMeter tries to load rmi_keystore.jks file and fails

    One more thing to try is providing full path to the rmi_keystore.jks file via server.rmi.ssl.keystore.file property.

    You can also completely disable secure RMI communication by setting server.rmi.ssl.disable property to true

    Normally jmeter.log file should contain the root cause of the issue, if it doesn't or not very informative - you can increase JMeter log verbosity for selected clas(ses) or package(s).