[mod_cluster-issues] [JBoss JIRA] Created: (MODCLUSTER-203) CLONE - Quotes in jsessionId causing sticky sessions to fail

Jean-Frederic Clere (JIRA) jira-events at lists.jboss.org
Fri Dec 31 03:47:17 EST 2010


CLONE - Quotes in jsessionId causing sticky sessions to fail
------------------------------------------------------------

                 Key: MODCLUSTER-203
                 URL: https://issues.jboss.org/browse/MODCLUSTER-203
             Project: mod_cluster
          Issue Type: Bug
         Environment: JBoss 6 M2, mod_cluster's httpd
            Reporter: Wim Vandenhaute
            Assignee: Jean-Frederic Clere
             Fix For: 1.1.0.CR3


I am having an issue trying to setup sticky sessions for following configuration:

1 httpd front end
2 backend jboss instances

What I am noticing is when running in a cluster, the JSESSIONID contains quotes like:

Set-Cookie: JSESSIONID="DE0F7EEA2A5E90497D729DB27DDB4B25.192.168.7.11:8009:jboss.web"; Version=1; Path=/f00

Whilst not in a cluster:

Set-Cookie: JSESSIONID=355F9E370912DC10187A15E8B02260CD; Path=/foo

Now when I am looking in the httpd logging I see:

mod_proxy_cluster.c(1681): cluster: Found value "54F0CFC4961C9ED14A64335B40645392.192.168.7.11:8009:jboss.web" for stickysession JSESSIONID

In my opinion the quotes around the jsessionid is causing mod_proxy_cluster to fail in finding the jboss node to which to "stick" to.
I recompiled mod_proxy_cluster with "HAVE_CLUSTER_EX_DEBUG" set for more debugging info and this confirmed my suspicion:

mod_proxy_cluster.c(1739): find_nodedomain: finding node for 192.168.7.11:8009:jboss.web": mycluster
mod_proxy_cluster.c(1752): find_nodedomain: finding domain for 192.168.7.11:8009:jboss.web": mycluster

Looking in the code this shows that it was unable to find the node, due to the ending quote in the route.

As for my JBoss Setup:

  * Uncommented ModClusterListener in jbossweb.sar/META-INF/jboss-beans.xml
  * mod_cluster.sar/META-INF/mod_cluster-jboss-beans.xml
    - changed ModClusterService to HAModClusterService
    - changed ${jboss.mod_cluster.advertise.enabled:false} to true

As for my httpd setup:


LoadModule proxy_module /opt/jboss/httpd/lib/httpd/modules/mod_proxy.so
LoadModule proxy_ajp_module /opt/jboss/httpd/lib/httpd/modules/mod_proxy_ajp.so
LoadModule slotmem_module /opt/jboss/httpd/lib/httpd/modules/mod_slotmem.so
LoadModule manager_module /opt/jboss/httpd/lib/httpd/modules/mod_manager.so
LoadModule proxy_cluster_module /opt/jboss/httpd/lib/httpd/modules/mod_proxy_cluster.so
LoadModule advertise_module /opt/jboss/httpd/lib/httpd/modules/mod_advertise.so

LogLevel debug

CreateBalancers 0 

<VirtualHost *:80>

  <Location /mod_cluster-manager>
    SetHandler mod_cluster-manager

    Order deny,allow
    Deny from all
    Allow from all
#    Allow from 192.168.7.
  </Location>

  <Directory />
     Order deny,allow
     Deny from all
     Allow from all
  </Directory>

  ProxyPass /foo balancer://mycluster/foo stickysession=JSESSIONID scolonpathdelim=On nofailover=On

  KeepAliveTimeout 60
  MaxKeepAliveRequests 0
  ManagerBalancerName mycluster
  AdvertiseFrequency 5
 
</VirtualHost>


Listen sebeco-dev-11:443
<VirtualHost *:443>
  ServerName sebeco-dev-11:443
  SSLEngine on
  SSLProxyEngine on
  SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
  SSLCertificateFile "/opt/jboss/httpd/httpd/server.crt"
  SSLCertificateKeyFile "/opt/jboss/httpd/httpd/server.key"
  SSLCertificateChainFile "/opt/jboss/httpd/httpd/server-ca.crt"
  <FilesMatch "\.(cgi|shtml|phtml|php)$">
      SSLOptions +StdEnvVars
  </FilesMatch>

  <Location />
    Order allow,deny
    Allow from all
  </Location>

  ProxyPass /foo balancer://mycluster/foo stickysession=JSESSIONID scolonpathdelim=On nofailover=On
</VirtualHost>


As my setup is not really complex at this point my gut says I am doing something wrong in the setup, but digging in the code shows the opposite.
Any thougts?

Best regards,
Wim.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the mod_cluster-issues mailing list