1

I set up a Master-Slave load testing environment using JMeter. I am using 3 CentOS machines with following IP's

xxx.xxx.xxx.1 (Master)
xxx.xxx.xxx.2 (Slave1)
xxx.xxx.xxx.3 (Slave2)

Here are the steps I did.

1) Added the following to the slaves jmeter.properties file:

remote_hosts=xxx.xxx.xxx.1

2) Added the following to master jmeter-server file

#RMI_HOST_DEF=-Djava.rmi.server.hostname=xxx.xxx.xxx.2 `

Then when I'm executing the following command from the /apache-jmeter-2.13/bin folder of xxx.xxx.xxx.2 Slave machine.(I don't have root user access have only SUDO root access)

sudo ./jmeter-server

I'm getting the error

./jmeter-server: line 32: ./jmeter: Permission denied

Is my Master-Slave setup is correct? Am I doing something wrong here? Do I need to do anything else to setup master-slave?

Adnan
  • 2,931
  • 3
  • 23
  • 35
RJM
  • 271
  • 1
  • 5
  • 32

1 Answers1

2

Add the following to client (master) jmeter.properties file:

remote_hosts= xxx.xxx.xxx.2,xxx.xxx.xxx.3

Add the following to servers (in each slave machines) jmeter-server:

RMI_HOST_DEF=-Djava.rmi.server.hostname=xxx.xxx.xxx.2 for (Slave1)

&

RMI_HOST_DEF=-Djava.rmi.server.hostname=xxx.xxx.xxx.3 for (Slave2)

Then start jmeter-server.sh from those two Slave

machines(xxx.xxx.xxx.2,xxx.xxx.xxx.3) using this command

./jmeter-server

Then ran the following command from the client machine(xxx.xxx.xxx.1) to start remote start all the slaves.

./jmeter -n -t <testscript.jmx> -r

See this Thread.

Community
  • 1
  • 1
Adnan
  • 2,931
  • 3
  • 23
  • 35
  • When starting jmeter-server.sh from Slave machines (xxx.xxx.xxx.2,xxx.xxx.xxx.3) using command ./jmeter-server getting the error Permission denied. Then when i try with sudo ./jmeter-server getting the error ./jmeter-server: command not found. Im executing from JMETER_HOME/bin folder. – RJM Jul 21 '16 at 17:12
  • It means you don't have the execute permission for `jmeter-server.sh`.You can verify this by running `ls -l jmeter-server.sh`.This [Thread](http://unix.stackexchange.com/questions/203371/run-script-sh-vs-bash-script-sh-permission-denied) might help.You need to grant executable permission to that file. – Adnan Jul 21 '16 at 17:40
  • Master slave setup is working now. But there is an issue. It is not reading the data file from the folder. eg;/home/test/jmeter/datafiles/data1.txt is the location of the CSV data file in the JMeter script. It is not reading the data and null value is assigning in the execution. I have put the data file in the same location in master and slaves. – RJM Jul 22 '16 at 14:24
  • Where can i find the .jtl file? – RJM Jul 22 '16 at 15:55
  • ./jmeter -n -t -r - l – Adnan Jul 22 '16 at 16:08
  • you will find the outputfile in `apache-jmeter-2.13/bin` directory.You can give any name you want for the `.jtl` file – Adnan Jul 22 '16 at 16:10