Client/Server Jmeter

The trick to use client/server mode with jmeter is that the client and the server need to be able to establish connections to each other.

From the doc: ”JMeter/RMI requires a connection from the client to the server. This will use the port you chose, default 1099. JMeter/RMI also requires a reverse connection in order to return sample results from the server to the client. This will use a high-numbered port. If there are any firewalls or other network filters between JMeter client and server, you will need to make sure that they are set up to allow the connections through. If necessary, use monitoring software to show what traffic is being generated.

If the client is behind a NAT, you have to DNAT to make the connections coming from the server are routed to the client.

Have fun.

EC2 Jmeter startup checklist

On the server node

1. Start the EC2 instance “jmeter node”

2. Attach the elastic IP to the instance

3. Increase the max number of files descriptors

# ulimit -n 65535
# ulimit -S -n 65535

4. Add the public DNS name to the internal IP in /etc/hosts    jmeternode1

5. Change the hostname “hostname jmeternode1”

6. If running, shut down nscd /etc/init.d/nscd stop and make sure the ping on the public dns returns the local IP (nscd caches dns resolution and we don’t want that)

7. Modify /opt/jakarta-jmeter-2.3.2/bin/jmeter-server to add the public DNS in

8. Make sure this variable is in the startup command line, right below

${DIRNAME}/jmeter ${RMI_HOST_DEF} -Dserver_port=${SERVER_PORT:-1099} -s -j jmeter-server.log "$@"

9. Start a “screen” and launch the node /opt/jakarta-jmeter-2.3.2/bin/jmeter-server (detach the screen with ctrl+a / ctrl+d)

10. Check the logs to make sure the node binds on the local IP but exposes the public DNS

2011/04/01 12:48:08 INFO  - jmeter.JMeter: IP: Name: FullName:

On the client

1. Check the memory in ‘jakarta-jmeter-2.3.2/bin/jmeter’

2. Check the remote hosts in ‘jakarta-jmeter-2.3.2/bin/’,

3. Change the local hostname in /etc/hosts so it returns the public ip

# hostname
# vim /etc/hosts        julienlaptop

4. Update the NAT rules to NAT everything coming from the server nodes to the client.

launch the client without a X server

(useful if your client is in EC2 as well)

Launch the jmeter client with the following command

$ ./jmeter -n -t viewer.jmx -p -l jmeter.log –r

It will launch the test “viewer.jmx” on all the remote nodes (-r) listed in the properties file (-p)

Note on the firewall rules

Make sure that, between the client and the server nodes, TCP communications are unfiltered for any pair of ports. RMI will create multiple connections between the client and the nodes, and those connections will use random TCP ports (source and destination).

en/ressources/astuces/jmeter.txt · Last modified: 2011/04/05 21:21 by julien
CC Attribution-Noncommercial-Share Alike 3.0 Unported Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0