Friday, January 06, 2012

Understand JMeter RMI properties

As you probably know JMeter allows to set up distributed cluster to distribute loading among several peaces of hardware resources. To make it available JMeter uses RMI (remote method invocation) technology. That means jmeter parses the scenario and sends the dedicated commands to the loading nodes (injectors) replicating the scenario among them.
RMI communication is built over the network. When JMeter master sends the command to injector it sends the command to invoke injector method to the certain port (RMI port) and awaits the execution results back to the own ports it is listening (local port). The local port is usually not a constant and may vary within certain bounds. It might cause the problems when you use firewall rules blocking the port which is chosen by jmeter as the local port. That's why jmeter gives you the capability of setting up such the port number explicitly.

So you will need to configure the following properties which can be found in /bin/ (do not forget to remove commenting character #). All this is correct for build 2.5.1 r1177103

That means jmeter master will communicate with injectors using this port as default one

This port is used to get the response on the method that is executed from the server elsewhere.

This parameter is responsible for setting up the port the client (master node) will get the responses from the samplers been running on a server (slave aka injectors).

You may also find the parameter server.rmi.port but it actually does nothing (according to jmeter source code) and is overwritten with server_port parameter in case it is uncommented and has non-zero value when jmeter starts as the server.

The one important thing to know: always specify remote_hosts parameter (on the client side) with the servers in following notation: SERVER_NAME:SERVER_PORT where SERVER_PORT is the one set up with server_port parameter on the certain server (aka slave aka injector). The build I have used for this post (see above) had the defect (aka undocumented feature) in node looking up procedure in the registry.

That seems to be it.


  1. Thank you for clarifying this. I have just started to use JMeter and was definitely confused by all the rmi/port properties!

  2. In my case,changing server.rmi.localport=3451 was resulted in starting the server instance with port 3451 "Found ApacheJMeter_core.jar Using local port: 3451Created remote object: UnicastServerRef.."