apache / apache/jmeter

client.rmi.localport is not documented properly

Open
#5,472 3 comments 0 reactions 0 assignees View on GitHub
need info os: All P2
Dominant language
Java
Stars
9.5k
Forks
2.3k
Avg merge
1d 22h
Merged PRs (30d)
5

Description

**Alexander Babayants** ([Bug 65028](https://bz.apache.org/bugzilla//show_bug.cgi?id=65028&redirect=false)):
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?

Severity: normal
OS: All

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.