Like the example in the book, I created a file called "proxy-balancer.conf" and put it in the "conf.d" directory. Here is what the file looks like (I retyped it so there may be mistakes):
<IfModule !proxy_module> LoadModule proxy_module modules/mod_proxy.so </IfModule> # <IfModule !proxy_ajp_module> # LoadModule proxy_ajp_module modules/mod_proxy_ajp.so # </IfModule> <IfModule !proxy_http_module> LoadModule proxy_http_module modules/mod_proxy_http.so </IfModule> <IfModule !proxy_balancer_module> LoadModule proxy_balancer_module modules/mod_proxy_balancer.so </IfModule> <IfModule !status_module> LoadModule status_module modules/mod_status.so </IfModule> <IfModule !proxy_balancer_module> ProxyRequests Off <Proxy balancer://tccluster> BalancerMember http://192.168.1.101:8080 loadfactor=1 max=150 smax=145 BalancerMember http://192.168.1.102:8080 loadfactor=1 max=150 smax=145 BalancerMember http://192.168.1.103:8080 loadfactor=1 max=150 smax=145 Order Deny,Allow Allow from all </Proxy> <Location /balancer-manager> SetHandler balancer-manager Order Deny,Allow Allow from all </Location> <Location /my-webapp> ProxyPass balancer://tccluster/my-webapp stickysession-jsessionid ProxyPassReverse balancer://tccluster/my-webapp Order Deny,Allow Allow from all </Location> <Location /examples> ProxyPass balancer://tccluster/examples stickysession-jsessionid ProxyPassReverse balancer://tccluster/examples Order Deny,Allow Allow from all </Location> </IfModule> ________________________________________ From: Filip Hanik - Dev Lists [devli...@hanik.com] Sent: Tuesday, March 10, 2009 11:29 AM To: Tomcat Users List Subject: Re: Need Hellp With Tomcat 6 / Apache 2.2 Cluster Problem what does the cluster section of your httpd look like? Alston, Brian (US SSA) wrote: > I have one Apache http server version 2.2.3 (on Red Hat Enterprise Linux 5) > and three Tomcat 6 version 6.0.18 servers (on Windows Server 2003) running in > my cluster. Everything "appears" to be working well. It looks like it is > using RoundRobin because every time I refresh the page it goes from web001 -> > web002 -> web003 -> web001 -> etc. I used some of the examples that are > provided with Tomcat in the "examples" directory - specifically the > "Sessions" servlet and it looks like my sessions are staying the same and > holding information. My issue is this. When I stop one of the Tomcat servers > (let's say web002), I will sometimes get the following error message when I > refresh the page: > > - - - - - - - - - - > > Proxy Error > > The proxy server received an invalid response from an upstream server. > The proxy server could not handle the request GET /examples/instance.html. > > Reason: Error reading from remote server > > Apache/2.2.3 (Red Hat) Server at 150.37.0.20 Port 80 > > - - - - - - - - - - > > I don't receive this error message every single time I refresh the page but I > do get it often. It looks like Apache http server is still trying to access > the Tomcat server web002 even though it is down. Does this sound like I have > an incorrect configuration to anybody or is this normal? I would not think > that it was normal, as clustering is supposed to prevent errors like this. > > I have been following the examples in the O'Reilly book "Tomcat: The > Definitive Guide" in chapter 10 - "Tomcat Clustering". > > Any help anybody can provide will be greatly appreciated. > > Thank you for reading, have a good day. > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org