[jboss-user] [Clustering/JBoss] - Migration from mod_jk to mod_proxy

pinipinilla do-not-reply at jboss.com
Mon Jun 15 13:13:24 EDT 2009

I have two servers jboss 4.0.4.GA in cluster. The web server is apache Apache/2.0.52 which is using module mod_jk/1.2.25 to load_balancing and failover. The OS is RHEL AS 4.5. All this system run very well.

I'm trying to migrate this old system to a newer one. The new cluster has two nodes jboss 4.0.4.GA, but the OS is RHEL 5.3 and web server Apache/2.2.3 which is using modules proxy_module,proxy_ajp_module,proxy_balancer_module instead of mod_jk. 

I can't reproduce the behaviour of mod_jk with mod_proxy.
In old system I have the next config files:



With this configuration the static contents was served by apache y the dynamic contents are served by JBoss (*.jsp, *.do, *.asp, etc). Both contents could be in the same directories. For this reason I used /*.do, /*.asp, /*.jsp in uriworkermap.properties.

In other hand the configuration of mod_proxy is:


LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so

<Proxy balancer://mycluster>
  Order deny,allow
  Allow from all

  BalancerMember ajp://nodeA:8009 route=nodo1 retry=60 loadfactor=10
  BalancerMember ajp://nodeB:8009 route=nodo2 retry=60 loadfactor=10

<Location / >
    Allow From All
    ProxyPass balancer://mycluster/ stickysession=JSESSIONID nofailover=on lbmethod=byrequests
    ProxyPassReverse balancer://mycluster/

<Location /balancer>
 SetHandler balancer-manager

 Order Deny,Allow
 Deny from all
 Allow from

ProxyStatus On

With this configuration all the contents are served by jboss nodes.

If I change the <Location / > in order to use the form <Location /*.jsp > or similar it doesn't forward the calls to the JBoss. I want to achieve the same behaviour that I achieved with uriworkermap.properties.

In Addition I think the stickysession is not running. I've made a jsp (whoami.jsp) who tell me what's the node which is serving the page. I've detected the next behaviour:

>From a Browser I request the page whoami.jsp and when the response is given by the server A, If I refresh this page the next times, I get the response from server B. Why is not served by the server A?

Do you know what is happening and how could i get the same behaviour like the mod_jk?

Thanks in advance

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4237720#4237720

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4237720

More information about the jboss-user mailing list