Is there a method by which you can easily / programmatically obtain the HTTP / Transport port number when starting a node using the
Specifically, i'm bringing up an ES node as part of an integration test, which will eventually run on a CI server. As multiple jobs may run concurrently, I need to avoid hard coding the ports numbers when bringing up the node. I can use the above arguments (or a range) to ensure that if there is a port conflict with an already running process, the node will still come up on another port - but short of parsing the
elasticsearch.log file (or inspecting the output of a command like netstat for the node pid), is there a way to obtain the ports used.
For example, you can use the
-p option to save off the PID to a file, but there isn't a similar (documented) option for ports.
(Yes Docker would be one solution, but not what i'm looking for comment on here)