Bug 1044879 - If "Balancer name includes" uppercase letter in name then mod_cluster will not maintain sticky sessions
Summary: If "Balancer name includes" uppercase letter in name then mod_cluster will no...
Status: VERIFIED
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: mod_cluster
Version: 6.1.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: DR12
: EAP 6.4.0
Assignee: Jean-frederic Clere
QA Contact: Michal Karm Babacek
Nidhi
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-19 07:35 UTC by Dasharath Masirkar
Modified: 2018-12-07 22:33 UTC (History)
4 users (show)

(edit)
In a previous release of JBoss EAP 6, the modcluster module did not maintain sticky sessions if a load balancer's name included upper-case letters.

This issue has been corrected in this release by making the validation of load-balancer names case-insensitive.
Clone Of:
(edit)
Last Closed:


Attachments (Terms of Use)
Sample Web application for reproducing the issue (1.76 KB, application/x-webarchive)
2013-12-19 07:42 UTC, Dasharath Masirkar
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker MODCLUSTER-435 Major Closed If "Balancer name includes" uppercase letter in name then mod_cluster will not maintain sticky sessions 2018-03-07 01:45 UTC

Description Dasharath Masirkar 2013-12-19 07:35:20 UTC
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.

Comment 1 Dasharath Masirkar 2013-12-19 07:42:07 UTC
Created attachment 838794 [details]
Sample Web application for reproducing the issue

Sample Web application ClusterWebApp.war attached to used for reproducing the issue

Comment 2 Jean-frederic Clere 2013-12-20 13:07:08 UTC
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...

Comment 7 Michal Karm Babacek 2014-12-09 14:21:11 UTC
This is fixed https://github.com/modcluster/mod_cluster/pull/125

...and VERIFIED ;-)

Comment 8 Michal Karm Babacek 2014-12-09 14:21:55 UTC
EAP 6.4.0.DR12, mod_cluster 1.2.10.Final

Comment 12 JBoss JIRA Server 2015-08-04 13:38:04 UTC
Michal Karm Babacek <mbabacek@redhat.com> updated the status of jira MODCLUSTER-435 to Closed


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