JMeter with remote servers

Viewed 30187

I'm trying to setup JMeter in a distributed mode. I have a server running on an ec2 intance, and I want the master to run on my local computer. I had to jump through some hopes to get RMI working correctly on the server but was solved with setting the "java.rmi.server.hostname" to the IP of the ec2 instance.

The next (and hopefully last) problem is the server communicating back to the master.

The problem is that because I am doing this from an internal network, the master is sending its local/internal ip address (192.168.1.XXX) when it should be sending back the IP of my external connection (92.XXX.XXX.XXX).

I can see this in the jmeter-server.log:

ERROR - jmeter.samplers.RemoteListenerWrapper: testStarted(host) java.rmi.ConnectException: Connection refused to host: 192.168.1.50; nested exception is:

That host IP is wrong. It should be the 92.XXX.XXX.XX address. I assume this is because in the master logs I see the following:

2012/07/29 20:45:25 INFO - jmeter.JMeter: IP: 192.168.1.50 Name: XXXXXX.local FullName: 192.168.1.50

And this IP is sent to the server during RMI setup.

So I think I have two options:

  1. Tell the master to send the external IP
  2. Tell the server to connect on the external IP of the master.

But I can't see where to set these commands.

Any help would be useful.

4 Answers

Might be very late in the game but still. Im running this with jmeter 5.3.

So to get it work by setting up the slaves in aws and the controller on your local machine.

  1. Make sure your slave has the proper localports and hostname. The hostname on the slave should be the ec2 instance public dns.
  2. Make sure AWS has proper security policies.
  3. For the controller (which is your local machine) make sure you run with the parameter '-Djava.rmi.server.hostname='. You can get the ip by googling "my public ip address". Definately not those 192.xxx.xxx.x or 172.xx.xxx.
  4. Then you have to configure your modem to port forward your machine that is used to be your controller. The port can be obtained when from the slave log (the ones that has the FINE: RMI RenewClean....., yeah you have to set the log to verbose). OR set DMZ and put your controller machine. Dangerous, but convinient just for the testing time, don't forget to off it after that
  5. Then it should work.
Related