I have been trying to set up Apache JMeter remote testing the last few days. JMeter remote testing enables users to view the test results on a client machine while the traffic is generated from one or more other servers. It is useful when you want to view the test result on a lower spec server and generate huge amount of traffic with a higher spec server or a cluster.
Initially, I was hoping that I can set up the JMeter server on AWS EC2 and the client on my laptop. Unfortunately, that didn’t go well and I was having inconsistent error messages. After that, I tried to set up on both of my laptop. I have googled for solutions and tried changing the port numbers for the server and rmi, turning off the firewalls on both sides, and telnetting to each other. And I was having a socket error message. My third experiment was to set up this remote testing on two EC2 (Windows Server 2008 R2) instances and it finally works. Below are the steps that I took to set up JMeter remote testing.
- Launch two EC2 instances
- Download and install JDK, JRE, JMeter (binary package) on both instances. JMeter requires JVM 1.5 and above.
- On the server, double click the jmeter-server.bat in [JMETER_HOME]/bin folder. A command prompt window similar to below will pop up.
- On the client side, you need to add the IP address of the server to the “remote_hosts” property in the jmeter.property file in [JMETER_HOME]/bin folder. You can use either private IP address or the public IP address but the public IP address changes every time you restart your instance. To start the JMeter client with GUI, double click the jmeter.bat in [JMETER_HOME]/bin folder. After adding a simple thread group with a listener, we can start the remote testing by selecting the IP address of the JMeter server from the Remote Start menu.

After you start the test. You should see a message similar to the one below shows up on the command prompt.
- On the server side, you should receive the messages for starting and finishing the test.
I am happy that I finally have it set up after many tries. I still don’t know if there are fixes for my first two tries. Please leave a comment if you have the same issues or know about how to fix them.
Full list of command line options: http://jakarta.apache.org/jmeter/usermanual/get-started.html#options
