Bug 60051 - jmeter-server: port and log file parameter cannot be easily overriden from command line
Summary: jmeter-server: port and log file parameter cannot be easily overriden from co...
Status: NEW
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 3.1
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-27 00:58 UTC by József Kószó
Modified: 2016-12-29 00:19 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description József Kószó 2016-08-27 00:58:44 UTC
JMeter Version: 3.0
Java Version: 1.8.0_101
OS: Linux
HW: x86_64


Setting server_port in jmeter/user properties file overrides SERVER_PORT envvar used in the command line, so you should use -Jserver_port instead of -Dserver_port in the jmeter-server script.

with -D

$ SERVER_PORT=1199 apache-jmeter-3.0/bin/jmeter-server
...
$ grep port jmeter-server.log
2016/08/26 12:50:59 INFO  - jmeter.JMeter: Setting System property: server_port=1199
2016/08/26 12:50:59 INFO  - jmeter.engine.RemoteJMeterEngineImpl: Bound to registry on port 1099


with -J

$ SERVER_PORT=1199 apache-jmeter-3.0/bin/jmeter-server
...
$ grep port jmeter-server.log
2016/08/26 12:52:58 INFO  - jmeter.JMeter: Setting JMeter property: server_port=1199
2016/08/26 12:52:58 INFO  - jmeter.engine.RemoteJMeterEngineImpl: Bound to registry on port 1199


Additionally we cannot use alternative log file with the jmeter-server script, so we must use custom server script because of these issues:

$ SERVER_PORT=1199 ./jmeter-server -j server-$SERVER_PORT.log
Error: Duplicate options for -j/--jmeterlogfile found.