JBoss7 load balancing with mod_proxy_balancer - session not working

Posted by Phil P. on Server Fault See other posts from Server Fault or by Phil P.
Published on 2013-12-01T14:58:19Z Indexed on 2014/05/28 3:33 UTC
Read the original article Hit count: 419

Filed under:
|
|

I am trying to set up mod_proxy_balancer for routing requests to 2 jboss7-servers. For the time being I am testing this setup on my local machine, using following config in httpd.conf:

ProxyRequests Off
<Proxy \*>
   Order deny,allow
   Deny from all
</Proxy>

ProxyPass / balancer://mycluster/ stickysession=JSESSIONID|jsessionid scolonpathdelim=On
<Proxy balancer://mycluster>
BalancerMember http://localhost:8080 route=node1
BalancerMember http://localhost:8081 route=node2    
Order allow,deny
Allow from all
</Proxy>

and in the standalone.xml file of each jboss I have defined the jvmRoute system property:

<system-properties>
    <property name="jvmRoute" value="node1"/>  
</system-properties>

At http:// localhost/myapp the application is accessible but the java-session is not build up correctly. Consequently the authentication is not working.

The funny thing is, that everything is working if I turn off one JBoss-instance.

As I have tried a couple of settings already, I am thankful for any further suggestions.

© Server Fault or respective owner

Related posts about mod-proxy

Related posts about jboss