I have set my discovery.zen.ping.unicast.hosts: ["hostA", "hostB", "hostC"] without a port range which according to the docs I believe should scan a range of ports by default which looks like it does.
Now for one of my coordinator nodes that has the above discovery.zen.ping.unicast.hosts setting, I want to set a custom fixed transport port say 9500 so I set transport.tcp.port: 9500 but when the coordinator starts up it complains that it cannot find any master nodes.
Looking at the logs, it looks like for some reason the coordinator overrides the default zen unicast discovery port range with port 9500 which makes it unable to discovery anything.
I tried to play around and set transport.profiles.default.port: 9300-9400 cos according to the docs:
The list of hosts is set using the discovery.zen.ping.unicast.hosts static setting. This is either an array of hosts or a comma-delimited string. Each value should be in the form of host:port or host (where port defaults to the setting transport.profiles.default.port falling back to transport.tcp.port if not set).
So I thought it might work but then this seems to replace transport.tcp.port which makes my coordinator not bind to transport port 9500.
In summary, what I want my coordinator to have is a "transport_address" : "SOME_IP:9500" and still be able to discover things with discovery.zen.ping.unicast.hosts: ["hostA", "hostB", "hostC"] - is that possible?
Elasticsearch will scan five ports on localhost if you do not set discovery.zen.ping.unicast.hosts but does not do any port scanning if you do set this setting. This is a convenience feature for quick setups on a single host, but in any realistic production cluster you should give a specific port to each master-eligible node and specify that port in the addresses given in the discovery.zen.ping.unicast.hosts setting if needed: