Bug 65028 - client.rmi.localport is not documented properly
Summary: client.rmi.localport is not documented properly
Status: NEEDINFO
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 5.4
Hardware: PC All
: P2 normal (vote)
Target Milestone: JMETER 5.4.1
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-25 23:24 UTC by Alexander Babayants
Modified: 2020-12-31 13:59 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Babayants 2020-12-25 23:24:29 UTC
Documentation in jmeter.properties for client.rmi.localport states

> # Parameter that controls the RMI port used by RemoteSampleListenerImpl (The Controller)
> # Default value is 0 which means port is randomly assigned
> # You may need to open Firewall port on the Controller machine
> client.rmi.localport=...

It's quite obvious to think that JMeter will use the port you provided in config straight away - as it does with server.rmi.localport. In reality client.rmi.localport is just a base value, JMeter may use multiple client ports, and actual port number may be equal to (if you're lucky enough) or greater than provided value.

I spent an hour to debug this while setting up SSH port forwarding for remote JMeter server today. For me the actual port was off by one from what was set in client.rmi.localport (and that one was not used at all), and it took me a lot of time to re-check everything before looking into netstat and realizing that JMeter uses not the port I configured.

The only place where it's documented is a Tips section here https://jmeter.apache.org/usermanual/remote-test.html#tips . And I've noticed it only when I started to file a bug about port being off by one and found similar issue #64425.

What makes it worse is that many tutorials already got this wrong, but presumably authors were lucky enough to have actual port match the configured one. Examples:
https://cloud.google.com/community/tutorials/ssh-port-forwarding-set-up-load-testing-on-compute-engine
https://stackoverflow.com/questions/12265265/how-to-configure-jmeter-for-ssh-tunneling-over-a-different-host (first StackOverflow answer in Google for "jmeter remote port forwarding")
and so on.

I honestly think such unobvious things deserve more than a short note in Tips section. Probably in bold and ALL CAPS. And maybe even client.rmi.localport needs another name to underline the difference in semantics with server.rmi.localport?
Comment 1 Felix Schumacher 2020-12-27 13:55:16 UTC
Would you like to re-phrase the documentation, so that it would have done a better job, when you first read it?

If you are not familiar with git, xml and Co., you can do the wording in plain text and we will translate it to the correct place and markup.
Comment 2 Felix Schumacher 2020-12-31 13:59:37 UTC
Is the added information enough? What is missing for you?

commit f0f383cd7b79ee6d69abc7e00f33ccd74815355f
AuthorDate: Thu Dec 31 14:57:20 2020 +0100

    Add documentation for the property client.rmi.localport
    
    Bugzilla Id: 65028
---
 bin/jmeter.properties                     | 5 +++--
 xdocs/changes.xml                         | 1 +
 xdocs/usermanual/properties_reference.xml | 4 ++--
 3 files changed, 6 insertions(+), 4 deletions(-)