Bug 1054776 - ClientConfigurationImpl should not translate IP address to host name
ClientConfigurationImpl should not translate IP address to host name
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Domain Management (Show other bugs)
6.2.0,6.1.1
Unspecified Unspecified
unspecified Severity high
: DR0
: EAP 6.3.0
Assigned To: Jan Martiska
Petr Kremensky
Russell Dickenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-17 07:59 EST by Jan Martiska
Modified: 2014-08-20 06:21 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
In previous releases of JBoss EAP, when creating an instance of a controller client and passing it an IP address to connect to, the IP address was internally translated to the machine's host name. Then, when the client attempted to make a connection, it used the host name rather than the IP address. This not only introduced unnecessary overhead by involving the DNS server, but in some very specific deployment scenarios, it caused the client to try to connect to a different IP address of the same machine than the one where a JBoss EAP instance was bound, resulting in a failure of this connection attempt. This has been fixed in this release; the controller client code does not internally translate the given IP address to the host name and uses only the IP address (rather than the corresponding host name) for making a connection. Note that this fix does not affect the scenario when a host name is passed to the controller client's factory method. In this case, the host name will be translated to an IP address and that address will be used, as expected.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-28 11:25:15 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker WFLY-2773 Major Resolved ClientConfigurationImpl should not translate IP address to host name 2014-08-21 06:44:06 EDT

  None (edit)
Description Jan Martiska 2014-01-17 07:59:44 EST
When creating a ModelControllerClient and passing in an IP address, ClientConfigurationImpl internally translates it to a host name, like here:

public static ModelControllerClientConfiguration create(final InetAddress address, final int port) {
        return new ClientConfigurationImpl(address.getHostName(), port, null, null, null, createDefaultExecutor(), true, null);
    }

Later on, when the client connects, it is translated via DNS back to an IP address. This is not only unnecessary, but in some situations, it is wrong.

Consider a Windows machine having two IP addresses ,A and B, on one network interface, where only A is pointed at by a DNS record.

    Run AS testsuite and pass it the address B as the node0 property, AS will bind itself to this address.
    Now when a test creates a ModelControllerClient using IP address B, the address B will get translated to the host name, even though B is not in the DNS. The resolving works this way on a Windows machine.
    During the connection, the host name will get resolved by DNS to address A and the test will try to connect through address A. The connection will be refused, or worse, might connect to another instance on the same machine.
Comment 1 Kabir Khan 2014-01-21 12:52:53 EST
https://github.com/jbossas/jboss-eap/pull/835
Comment 2 Petr Kremensky 2014-03-04 04:50:32 EST
Verified on EAP 6.3.0.DR1

Note You need to log in before you can comment on or make changes to this bug.