https://bz.apache.org/bugzilla/show_bug.cgi?id=65028

            Bug ID: 65028
           Summary: client.rmi.localport is not documented properly
           Product: JMeter
           Version: 5.4
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: JMETER 5.4.1

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?

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to