[Building Sakai] Fwd: Sakai load balancing (self fires requestslike machne gun).

Sergio Pili sergiop at unitech.com.ar
Wed Apr 1 08:57:16 PDT 2009


Hi,

 

Depending on apache version you should set or not a ‘/’ behind
balancer://sakaiCluster/, so try whith or with out it.

 

And should check serverid property on sakai.properties. Serverid should be
tomcat1 for your first server and tomcat2 for the second server. This value
overwrite jvmroute on tomcat server.xml

 

Regards,

 Ing. Sergio A. Pili
 <mailto:sergiop at unitech.com.ar> sergiop at unitech.com.ar

Unitech
Puede confiar en nosotros. Nos respaldan más de 15 años de buenas prácticas.

  _____  

De: sakai-dev-bounces at collab.sakaiproject.org
[mailto:sakai-dev-bounces at collab.sakaiproject.org] En nombre de Nuno
Fernandes
Enviado el: Lunes, 23 de Marzo de 2009 12:14
Para: sakai-dev
Asunto: [Building Sakai] Fwd: Sakai load balancing (self fires requestslike
machne gun).

 

Forwarding to the list so you can get more suggestions...

 

Nuno

---------- Forwarded message ----------
From: Ahmed Dini <asdini at hotmail.com>
Date: 2009/3/23
Subject: RE: [Building Sakai] Sakai load balancing (self fires requests like
machne gun).
To: nuno at ufp.edu.pt



Thanks Nuno, Thanks for the help.
 
I have tried your solution still no luck. 
 
I have a standalone JFroum web application on the two instances of Tomcat.
I am able to browse, log in, log out, it is working fine.
But it does not work with sakai.  It doesn't even allow you to log in. or
display the first page without refreshing.
 
Thanks again. Help please
 

  _____  

Date: Mon, 23 Mar 2009 09:41:04 +0000


Subject: Re: [Building Sakai] Sakai load balancing (self fires requests like
machne gun).

From: nuno at ufp.edu.pt


To: asdini at hotmail.com
CC: sakai-dev at collab.sakaiproject.org

Hi Ahmed, 

 

We are also using mod_proxy_ajp both in development and production servers.
The configuration looks much like yours, but we use ProxyPassMatch instead
of ProxyPass:

 

