Details
-
Bug
-
Resolution: Not a Bug
-
Major
-
None
-
6.4.0.GA
-
None
-
False
-
False
-
Undefined
Description
This bug happens when trying to reach an AMQ 7 Broker deployed on Openshift with an acceptor exposed through an Openshift Route using the hornetq client on EAP 6.4.23 deployed outside of Openshift.
EAP 6.4 resolves the hostname to an IP address before making the connection request which fails becaue the HA Proxy from Openshift does not know how to route the request with only an IP address.
Looking at the code of upstream wildfly we can see that IP resolution has been wrongly added here. The similar bug can be found on the EAP 6.4 sources
https://github.com/wildfly/wildfly/commit/a7d68d26362325be8d1c409c4ab614a08d4ac7c0
The comment of the commit comment says :
"do not resolve to an IP address UNLESS it's a loopback"
But the code does it the other way around:
if loopback then do not resolve IPaddress, take the hostname
else resolve to IPaddress
The fix would be to invert the if condition outcomes
Attached you can find a fixed version based on the latest source code of EAP 6.4.23
The fix goes from lines 195 to 207.