Saturday, April 30, 2011

How to use jMeter in server mode over an SSH tunnel - Part 2 - Mutliple server instances

This article describes how to run one client JMeter instance with MULTIPLE server instances with inter-JMeter communication tunneled over SSH.

Please read the previous part first (How to use jMeter in server mode over an SSH tunnel).

1) SSH TUNNELS (created from the client machine)
We assume that:
- we have a client machine and a server machine
- client JMeter instance runs on the client machine
- both server JMeter instances run on the server machine.
- we have two server JMeter instances

Create following tunnels:
(tunnels to instance 1)
Local port: 55501 ->
Local port: 55511 ->
(tunnels to instance 2)
Local port: 55502 ->
Local port: 55513 ->
(mutual tunnel for callback)
Remote port: 55512 ->


Create 2 separate JMeter application folders on the server machine, e.g.
and put the patched JMeter application into each of them.

They will have different configurations in (The same result could be also achieved by having only one application instance and by specifying the different configuration parameters in the start up script on command line.)

Prepare start-up scripts:
./jakarta-jmeter-2.3.4-inst1/bin/jmeter-server -Djava.rmi.server.hostname= 2>&1 >inst1.log &

./jakarta-jmeter-2.3.4-inst2/bin/jmeter-server -Djava.rmi.server.hostname= 2>&1 >inst2.log &



5) GO
Open SSH connection from client to server machine
Start client JMeter
Start server JMeters
Remotely run your test
Check inst1.log and inst2.log for logs from the server instances

6) Done!

1) Ports are already in use on server machine
Make sure no previously started JMeter is running in the background.

