Tuesday, December 22, 2015

How to configure SSH tunneling for JMeter on remote host

We just need to add two tcp connection listening on each part.

1. Client - modify jmeter.properties file fixing remote_hosts:

remote_hosts=127.0.0.1:55511
client.rmi.localport=55512

2. Server - modify jmeter.properties file adding:

server_port=55511
server.rmi.localhostname=127.0.0.1
server.rmi.localport=55511

3. Connect to the server using:

  • Linux and Mac users
    ssh user@server -L 55511:127.0.0.1:55511 -R 55512:127.0.0.1:55512
  • Windows users
    putty.exe -ssh user@server -L 55511:127.0.0.1:55511 -R 55512:127.0.0.1:55512

4. Server - start jmeter

cd apache-jmeter-2.13/bin/
./jmeter-server -Djava.rmi.server.hostname=127.0.0.1

5. Client - start jmeter

cd apache-jmeter-2.13/bin/
./jmeter.sh -Djava.rmi.server.hostname=127.0.0.1 -t test.jmx

No comments: