segmentation fault with nofailover=On and proxy in virtual host
---------------------------------------------------------------
Key: MODCLUSTER-261
URL:
https://issues.jboss.org/browse/MODCLUSTER-261
Project: mod_cluster
Issue Type: Bug
Affects Versions: 1.1.3.Final
Environment: RHEL 5.7, Apache HTTPD 2.2.3 (packaged) or Apache HTTPD 2.2.21
(compiled), EAP 5.1.1
Reporter: Tomas Huryn
Assignee: Jean-Frederic Clere
Priority: Blocker
we have
- two clusters (2 JBoss instances for cluster1 (inst1 and inst2), 1 JBoss instance for
cluster2 (inst3)). All instances run on the same machine (as) with binding manager
- AJP on JBoss (port 8009 (inst1), 8109 (inst2), 8209 (inst3))
- root context enabled, application is in ROOT.war
- defined jvmRoute in server.xml (inst1 -Djboss.web.jvmRoute=as.jb1 , inst2
-Djboss.web.jvmRoute=as.jb2 , inst3 -Djboss.web.jvmRoute=as.cms1)
- Apache HTTPD runs on separate machine (ws)
we need
- cluster1 has connection to inst1 and inst2 with sticky session (client with one session
will be routed to one instance only)
- cluster2 has connection to inst3
We had tryed 2 solutions with no success:
SOLUTION 1
- all in virtual host
<VirtualHost externalip:8080>
ServerName web1
<Proxy balancer://cluster1/>
Order deny,allow
Allow from all
BalancerMember ajp://as:8009/ route=as.jb1
BalancerMember ajp://as:8109/ route=as.jb2
</Proxy>
ProxyPass / balancer://cluster1/ stickysession=JSESSIONID|jsessionid nofailover=On
ProxyPassReverse / balancer://cluster1/
</VirtualHost>
<VirtualHost externalip:8080>
ServerName web2
<Proxy balancer://cluster2/>
Order deny,allow
Allow from all
BalancerMember ajp://as:8209/ route=as.cms1
</Proxy>
ProxyPass / balancer://cluster2/ stickysession=JSESSIONID|jsessionid nofailover=On
ProxyPassReverse / balancer://cluster2/
</VirtualHost>
Result:
Solution generate segmentation fault in error log, where somebody try to browse web. If
we remove nofailover=On, all works fine except stick session - requests are splited to
inst1 and inst2.
SOLUTION2
- apache wide configuration
<Proxy balancer://cluster1/>
Order deny,allow
Allow from all
BalancerMember ajp://as:8009/ route=as.jb1
BalancerMember ajp://as:8109/ route=as.jb2
</Proxy>
<Proxy balancer://cluster2/>
Order deny,allow
Allow from all
BalancerMember ajp://as:8209/ route=as.cms1
</Proxy>
<VirtualHost externalip:8080>
ServerName web1
ProxyPass / balancer://cluster1/ stickysession=JSESSIONID|jsessionid nofailover=On
ProxyPassReverse / balancer://cluster1/
</VirtualHost>
<VirtualHost externalip:8080>
ServerName web2
ProxyPass / balancer://cluster2/ stickysession=JSESSIONID|jsessionid nofailover=On
ProxyPassReverse / balancer://cluster2/
</VirtualHost>
Result:
Sticky session works fine (no segmentation fault), but requests for web1 is routed to
inst3 (cluster2) too and requests for web2 is routed to inst1 (cluster1) too. So there is
problem with existence of two proxy cluster conffiguration directive.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira