Bug 1054776 - ClientConfigurationImpl should not translate IP address to host name
Summary: ClientConfigurationImpl should not translate IP address to host name
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Domain Management
Version: 6.2.0,6.1.1
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: DR0
: EAP 6.3.0
Assignee: Jan Martiska
QA Contact: Petr Kremensky
Russell Dickenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-17 12:59 UTC by Jan Martiska
Modified: 2014-08-20 10:21 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-06-28 15:25:15 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1043768 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Issue Tracker WFLY-2773 0 Major Resolved ClientConfigurationImpl should not translate IP address to host name 2014-08-21 10:44:06 UTC

Internal Links: 1043768

Description Jan Martiska 2014-01-17 12:59:44 UTC
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 17:52:53 UTC
https://github.com/jbossas/jboss-eap/pull/835

Comment 2 Petr Kremensky 2014-03-04 09:50:32 UTC
Verified on EAP 6.3.0.DR1


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