Distributed load test - Starting remote JMeter instances

378 views
Skip to first unread message

Hector Oswaldo Caballero

unread,
Apr 24, 2018, 2:24:33 PM4/24/18
to Maven JMeter Plugin Users
Hi all,

I've been trying to get a remote test working for the last few days and have read the documentation and a few articles and posts on this mailing list but still struggling.

My main problem is I need to start manually the remote servers in order for the test to work. After doing so, the test runs.

This is the (pertinent) configuration I have come up with:

<propertiesJMeter>
  <log_level.jmeter>DEBUG</log_level.jmeter>
  <server.rmi.ssl.disable>true</server.rmi.ssl.disable>
  <remote_hosts>142.133.164.137</remote_hosts>
</propertiesJMeter>
<propertiesGlobal>
  <server.rmi.ssl.disable>true</server.rmi.ssl.disable>
</propertiesGlobal>
<remoteConfig>
  <startServersBeforeTests>true</startServersBeforeTests>
  <serverList>142.133.164.137</serverList>
  <stopServersAfterTests>true</stopServersAfterTests>
</remoteConfig>

Maybe I'm just misunderstanding the documentation but I'm expecting the remote servers to be started automatically, which is not happening. Then the test fails with an error message:

  Configuring remote engine: 192.133.xxx.xxx
  Connection refused to host: 192.133.xxx.xxx; nested exception is: 
     java.net.ConnectException: Connection refused (Connection refused)

If I start the remote server myself using jmeter-server -Djava.rmi.server.hostname="${ip_address}", then the test is able to start just right.

I'm using the same JMeter and Java versions on both machines, JMeter server and client are on the same network and there is no firewall involved; I've even enabled verbose debugging to try to understand what's happening but so far no luck. I have removed the <serverList> entry just for testing and also used the <startAll> one instead, but still without success.

Last resort, I've been thinking about starting the remote server before the test starts using an SSH remote command.

Any hint or pointer?

Thanks









Hector Oswaldo Caballero

unread,
Apr 24, 2018, 2:28:55 PM4/24/18
to Maven JMeter Plugin Users
Oops, sorry, seems the code is not visible. Here it is again:
         <propertiesJMeter>
            <log_level.jmeter>DEBUG</log_level.jmeter>
            <server.rmi.ssl.disable>true</server.rmi.ssl.disable>
            <remote_hosts>142.133.164.137</remote_hosts>
          </propertiesJMeter>
        <propertiesGlobal>
            <server.rmi.ssl.disable>true</server.rmi.ssl.disable>
         </propertiesGlobal>
         <remoteConfig>
             <startServersBeforeTests>true</startServersBeforeTests>
             <serverList>142.133.164.137</serverList>
             <stopServersAfterTests>true</stopServersAfterTests>
         </remoteConfig>

Hector Oswaldo Caballero

unread,
Apr 25, 2018, 4:37:49 PM4/25/18
to Maven JMeter Plugin Users
So I gave up and just set up an SSH command to be executed just before the tests are run so that the JMeter remote server is started.

I'm even spawing two JMeter servers in one of the machines (for now) as this machine is quite powerful. I'm using the <ip>:<port> syntax and seems to work OK.

I'm open to any suggestion or comment about this setup.

Thanks

voxelg...@gmail.com

unread,
Jun 17, 2019, 9:16:41 PM6/17/19
to Maven JMeter Plugin Users
Were you ever able to resolve this? I'm running into the same problem and to me it seems like the startServer options do not work at all.
Message has been deleted

stath...@gmail.com

unread,
Nov 12, 2019, 3:23:35 AM11/12/19
to Maven JMeter Plugin Users
I am trying the last few days to setup a Jmeter distributed testing environment using Docker. Indeed after many attempts it worked only when i added the port at the end of the ip address.

For example at the jmeter client i used something like: jmeter -n -t -D192.168.1.2:5000,192.168.1.3:5000 (+-Jserver.rmi.ssl.disable=true if needed)

Also, yeah as far as i can tell, i think that you have to start the servers first before trying to run the test from client. Personally, i start a jmeter server right after it's container starts.

It seems that is working fine, until the servers try to return their logs to the client.
I have 2 servers running. When they finish, first one returns all his logs to the client, while the second one manages to return only few and throws multiple exceptions that say "Connection refused to host (client's ip address)."

Ardesco

unread,
May 19, 2020, 4:31:03 PM5/19/20
to Maven JMeter Plugin Users
We need to make this clearer in the documentation.  

The remote-server goal is a way to start up Jmeter locally as a server instance.  It is the equivalent of doing this "jmeter -n -t -D192.168.1.2:5000,192.168.1.3:5000" locally

The remote config is specifying JMeter server instances (i.e. the things above) that you would like to connect to.  The startAndStop referred to in that config is actually starting load generation and stopping load generation (The equivalent of Step 3a here: https://jmeter.apache.org/usermanual/remote-test.html)

The meter-maven-plugin cannot magically remote into a server and start a jmeter server instance.  If it could do that Our l33t hacking powers would have enabled us to take over the world by now... ;)

Anil Medikonda

unread,
May 19, 2020, 7:41:22 PM5/19/20
to Maven JMeter Plugin Users
Hi Ardesco,

This really helpful. I was tried many days to launch jmeter-server on remote machine and run test but could not do this. Below exploration is really helpful.

So, we can only run test something like jmeter -n -t .jmx -R localhost?

Thanks
Anil

Ardesco

unread,
Jun 23, 2020, 5:01:57 AM6/23/20
to Maven JMeter Plugin Users
You can start server instances on multiple servers by running the "remote-server" goal on each server.

You can then use the remote server configuration to connect to these remote instances that are now running:

Anil Medikonda

unread,
Jun 23, 2020, 2:07:09 PM6/23/20
to Maven JMeter Plugin Users
Hi Ardesco,

Below your earlier comment in this thread on May 19th.

The meter-maven-plugin cannot magically remote into a server and start a jmeter server instance.  If it could do that Our l33t hacking powers would have enabled us to take over the world by now... ;)

I am still confused what exactly can be achieved using remote config in jmeter-maven config?

here is my use case and not able to achieve this.

- Trigger jmeter-maven install on Master machine 
- Spin off 4 remote servers ( mean start jmeter-server on remote servers )
- Execute load test using those 4 remote machines as slaves

So far, I could use remote server config in jmeter-maven to trigger test on local machine only but not on remote machines. Appreciate your help on this.
Reply all
Reply to author
Forward
0 new messages