Hide Forgot
Description of problem: If "Balancer name includes" uppercase latter in name then modcluster will not maintain sticky sessions Version-Release number of selected component (if applicable): EAP 6.1.1 mod-cluster 1.2.4.Final How reproducible: Always Steps to Reproduce: 1. Install two instances of EAP 6.1.1 with HA profile e.g. standalone-ha.xml 2. Add instance-id to web subsystem to set JVM route using CLI : node 1: /subsystem=web/:write-attribute(name=instance-id,value=node1) node 2: /subsystem=web/:write-attribute(name=instance-id,value=node2) 3. start both nodes : start node1 : ./standalone.sh -Djboss.socket.binding.port-offset=100 -Djboss.node.name=node1 start node2 : ./standalone.sh -Djboss.socket.binding.port-offset=200 -Djboss.node.name=node2 4. Deploy sample ClusterWebApp.war to both nodes using CLI. - connect to node1 CLI and deploy deploy /opt/ClusterWebApp.war - connect to node2 CLI and deploy deploy /opt/ClusterWebApp.war 5. Configure Apache httpd 2.2.15 with modcluster e.g. mod_cluster.conf ######################################### LoadModule slotmem_module modules/mod_slotmem.so LoadModule manager_module modules/mod_manager.so LoadModule proxy_cluster_module modules/mod_proxy_cluster.so LoadModule advertise_module modules/mod_advertise.so Listen *:6666 Listen *:80 <VirtualHost *:6666> <Directory /> Order deny,allow Allow from 127.0.0.1 </Directory> KeepAliveTimeout 60 ManagerBalancerName testCluster CreateBalancers 1 MaxKeepAliveRequests 0 ServerAdvertise On ErrorLog logs/modcluster.log LogLevel debug EnableMCPMReceive true </VirtualHost> <Location /mod_cluster-manager> SetHandler mod_cluster-manager Order deny,allow Allow from 127.0.01 </Location> <VirtualHost *:80> ErrorLog logs/VH80error.log LogFormat "%h %l %u %t \"%r\" %>s %b %{COOKIE}i %{SET-COOKIE}o %T" combined_all CustomLog logs/VH80acces.log combined_all LogLevel debug ProxyPass /ClusterWebApp balancer://testCluster/ClusterWebApp stickysession=JSESSIONID|jsessionid nofailover=On </VirtualHost> ############################################## Actual results: For the same session the request will jump between node1 and node2 i.e. modcluster will not maintain sticky sessions Expected results: For the same session the request must be sticky to the node where the session got initially created as long as the node is available i.e. modcluster has to maintain sticky sessions Additional info: From Apache access logs it shows that for same session k6PZjThLwPeuXkoq5KR6PpmH request jumping from node 1 to node2. 127.0.0.1 - - [19/Dec/2013:12:02:10 +0530] "GET / HTTP/1.1" 200 923 JSESSIONID=k6PZjThLwPeuXkoq5KR6PpmH.node1 JSESSIONID=k6PZjThLwPeuXkoq5KR6PpmH.node2; Path=/ 0 127.0.0.1 - - [19/Dec/2013:12:02:10 +0530] "GET / HTTP/1.1" 200 923 JSESSIONID=k6PZjThLwPeuXkoq5KR6PpmH.node2 - 0 127.0.0.1 - - [19/Dec/2013:12:02:12 +0530] "GET / HTTP/1.1" 200 923 JSESSIONID=k6PZjThLwPeuXkoq5KR6PpmH.node2 - 0 127.0.0.1 - - [19/Dec/2013:12:02:14 +0530] "GET / HTTP/1.1" 200 923 JSESSIONID=k6PZjThLwPeuXkoq5KR6PpmH.node2 JSESSIONID=k6PZjThLwPeuXkoq5KR6PpmH.node1; Path=/ 0 127.0.0.1 - - [19/Dec/2013:12:02:14 +0530] "GET / HTTP/1.1" 200 923 JSESSIONID=k6PZjThLwPeuXkoq5KR6PpmH.node1 - 0 127.0.0.1 - - [19/Dec/2013:12:02:15 +0530] "GET / HTTP/1.1" 200 923 JSESSIONID=k6PZjThLwPeuXkoq5KR6PpmH.node1 - 0 127.0.0.1 - - [19/Dec/2013:12:02:15 +0530] "GET / HTTP/1.1" 200 923 JSESSIONID=k6PZjThLwPeuXkoq5KR6PpmH.node1 JSESSIONID=k6PZjThLwPeuXkoq5KR6PpmH.node2; Path=/ 0 127.0.0.1 - - [19/Dec/2013:12:02:15 +0530] "GET / HTTP/1.1" 200 923 JSESSIONID=k6PZjThLwPeuXkoq5KR6PpmH.node2 - 0 127.0.0.1 - - [19/Dec/2013:12:02:19 +0530] "GET / HTTP/1.1" 200 923 JSESSIONID=k6PZjThLwPeuXkoq5KR6PpmH.node2 - 0 127.0.0.1 - - [19/Dec/2013:12:02:19 +0530] "GET / HTTP/1.1" 200 923 JSESSIONID=k6PZjThLwPeuXkoq5KR6PpmH.node2 JSESSIONID=k6PZjThLwPeuXkoq5KR6PpmH.node1; Path=/ 0 127.0.0.1 - - [19/Dec/2013:12:02:19 +0530] "GET / HTTP/1.1" 200 923 JSESSIONID=k6PZjThLwPeuXkoq5KR6PpmH.node1 - 0 127.0.0.1 - - [19/Dec/2013:12:02:19 +0530] "GET / HTTP/1.1" 200 923 JSESSIONID=k6PZjThLwPeuXkoq5KR6PpmH.node1 - 0 127.0.0.1 - - [19/Dec/2013:12:02:20 +0530] "GET / HTTP/1.1" 200 923 JSESSIONID=k6PZjThLwPeuXkoq5KR6PpmH.node1 - 0 127.0.0.1 - - [19/Dec/2013:12:02:20 +0530] "GET / HTTP/1.1" 200 923 JSESSIONID=k6PZjThLwPeuXkoq5KR6PpmH.node1 JSESSIONID=k6PZjThLwPeuXkoq5KR6PpmH.node2; Path=/ 0 127.0.0.1 - - [19/Dec/2013:12:02:20 +0530] "GET / HTTP/1.1" 200 923 JSESSIONID=k6PZjThLwPeuXkoq5KR6PpmH.node2 - 0 127.0.0.1 - - [19/Dec/2013:12:02:20 +0530] "GET / HTTP/1.1" 200 923 JSESSIONID=k6PZjThLwPeuXkoq5KR6PpmH.node2 - 0 127.0.0.1 - - [19/Dec/2013:12:02:21 +0530] "GET / HTTP/1.1" 200 923 JSESSIONID=k6PZjThLwPeuXkoq5KR6PpmH.node2 - 0 127.0.0.1 - - [19/Dec/2013:12:02:21 +0530] "GET / HTTP/1.1" 200 923 JSESSIONID=k6PZjThLwPeuXkoq5KR6PpmH.node2 JSESSIONID=k6PZjThLwPeuXkoq5KR6PpmH.node1; Path=/ 0 127.0.0.1 - - [19/Dec/2013:12:02:21 +0530] "GET / HTTP/1.1" 200 923 JSESSIONID=k6PZjThLwPeuXkoq5KR6PpmH.node1 - 0 If balancer name set to lower-case (e.g. ManagerBalancerName testcluster ), modcluster will maintain the sticky session.
Created attachment 838794 [details] Sample Web application for reproducing the issue Sample Web application ClusterWebApp.war attached to used for reproducing the issue
In fact it is linked to the folliwng problem in mod_proxy_balancer. If the Proxy balancer://... is in the mean VirtualHost and the ProxyPass is in a child VirtualHost the balancer configuration after the ProxyPass looks ignored...
This is fixed https://github.com/modcluster/mod_cluster/pull/125 ...and VERIFIED ;-)
EAP 6.4.0.DR12, mod_cluster 1.2.10.Final
Michal Karm Babacek <mbabacek> updated the status of jira MODCLUSTER-435 to Closed