Home > Blockchain >  Not able to connect to a slave machine in JMeter distributed testing [JMeter Distributed Testing]
Not able to connect to a slave machine in JMeter distributed testing [JMeter Distributed Testing]

Time:10-20

I am trying to setup a master-slave environment to perform distributed testing in JMeter, But even after setting up all the things, i am unable to do so.

Below configurations i already setup:

  1. Firewall is disable.

  2. RMI keystore is generated from master machine and the created "jks" file has been pasted to all slave machine. Also for alternative solution, i marked "server.rmi.ssl.disable" as "true" in "user.properties" fike.

  3. I also setup a server port in "jmeter.properties" file with slave ip addresses as well.

enter image description here

but after doing all the above listed things, i am getting error as "Connection timed out" and "Connection Refused to host".

can anyone please help me to overcome the problem ? thanks in advance.

CodePudding user response:

Add the following to each slave machine jmeter-server file and then start jmeter-server from slave machines:

RMI_HOST_DEF=-Djava.rmi.server.hostname= ip_of_your_jmeter_server

CodePudding user response:

Instead of blindly changing JMeter properties values (and doing this in wrong files) I would rather recommend getting familiarized with Remote hosts and RMI configuration section of JMeter documentation and pay particular attention to the following:

  • client.rmi.localport - Parameter that controls the RMI ports used by RemoteSampleListenerImpl and RemoteThreadsListenerImpl (The Controller)
  • server.rmi.port - To change the default port (1099) used to access the server.
  • server.rmi.localport - To use a specific port for the JMeter server engine, define this property before starting the server.
  • server_port - RMI port to be used by the server (must start rmiregistry with same port).

Where:

  • client (or Controller) == JMeter Master
  • server == JMeter Slave

More information:


We cannot suggest any fixes without seeing what properties you've defined on master and slave machines, for now I can mention that:

  1. If you want to change server_port from default 1099 to 1234 you need to do this on the slaves side

  2. On the master side you need to make JMeter aware of the port change via remote_hosts property like

    remote_hosts=1.1.1.1:1234,2.2.2.2:1234,etc.
    
  • Related