Pradeep Phalgunan Kalliat wrote:
Hi All,

I've two webapps CoW and CoWTraining, each of which are load balanced by Apache 
2.2.4 over two tomcat nodes running as services. i.e. two nodes for CoW  and 
two for the other. This is set up in one server machine. Both the webapps are 
identical in functionality and operation but just that they are served by 
different hosts.

The problem is that when I try to access CoWTraining in the same window after I 
access CoW, the server throws a 'Service Temporarily Unavailable' message. 
However, if I access CoWTraining first and then CoW, there are no problems. 
Also in this case, if I go further and access CoWTraining again there are still 
no problems. The error occurs only if I try to access CoWTraining in a window 
in which I've accessed CoW. There are no problems trying to access other 
applications in the same window.

The reason I think this is related to apache is because I had both these 
webapps installed on one tomcat node and tested without the load balancing.

My httpd.conf file has the following references to these applications in the 
same sequence.

--------------------------------------------------------------------------
<Location /CoW>
        ProxyPass               balancer://cluster-CoW/CoW 
stickysession=JSESSIONID nofailover=On
        ProxyPassReverse        balancer://cluster-CoW/CoW
</Location>

<Location /CoWTraining>
        ProxyPass               balancer://cluster-CoWTraining/CoWTraining 
stickysession=JSESSIONID nofailover=On
        ProxyPassReverse        balancer://cluster-CoWTraining/CoWTraining
</Location>


<Proxy balancer://cluster-CoW>
BalancerMember ajp://localhost:9209 route=tomcat70 retry=60 loadfactor=50 BalancerMember ajp://localhost:9309 route=tomcat71 retry=60 loadfactor=50
        ProxySet lbmethod=bytraffic
</Proxy>

<Proxy balancer://cluster-CoWTraining>
        BalancerMember ajp://localhost:9409 route=tomcat72 retry=60 
loadfactor=50
        BalancerMember ajp://localhost:9509 route=tomcat73 retry=60 
loadfactor=50
        ProxySet lbmethod=bytraffic
</Proxy>

RewriteEngine  on
RewriteRule    ^/CoW$  /CoW/  [R]
RewriteRule    ^/CoWTraining$  /CoWTraining/  [R]

--------------------------------------------------------------------------

There are no errors in the tomcat logs. The apache logs have a lot of these 
kind of errors

--------------------------------------------------------------------------
[error] (OS 10061)No connection could be made because the target machine 
actively refused it.  : proxy: AJP: attempt to connect to 127.0.0.1:9509 
(localhost) failed
[error] (OS 10061)No connection could be made because the target machine 
actively refused it.  : proxy: AJP: attempt to connect to 127.0.0.1:9409 
(localhost) failed
[error] ap_proxy_connect_backend disabling worker for (localhost)
[error] proxy: AJP: failed to make connection to backend: localhost
[error] proxy: BALANCER: (balancer://cluster-cowtraining). All workers are in 
error state for route (tomcat73)
--------------------------------------------------------------------------

Any help would be greatly appreciated. I've already done a lot of googling with 
not much results.

Hi.
That is a very good problem description.
Just to be complete, could you post also the content of the active corresponding <Connector> tags of your Tomcat servers ?
(since they are apparently the side that refuses the connection).

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [email protected]
  "   from the digest: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to