[Building Sakai] Multiple sakai/tomcat instances with apache mod_proxy_ajp loadbalancing

kfaella kmf at uri.edu
Thu Aug 27 05:34:31 PDT 2009


We here at the University of Rhode Island are facing our first semester of
Sakai only (no WebCT) and I am trying to run multiple Sakai instances behind
an apache load balancer with mod_proxy_ajp.  We are running Sakai 2.5.4 on
RedHat AS 5, Tomcat 5.5.26, apache 2.2.13.

I have two instances up and running on a dev server.  The first sakaidev1 is
using the following in its server.xml
<Server port="8005" shutdown="SHUTDOWN">

<!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8009"
               enableLookups="false" redirectPort="8443" protocol="AJP/1.3"
               URIEncoding="UTF-8" />

<Engine name="Catalina" defaultHost="localhost" jvmRoute="dev1">

The instance sakaidev2 has the following in server.xml
<Server port="8006" shutdown="SHUTDOWN">

<!-- Define an AJP 1.3 Connector on port 8010 -->
    <Connector port="8010"
               enableLookups="false" redirectPort="8443" protocol="AJP/1.3"
/>
 
<Engine name="Catalina" defaultHost="localhost" jvmRoute="dev2">

My uri.conf which is included by httpd.conf contains the following:

<VirtualHost _default_:443>
ProxyRequests off
ProxyPreserveHost on

<Proxy *>
Order deny,allow
Allow from all
</Proxy>

ProxyPassMatch / balancer://SakaiCluster/ stickysession=JSESSIONID
nofailover=On
#ProxyPass / balancer://SakaiCluster/ stickysession=JSESSIONID nofailover=On
#ProxyPassReverse / balancer://SakaiCluster/

<Proxy balancer://SakaiCluster>
#ProxySet lbmethod=byrequests
BalancerMember ajp://localhost:8009/ route=dev1
BalancerMember ajp://localhost:8010/ route=dev2
</Proxy>

</VirtualHost>         

I have tried various combinations of ProxyPass with and without the
ProxyPassReverse, ProxyPassMatch and have turned on and off the ProxySet. 

In all cases, when both BalancerMembers are present it appears that
Sakai(tomcat) and apache can not keep the sessions/routes straight and
although I am presented with the portal page I can not logon to sakai.  If I
remove a BalancerMember, ie, balance to just one instance, all is fine. 

When I check the cookies that my browser has set I see them labelled
  Name: JSESSIONID
  Content: {randomness}.SakaiDev1  or {randomness}.SakaiDev2   sample
a1e28348-a4ed-4463-a3b5-4f48287b048a.SakaiDev1
  Host: sakaidev.uri.edu
  Path: /
  Send for: Encrypted connections only
  Expires: at end of session


I have upgraded my apache to 2.2.13 after discovering that there are many
patches in this area between the RedHat 5 default of 2.2.3 and now!

Does anyone have this kind of setup running in production!??!  Does anyone
have any ideas about what may be going on.  I have googled and read and
tried just about everything I can think of.  

Thanks for any and all help!

Kathy Faella
University of Rhode Island
University Computing Systems
210 Flagg Road
Kingston, RI  02881
ph. (401) 874-4469

-- 
View this message in context: http://www.nabble.com/Multiple-sakai-tomcat-instances-with-apache-mod_proxy_ajp-loadbalancing-tp25167556p25167556.html
Sent from the Sakai - Development mailing list archive at Nabble.com.



More information about the sakai-dev mailing list