2) There are no results coming back to client instance
Make sure you patched also the client instance JMeter application.


  1. Peter, this is perfect - works a dream! You're a legend.

    I might make one comment if I may which is to say that in Section 3 where you say:

    Create 2 separate JMeter application folders on the server machine, e.g.
    and put the patched JMeter application into each of them.

    This sounded to me like creating two instances of jmeter on one machine. If anyone else got a bit confused here what I did was to copy up the patched jakarta-jmeter-2.3.4 directory to two different servers (same dir name) and then edit their respective files as per the article.

    1. The effectiveness of IEEE Project Domains depends very much on the situation in which they are applied. In order to further improve IEEE Final Year Project Domains practices we need to explicitly describe and utilise our knowledge about software domains of software engineering Final Year Project Domains for CSE technologies. This paper suggests a modelling formalism for supporting systematic reuse of software engineering technologies during planning of software projects and improvement programmes in Final Year Projects for CSE.

      Software management seeks for decision support to identify technologies like JavaScript that meet best the goals and characteristics of a software project or improvement programme. JavaScript Training in Chennai Accessible experiences and repositories that effectively guide that technology selection are still lacking.

      Aim of technology domain analysis is to describe the class of context situations (e.g., kinds of JavaScript software projects) in which a software engineering technology JavaScript Training in Chennai can be applied successfully

      The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training

  2. Hello,

    since I had only 1 client and 1 server machine I really ran two JMeter server instances on one machine. But there may be also real reasons to do it that way (utilizing hardware paralelism?, limits of single jvm, ..).

    You ran each server instance on a separate server machine? Are you saying that you opened separate SSH connections to both machines and that both connections were tunneling the same port 55512 without problem ? That's good news..

  3. PS. I changed your port 55512 to something else more distinct. Using 55511 for slave number 1 meant I wanted to use 55512 for slave number 2 but would have had to jump to 55513 instead.

    It's arbitrary really, of course any unreserved number works, but it made things more pleasing to the Freudian side of my personality.

  4. Yes, two server instances tunnelling to the same port. In fact, I ran it with three boxes as slaves, each using the same port - it works. Now, if I need, I can fire up as many cloud-based slaves as I desire - very useful, very cheap.

    And yes, I do this to give me access to additional hardware to generate the required load.

    There is one problem where connection warnings are intermittently written to the terminal that launched the tunnels but this does not seem to affect the test, it's just annoying for now, but I need to verify this.

    Overall, this solution is great for those scenarios where I am testing cloud based SUTs and need to generate load from an external source (the Cloud). This is desirable because I do not want traffic streaming out of my local network, which is unrealistic and problematic. So by using this tunnelling solution I can generate the correct load and benefit from rich, real-time feedback to a central location.

    The problem with remote, distributed testing (not tunnelling per se) is that you can end up saturating your incoming bandwidth, even with batch mode set. In this case there are really only two other options (which do not employ your solution):

    1. Run the test remotely in non-gui mode and use the 'generate summary report' listener to get feedback. Like this, there is no tunnel in use and you lose the GUI but you also remove the bandwidth issue and get a solid, reliable test. I think this is the traditional way of using JMeter in such a situation.

    2. Where I really want the extra feedback, I put my MASTER instance in the cloud too and push the GUI back to the client using X11 forwarding. I've only played around with this a bit so far; it works fine for simple tests but I've only tried it from home and it was painfully slow at times and did not seem to scale well. But I have naff broadband which was maxing out at certain points and I didn't really test it fully so I'll reserve judgement.

    Thanks again, great work.

  5. It is one of the foundations for the study of positive psychology, which seeks to focus on strengths and other positive attributes people possess that lead to living a good life, instead of pathologizing them. Thank you. forskolin

  6. Treasurebox is an online store which provide their customers all the latest household items, outdoor furniutre,electronic gadgets nz, Pop up gazebos nz and much more.
    YOu will be easily buy all the items on a single click

  7. Thanks For sharing an informative blog keep rocking bring more details
    Best web design company in chennai

  8. TreasureBox is operated by a group of young, passionate, and ambitious people that are working diligently towards the same goal - make your every dollar count, as we believe you deserve something better.
    rattan outdoor furniture nz
    headboard nz
    laptop table nz

  9. I need to communicate my deference of your composing aptitude and capacity to make perusers read from the earliest starting point as far as possible. I might want to peruse more up to date presents and on share my musings with you.


  10. This is a great motivational article. In fact, I am happy with your good work. They publish very supportive data, really. Continue. Continue blogging. Hope you explore your next post
    hrdf claimable courses

  11. You re in motivation behind fact an on-target site administrator. The site stacking speed is amazing. It kind of feels that you're doing a specific trick. What's more, The substance is a masterpiece. you have done a marvelous development concerning this issue!
    360DigiTMG Data Analytics Course

  12. Especially superb!!! Exactly when I search for this I found this webpage at the top of every single online diary in web crawler.
    data science course in malaysia

  13. an extremely wonderful post this is. Genuinely, perhaps the best post I've at any point seen to find in as long as I can remember. Goodness, simply keep it up.
    what is hrdf claimable

  14. This is a great motivational article. In fact, I am happy with your good work. They publish very supportive data, really. Continue. Continue blogging. Hope you explore your next post
    HRDF training

  15. This is a great post I saw thanks to sharing. I really want to hope that you will continue to share great posts in the future.
    data scientist course in noida

  16. Probability, statistics, and machine learning come under the scope of Mathematical aspect while applied aspects help you gain knowledge of data science, languages which includes Python, MATLAB, JAVA, SQL. data science course syllabus

  17. Good to become visiting your weblog again, it has been months for me. Nicely this article that i've been waited for so long. I will need this post to total my assignment in the college, and it has exact same topic together with your write-up. Thanks, good share.

    data science course in India

  18. I just got to this amazing site not long ago. I was actually captured with the piece of resources you have got here. Big thumbs up for making such wonderful blog page!
    Artificial Intelligence Course

  19. This is most informative and also this post most user-friendly and super navigation to all posts.
    Data Science
    ETL Testing
    Python Online Classes