Dear Bill, it is a known issue caused by the Undertow mod_cluster proxy lying to the workers about its true location in the network: see [UNDERTOW-704] Undertow mod_cluster: Multiinterface box: Manager-Address always contains hostname - JBoss Issue Tracker
You could work-around that by editing your /etc/hosts and creating different hostnames for your IP addresses.
I would submit a PR, but I can't seem to figure out where the registration message gets sent. Point me to the class if you can and I'll do the rest
In my opinion, it is not desirable to change the way InetAddress is handled. I would leave it as it is and I would suggest adding an option to overwrite the Manager-Address with whatever user wants in the Undertow subsystem mod_cluster filter configuration. WDYT, swd847 ?
I think it should use whatever interface is provided by the undertow subsystem. This stuff is already hard to figure out how to install. Reducing the number of moving parts is needed.
That is not a correct approach. In production environments, it is common to have the balancer bound to an Internet facing NIC for processing client's requests and to an internal network NIC for processing mod_cluster workers' MCMP service messages and communicating with workers.
As I think about it, In the Undertow mod_cluster Proxy implementation, it should be possible to use two socket-bindings (with different interface attributes): one for the client - balacner communication and the other for worker - balancer communication. I have to take a look whether it could be achieved with the current code by configuring more Undertow hosts with different socket-bindings.
The possibility to alter X-Manager-Address and X-Manager-Host via a direct configuration still seems plausible to me though.
Mod_cluster already supports specifying the binding, the underlying issue here is that both NIC's resolve to the same hostname, which means that we advertise the host name it is not clear which one the client should connect to. This sort of issue should not really happen on production servers, as both NIC's should have separate host names (hopefully).
I talked to JFC and apparently sending the host name is by design, I'm not really sure how big a deal this is as it only affects multi homed machines where the NIC's share a hostname.
In my mind, this is probably mostly a developer workstation thing. I hit the issue for the exactly same reason: having multiple NICs and a single hostname.
It is noteworthy though that Apache HTTP Server mod_cluster does let you use IP addresses and does not perform any shenanigans with resolving them to hostnames if you don't wish it to.
Most importantly, Apache HTTP Server mod_cluster implementation lets you set the Manager-Url explicitly if you wish to, see X-Manager-Url:
If I am not mistaken, Undertow does not let you set any explicit address.
IMHO, It is important to let users do that not only because of IP/hostname problem but also to allow them to solve situation where balancer appears to workers be reachable from a different network than it itself "thinks" it is in.