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

kfaella kmf at uri.edu
Thu Aug 27 12:00:32 PDT 2009


Big thanks to Sam Ottenhoff and Earke Nietzel for coming to my rescue here.  

The problem was that my serverId in sakai.properties did not match my
jvmroute (server.xml) and my route (httpd.conf).  There is a question of
whether the jvmroute and route on the balancermember are required or whether
Sakai could function without them, by using serverId i would guess.

It is also, as mentioned in the Sakai Admin Guide, extremely imperative that
the apache version be at least 2.2.4.  I  upgraded mine from 2.2.3  to
2.2.13!

Thanks again community!

Kathy Faella


kfaella wrote:
> 
> 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-tp25167556p25177985.html
Sent from the Sakai - Development mailing list archive at Nabble.com.



More information about the sakai-dev mailing list