[mod_cluster-issues] [JBoss JIRA] (MODCLUSTER-319) Backport MODCLUSTER-168 to 1.0.10.GA - mod_cluster should use hostname provided in address instead a IP address

Jean-Frederic Clere (JIRA) jira-events at lists.jboss.org
Mon Jul 9 11:23:12 EDT 2012


     [ https://issues.jboss.org/browse/MODCLUSTER-319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Frederic Clere resolved MODCLUSTER-319.
--------------------------------------------

    Resolution: Done


fix by r892 and -Dorg.jboss.modcluster.USE_HOST_NAME=true
                
> Backport MODCLUSTER-168 to 1.0.10.GA - mod_cluster should use hostname provided in address instead a IP address
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: MODCLUSTER-319
>                 URL: https://issues.jboss.org/browse/MODCLUSTER-319
>             Project: mod_cluster
>          Issue Type: Feature Request
>    Affects Versions: MOD_CLUSTER_1_0_10_GA_CP02
>         Environment: -JBoss Enterprise Application Platform (EAP) 5
> -JBoss Enterprise Web Server (EWS)
>    -Apache httpd
>    -mod_cluster 1.0.10.GA_CP02
>            Reporter: Aaron Ogburn
>            Assignee: Jean-Frederic Clere
>            Priority: Minor
>             Fix For: MOD_CLUSTER_1_0_10_GA_CP03
>
>         Attachments: Utils.java
>
>
> The CONFIG message from JBoss to apache is always formatted like the following and still uses the resolved ip address instead of the bound to host name:
> Port=8009, Host=127.0.0.1, Type=ajp, StickySessionForce=No, Maxattempts=1
> Even if the Connector is defined like:
> <Connector port="8009" address= "localhost" protocol="AJP/1.3" redirectPort="8443" />
> This can cause issues if apache needs to proxy to JBoss through the host name and not the ip.  This could be corrected by using InetAdress.toString() in org.jboss.modcluster.Utils and parsing the hostname out of this result if provided, for example:
>    public static String getAddress(Connector connector)
>    {
>       Object address = IntrospectionUtils.getProperty(connector.getProtocolHandler(), "address");
>       
>       if (address == null) return "127.0.0.1";
>       if (address instanceof InetAddress)
>       {
>          String addressString = ((InetAddress) address).toString();
>          int index = addressString.indexOf("/");
>          return (index > 0) ? addressString.substring(0, index) : addressString.substring(1);
>       }
>       else
>       {
>          return (String) address;      
>       }
>    }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the mod_cluster-issues mailing list