[mod_cluster-issues] [JBoss JIRA] (MODCLUSTER-306) Backport MODCLUSTER-201 to 1.0.10.GA - update mod_cluster to use HTTP/1.1

Aaron Ogburn (JIRA) jira-events at lists.jboss.org
Fri Mar 8 13:21:42 EST 2013


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

Aaron Ogburn reopened MODCLUSTER-306:
-------------------------------------



I had a customer using this backported fix through the JBPAPP-9571 patch.  They use this along with Siteminder and see STATUS MCMP requests were randomly failing/500ing without any real reason.  Come to find out that any failed STATUS is missing the Host header and so siteminder fails it:
{noformat}
10.170.104.52 - - [06/Mar/2013:12:44:52 -0800] "STATUS / HTTP/1.1" 500 535 "-" "ClusterListener/1.0" 0 375
10.170.104.52 - - [06/Mar/2013:12:44:52 -0800] "STATUS / HTTP/1.1" 500 535 "-" "ClusterListener/1.0" 0 343
10.170.104.52 - - [06/Mar/2013:12:44:56 -0800] "STATUS / HTTP/1.1" 500 535 "-" "ClusterListener/1.0" 0 468
10.170.104.51 - - [06/Mar/2013:12:45:01 -0800] "INFO / HTTP/1.1" 200 5088 "-" "ClusterListener/1.0" 0 848 ina-internal-ch-prd-web1.uboc.com:8466
10.170.104.51 - - [06/Mar/2013:12:45:01 -0800] "INFO / HTTP/1.1" 200 5088 "-" "ClusterListener/1.0" 0 757 ina-internal-ch-prd-web1.uboc.com:8466
10.170.104.51 - - [06/Mar/2013:12:45:01 -0800] "CONFIG / HTTP/1.1" 200 - "-" "ClusterListener/1.0" 0 574 ina-internal-ch-prd-web1.uboc.com:8466

[CSmHttpPlugin.cpp:278][ERROR] Unable to resolve server host name. Exiting with HTTP 500 server error '10-0004'.
{noformat}


Here's DefaultMCMPHandler.sendRequest from the 1.0.10.GA_CP branch currently:
{code:title=DefaultMCMPHandler.java|borderStyle=solid}
      String head = builder.toString();
      int length = encoder.getLength();
      char[] body = encoder.getBuffer();
      
      // Require exclusive access to proxy socket
      synchronized (proxy)
      {
         try
         {
            String line = null;
            StringBuilder proxyheadBuilder = new StringBuilder(head);
            proxyheadBuilder.append(proxy.getAddress().getHostName() + ":" + proxy.getPort());
            String proxyhead = proxyheadBuilder.toString();
            try
            {
               line = sendRequest(proxy, proxyhead, body, length);
            }
            catch (IOException e)
            {
               // Ignore first write failure
            }
            
            if (line == null)
            {
               // Retry failed read/write with fresh connection
               proxy.closeConnection();
               line = sendRequest(proxy, head, body, length);
            }
{code}

So it looks like they occasionally use that second sendRequest, which wasn't updated to use the proxyHead string that was built with the info for the Host header.  I can see we have it proper in master and 1.2 branches though:
{code:title=DefaultMCMPHandler.java|borderStyle=solid}
                try {
                    line = sendRequest(proxy, proxyhead, body);
                } catch (IOException e) {
                    // Ignore first write failure
                }

                if (line == null) {
                    // Retry failed read/write with fresh connection
                    proxy.closeConnection();
                    line = sendRequest(proxy, proxyhead, body);
                }
{code}

Can we correct this in the 1_0_10_GA_CP branch?
                
> Backport MODCLUSTER-201 to 1.0.10.GA - update mod_cluster to use HTTP/1.1
> -------------------------------------------------------------------------
>
>                 Key: MODCLUSTER-306
>                 URL: https://issues.jboss.org/browse/MODCLUSTER-306
>             Project: mod_cluster
>          Issue Type: Feature Request
>    Affects Versions: MOD_CLUSTER_1_0_10_GA_CP02
>            Reporter: Aaron Ogburn
>            Assignee: Jean-Frederic Clere
>            Priority: Minor
>             Fix For: MOD_CLUSTER_1_0_10_GA_CP04
>
>
> Certain technologies like siteminder require the host header which is not present in HTTP/1.0  so siteminder won't work out of the box with HTTP/1.0

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the mod_cluster-issues mailing list