ProxyPassMatch /* balancer://sakaiCluster stickysession=JSESSIONID
nofailover=on maxattempts=2

<Proxy balancer://sakaiCluster>

        BalancerMember ajp://localhost:8009 loadfactor=15 route=elearning-a

        BalancerMember ajp://localhost:9009 loadfactor=20 route=elearning-b
redirect=elearning-c status=D

        BalancerMember ajp://10.11.100.162:10009
<http://10.11.100.162:10009/>  loadfactor=40 route=elearning-c

        BalancerMember ajp://10.11.100.162:11009
<http://10.11.100.162:11009/>  loadfactor=40 route=elearning-d

</Proxy>

(In this case, node B is disabled)

 

And, for the content we don't want to be catched by tomcat:

ProxyPass /balancer-manager !

ProxyPass /wiki !

(and so on)

 

Do you have any redirections in httpd configuration (using mod_rewrite, for
example?) that may be interfering?

 

Hope it helps,

Nuno

 

 

2009/3/22 Ahmed Dini <asdini at hotmail.com>

 
Thanks Aaron for the reply.
 
I am still having the problem, I thought I was using load balancing with
sticky sessions enabled.  Below is what I did so far.
 
In apache httpd.properties
 
I enabled:-
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
 
In this same file I also included:-
 
ProxyPass / balancer://sakaiCluster/ stickysession=JSESSIONID nofailover=On
lbmethod=bytraffic  
<Proxy balancer://sakaiCluster>
          BalancerMember ajp://localhost:18009 route=tomcat1
          BalancerMember ajp://localhost:28009 route=tomcat2
</Proxy>
<Location /manager>
        SetHandler balancer-manager
        Order deny,allow
        Deny from all
        Allow from 127.0.0.1
</Location>
 
In the server.xml of tomcat1
 
    <Server port="18005" shutdown="SHUTDOWN">
      
    <!-- Define a non-SSL HTTP/1.1 Connector on port 8080 --> this might not
be relevant but i just enabled
     <Connector port="18080" maxHttpHeaderSize="8192"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               connectionTimeout="20000" disableUploadTimeout="true" />
 
    <Connector port="18009" 
               enableLookups="false" redirectPort="8443" protocol="AJP/1.3"
/>
 
  <Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcat1">
 
In the server.xml of tomcat2
 
    <Server port="28005" shutdown="SHUTDOWN">
         
     <Connector port="28080" maxHttpHeaderSize="8192"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               connectionTimeout="20000" disableUploadTimeout="true" />
 
       <Connector port="28009" 
               enableLookups="false" redirectPort="8443" protocol="AJP/1.3"
/>
        
       <Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcat2">
 
In addition to That I am also getting warning in the console of one of the
tomcat instances.
 
  WARN: run(): ghost-busting server: Bar Ama Baro-1237730244240 from : Bar
Ama Baro 1237737377592 <2009-03-22 15:47, 35
SakaiClusterService.Mainatanance_org.Sakaiproject.cluster.impl.SakaiClusterS
ervice>
 
I also attached few lines from the apache/logs/Access produced from a single
request in the browser.  All I did, was type the url and hit enter. and it
sent requests continuesly. I am thinking that this is all happening within
second (please look at the time stamp).
 
[22/Mar/2009:16:47:28 +0000] "GET /portal/tool/!gateway-120?panel=Main
HTTP/1.1" 200 678
[22/Mar/2009:16:47:28 +0000] "GET /portal/tool/!gateway-110?panel=Main
HTTP/1.1" 200 678
[22/Mar/2009:16:47:28 +0000] "GET /portal HTTP/1.1" 200 7357
[22/Mar/2009:16:47:28 +0000] "GET /portal/tool/!gateway-110?panel=Main
HTTP/1.1" 200 678
 [22/Mar/2009:16:47:28 +0000] "GET /portal/tool/!gateway-120?panel=Main
HTTP/1.1" 200 678
 [22/Mar/2009:16:47:28 +0000] "GET /portal HTTP/1.1" 200 7357
 [22/Mar/2009:16:47:28 +0000] "GET /portal/tool/!gateway-110?panel=Main
HTTP/1.1" 200 678
[22/Mar/2009:16:47:28 +0000] "GET /portal/tool/!gateway-120?panel=Main
HTTP/1.1" 200 678
[22/Mar/2009:16:47:28 +0000] "GET /portal HTTP/1.1" 200 7357
 [22/Mar/2009:16:47:28 +0000] "GET /portal/tool/!gateway-120?panel=Main
HTTP/1.1" 200 678
 [22/Mar/2009:16:47:28 +0000] "GET /portal/tool/!gateway-110?panel=Main
HTTP/1.1" 200 678
[22/Mar/2009:16:47:28 +0000] "GET /portal HTTP/1.1" 200 7357
 [22/Mar/2009:16:47:28 +0000] "GET /portal/tool/!gateway-120?panel=Main
HTTP/1.1" 200 678
 [22/Mar/2009:16:47:28 +0000] "GET /portal/tool/!gateway-110?panel=Main
HTTP/1.1" 200 678
[22/Mar/2009:16:47:28 +0000] "GET /portal HTTP/1.1" 200 7357
[22/Mar/2009:16:47:28 +0000] "GET /portal/tool/!gateway-110?panel=Main
HTTP/1.1" 200 678
 [22/Mar/2009:16:47:28 +0000] "GET /portal/tool/!gateway-120?panel=Main
HTTP/1.1" 200 678
 [22/Mar/2009:16:47:28 +0000] "GET /portal HTTP/1.1" 200 7357
[22/Mar/2009:16:47:28 +0000] "GET /portal/tool/!gateway-120?panel=Main
HTTP/1.1" 200 678
 [22/Mar/2009:16:47:28 +0000] "GET /portal/tool/!gateway-110?panel=Main
HTTP/1.1" 200 678
[22/Mar/2009:16:47:28 +0000] "GET /portal HTTP/1.1" 200 7357
 [22/Mar/2009:16:47:28 +0000] "GET /portal/tool/!gateway-120?panel=Main
HTTP/1.1" 200 678
[22/Mar/2009:16:47:28 +0000] "GET /portal/tool/!gateway-110?panel=Main
HTTP/1.1" 200 678
[22/Mar/2009:16:47:28 +0000] "GET /portal HTTP/1.1" 200 7357
 
 
 
> Date: Sun, 22 Mar 2009 08:32:14 +0000
> Subject: Re: [Building Sakai] Sakai load balancing (self fires requests
like machne gun).
> From: aaronz at vt.edu
> To: asdini at hotmail.com
> CC: sakai-dev at collab.sakaiproject.org 


> 
> Sounds like you are using a round-robin strategy when you need to be
> using a sticky-session strategy for load balancing. Try that and see
> if it fixes it.
> -AZ
> 
> 
> On Sun, Mar 22, 2009 at 5:27 AM, Ahmed Dini <asdini at hotmail.com> wrote:
> > Hello, Everybody,
> >
> >
> >
> > I have finished integrating Apache with tomcat.  I have two instances of
> > Tomcat running on my machine and I am trying to load balance the two
> > instances using mod_proxy_ajp.
> >
> >
> >
> > The problem is, if I run one instance of tomcat, everything works fine.
But
> > when I run the second tomcat and access it through
> > http://localhost/ apache's url, the gateway page of Sakai starts
flushing as
> > if it is firing requesting like a machine gun to apache. I can't click
on
> > any link because it is flushing so fast.
> >
> > To see if the problem has something to do with my load balancing, I have
> > placed two static index.html files in the Webapp/ROOT directories of
both
> > tomcat instances, but, it worked fined. it doesn't flush this time, and
> > every time I refresh manually it shows the index pages in turns. My
guess of
> > the problem is that my sakai load balancing settings are not correct,
but i
> > don't know where i can set them. I could not  find any thing in the
> > sakai.properties file. Remeber if I shutdown one of the tomcat instances
the
> > remaining one works, both will work, it doesn't matter which one I
close.
> >
> >
> >
> > I have tried all versions of tomcat, 5.5.26 and 5.5.27 with both sakai
2.5.4
> > and 2.6.0-beta-3.
> >
> >
> >
> > Please Help.
> > ________________________________
> > Windows Live just got better. Find out more!
> > _______________________________________________
> > sakai-dev mailing list
> > sakai-dev at collab.sakaiproject.org
> > http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
> >
> > TO UNSUBSCRIBE: send email to
sakai-dev-unsubscribe at collab.sakaiproject.org
> > with a subject of "unsubscribe"
> >
> >
> 
> 
> 
> -- 
> Aaron Zeckoski (aaronz at vt.edu)
> Senior Research Engineer - CARET - Cambridge University
> [http://bugs.sakaiproject.org/confluence/display/~aaronz/]
> Sakai Fellow - [http://aaronz-sakai.blogspot.com/]

  _____  

Share your photos with Windows Live Photos – Free. Try it
<http://clk.atdmt.com/UKM/go/134665338/direct/01/>  Now!


_______________________________________________
sakai-dev mailing list
sakai-dev at collab.sakaiproject.org
http://collab.sakaiproject.org/mailman/listinfo/sakai-dev

TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org
with a subject of "unsubscribe"




-- 
Nuno Fernandes  [www.linkedin.com/in/nfgrilo]
Software Developer - UFP-UV  [Universidade Virtual]
Software Developer - Sakai Foundation  [sakaiproject.org
<http://sakaiproject.org/> ]
Sakai Fellow 2008 - Sakai Foundation
[confluence.sakaiproject.org/confluence/x/FIF9AQ]

Universidade Fernando Pessoa  [www.ufp.pt <http://www.ufp.pt/> ]
Praça 9 de Abril, 349
4249-004 Porto
tel: + 351 22 507 13 00
fax: + 351 22 550 82 69

 

  _____  

Windows Live Messenger just got better. Find
<http://clk.atdmt.com/UKM/go/134665230/direct/01/>  out more!




-- 
Nuno Fernandes  [www.linkedin.com/in/nfgrilo]
Software Developer - UFP-UV  [Universidade Virtual]
Software Developer - Sakai Foundation  [sakaiproject.org]
Sakai Fellow 2008 - Sakai Foundation
[confluence.sakaiproject.org/confluence/x/FIF9AQ]

Universidade Fernando Pessoa  [www.ufp.pt]
Praça 9 de Abril, 349
4249-004 Porto
tel: + 351 22 507 13 00
fax: + 351 22 550 82 69

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20090401/5cc6bd79/attachment-0001.html 


More information about the sakai-dev mailing list