I have a setup with 1 mod_cluster (1.3.0) and 2 JBoss (6.3.3). I am trying to use stickysession but I cannot see the cookie in the response and the requests are being served by different nodes.
Using default mod_cluster config (with my IP)
<IfModule manager_module>
Listen 156.24.221.149:6666
ManagerBalancerName mycluster
<VirtualHost 156.24.221.149:6666>
<Location />
Require ip 156.24
</Location>
KeepAliveTimeout 300
MaxKeepAliveRequests 0
#ServerAdvertise on http://@IP@:6666
AdvertiseFrequency 5
#AdvertiseSecurityKey secret
#AdvertiseGroup @ADVIP@:23364
EnableMCPMReceive
</VirtualHost>
<Location /mod_cluster_manager>
SetHandler mod_cluster-manager
Require ip 156.24
</Location>
</IfModule>
I tried using ProxyPass as well but according to this response (Sticky session not working with multiple apache vhosts and multiple JBoss 7.2 server-groups) it is now redundant and sticky should be default behaviour.
Edit #2: no longer using this virtual host definition ServerName dar.com
# ProxyPass / balancer://mycluster stickysession=JSESSIONID
# ProxyPassReverse / balancer://mycluster
# ProxyPreserveHost On
ErrorLog "logs/vhost1_error.log"
CustomLog "logs/vhost1_access.log" common
</VirtualHost>
Did not change JBoss config, just running standalone-ha.xml
Any advice on how to solve/debug this issue?
Thanks.
Edit: added mod_cluster snapshot. For the record, I had to take the mod_cluster config in the httpd.conf file outside the virtual host definiton (otherwise I could not access the resource).