RE: Need Hellp With Tomcat 6 / Apache 2.2 Cluster Problem

2009-03-11 Thread Alston, Brian (US SSA)


Ok ... I feel like a moron but I cannot figure out how to use 
disablereuse option. When I google for examples on disablereuse, what I 
find is that in my httpd.conf file I need to add the line JkOptions 
+DisableReuse. However, reading the information here 
(http://httpd.apache.org/docs/2.2/mod/mod_proxy.html) it looks like I need to 
add disablereuse=On  to the end of the line BalancerMember 
http://192.168.1.101:8080 loadfactor=1. I am extremely new at this Tomcat 
clustering process, so any leniency and help will be very much appreciated.

Thanks

Have a great day.


From: Filip Hanik - Dev Lists [devli...@hanik.com]
Sent: Tuesday, March 10, 2009 1:22 PM
To: Tomcat Users List
Subject: Re: Need Hellp With Tomcat 6 / Apache 2.2 Cluster Problem

Alston, Brian (US SSA) wrote:
 Filip

 Thank you for your help. I made the changes like you suggested:

 changed stickysession-jsessionid to 
 stickysession=JSESSIONID|jsessionid
 I already had stickysession=jsessionid (it was a typo here in my 
 post) but I added the pipe and uppercase JSESSIONID

 my server.xml already had the line you suggested.

 If I use disablereuse=On won't I then have problems with my cookies 
 and sessions?

disable reuse will not affect your cookies or sessions

Filip
 Again, thank you very much for your help.

 
 From: Filip Hanik - Dev Lists [devli...@hanik.com]
 Sent: Tuesday, March 10, 2009 12:42 PM
 To: Tomcat Users List
 Subject: Re: Need Hellp With Tomcat 6 / Apache 2.2 Cluster Problem

 hi Brian,
 your stickysession attribute is wrong, it should look like

 |stickysession=JSESSIONID|jsessionid

 then you must set jvmRoute in server.xml (Engine name=xxx
 jvmRoute=tc1) the jvmRoute has to be unique across the tc nodes.
 stickyness will only apply to request that have sessions

 remove smax/max, better to use the defaults

 I would also set the property disablereuse to On if it is supported in
 your httpd version, right now it may try to use a connection that is
 dead, and it seems its not trying another node, there may be some other
 attributes that can help with that too

 documentation is here
 http://httpd.apache.org/docs/2.2/mod/mod_proxy.html

 Filip

 |Alston, Brian (US SSA) wrote:

 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

Re: Need Hellp With Tomcat 6 / Apache 2.2 Cluster Problem

2009-03-11 Thread Filip Hanik - Dev Lists
hi Brian, this is not really tomcat clustering, but more httpd load 
balancing. Disable reuse is available on two modules, mod_jk and 
mod_proxy, that is why you get hits for mod_jk as well when you google.
syntax is case sensitive, and yes, you would add it to the end of the 
BalancerMember


Filip

Alston, Brian (US SSA) wrote:

Ok ... I feel like a moron but I cannot figure out how to use disablereuse option. When I google for examples on 
disablereuse, what I find is that in my httpd.conf file I need to add the line JkOptions +DisableReuse. 
However, reading the information here (http://httpd.apache.org/docs/2.2/mod/mod_proxy.html) it looks like I need to add 
disablereuse=On  to the end of the line BalancerMember http://192.168.1.101:8080 loadfactor=1. I am 
extremely new at this Tomcat clustering process, so any leniency and help will be very much appreciated.

Thanks

Have a great day.


From: Filip Hanik - Dev Lists [devli...@hanik.com]
Sent: Tuesday, March 10, 2009 1:22 PM
To: Tomcat Users List
Subject: Re: Need Hellp With Tomcat 6 / Apache 2.2 Cluster Problem

Alston, Brian (US SSA) wrote:
  

Filip

Thank you for your help. I made the changes like you suggested:

changed stickysession-jsessionid to 
stickysession=JSESSIONID|jsessionid
I already had stickysession=jsessionid (it was a typo here in my post) but I added the 
pipe and uppercase JSESSIONID

my server.xml already had the line you suggested.

If I use disablereuse=On won't I then have problems with my cookies 
and sessions?



disable reuse will not affect your cookies or sessions

Filip
  

Again, thank you very much for your help.


From: Filip Hanik - Dev Lists [devli...@hanik.com]
Sent: Tuesday, March 10, 2009 12:42 PM
To: Tomcat Users List
Subject: Re: Need Hellp With Tomcat 6 / Apache 2.2 Cluster Problem

hi Brian,
your stickysession attribute is wrong, it should look like

|stickysession=JSESSIONID|jsessionid

then you must set jvmRoute in server.xml (Engine name=xxx
jvmRoute=tc1) the jvmRoute has to be unique across the tc nodes.
stickyness will only apply to request that have sessions

remove smax/max, better to use the defaults

I would also set the property disablereuse to On if it is supported in
your httpd version, right now it may try to use a connection that is
dead, and it seems its not trying another node, there may be some other
attributes that can help with that too

documentation is here
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html

Filip

|Alston, Brian (US SSA) wrote:



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

RE: Need Hellp With Tomcat 6 / Apache 2.2 Cluster Problem

2009-03-11 Thread Alston, Brian (US SSA)
Filip

I was under the assumption, from my reading, that load balancing was a 
component of clustering. At least that's how the O'Reilly book makes me feel.

I added the option to the end of the line and it now looks like this:

BalancerMember http://192.168.1.101:8080 loadfactor=1 disablereuse=On
BalancerMember http://192.168.1.102:8080 loadfactor=1 disablereuse=On
BalancerMember http://192.168.1.103:8080 loadfactor=1 disablereuse=On

I restarted Apache and got the following error:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Starting httpd: Syntax error on line 25 of 
/etc/httpd/conf.d/proxy-balancer.conf:
BalancerMember unknown Worker parameter
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Thank you


From: Filip Hanik - Dev Lists [devli...@hanik.com]
Sent: Wednesday, March 11, 2009 11:10 AM
To: Tomcat Users List
Subject: Re: Need Hellp With Tomcat 6 / Apache 2.2 Cluster Problem

hi Brian, this is not really tomcat clustering, but more httpd load
balancing. Disable reuse is available on two modules, mod_jk and
mod_proxy, that is why you get hits for mod_jk as well when you google.
syntax is case sensitive, and yes, you would add it to the end of the
BalancerMember

Filip

Alston, Brian (US SSA) wrote:
 Ok ... I feel like a moron but I cannot figure out how to use 
 disablereuse option. When I google for examples on disablereuse, what I 
 find is that in my httpd.conf file I need to add the line JkOptions 
 +DisableReuse. However, reading the information here 
 (http://httpd.apache.org/docs/2.2/mod/mod_proxy.html) it looks like I need to 
 add disablereuse=On  to the end of the line BalancerMember 
 http://192.168.1.101:8080 loadfactor=1. I am extremely new at this Tomcat 
 clustering process, so any leniency and help will be very much appreciated.

 Thanks

 Have a great day.

 
 From: Filip Hanik - Dev Lists [devli...@hanik.com]
 Sent: Tuesday, March 10, 2009 1:22 PM
 To: Tomcat Users List
 Subject: Re: Need Hellp With Tomcat 6 / Apache 2.2 Cluster Problem

 Alston, Brian (US SSA) wrote:

 Filip

 Thank you for your help. I made the changes like you suggested:

 changed stickysession-jsessionid to 
 stickysession=JSESSIONID|jsessionid
 I already had stickysession=jsessionid (it was a typo here in my 
 post) but I added the pipe and uppercase JSESSIONID

 my server.xml already had the line you suggested.

 If I use disablereuse=On won't I then have problems with my 
 cookies and sessions?


 disable reuse will not affect your cookies or sessions

 Filip

 Again, thank you very much for your help.

 
 From: Filip Hanik - Dev Lists [devli...@hanik.com]
 Sent: Tuesday, March 10, 2009 12:42 PM
 To: Tomcat Users List
 Subject: Re: Need Hellp With Tomcat 6 / Apache 2.2 Cluster Problem

 hi Brian,
 your stickysession attribute is wrong, it should look like

 |stickysession=JSESSIONID|jsessionid

 then you must set jvmRoute in server.xml (Engine name=xxx
 jvmRoute=tc1) the jvmRoute has to be unique across the tc nodes.
 stickyness will only apply to request that have sessions

 remove smax/max, better to use the defaults

 I would also set the property disablereuse to On if it is supported in
 your httpd version, right now it may try to use a connection that is
 dead, and it seems its not trying another node, there may be some other
 attributes that can help with that too

 documentation is here
 http://httpd.apache.org/docs/2.2/mod/mod_proxy.html

 Filip

 |Alston, Brian (US SSA) wrote:


 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

Re: Need Hellp With Tomcat 6 / Apache 2.2 Cluster Problem

2009-03-11 Thread Rainer Jung

On 11.03.2009 16:28, Alston, Brian (US SSA) wrote:

Filip

 I was under the assumption, from my reading, that load balancing was a component 
of clustering. At least that's how the O'Reilly book makes me feel.

I added the option to the end of the line and it now looks like this:

 BalancerMember http://192.168.1.101:8080 loadfactor=1 disablereuse=On
 BalancerMember http://192.168.1.102:8080 loadfactor=1 disablereuse=On
 BalancerMember http://192.168.1.103:8080 loadfactor=1 disablereuse=On

I restarted Apache and got the following error:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Starting httpd: Syntax error on line 25 of 
/etc/httpd/conf.d/proxy-balancer.conf:
BalancerMember unknown Worker parameter
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


Attribute disablereuse has been added in httpd 2.2.9. When using 
mod_proxy_balancer or mod_proxy_ajp you should use the most recent 
version of httpd (at the moment 2.2.11), because those modules are still 
developing faster than most other, older modules.


Regards,

Rainer

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Need Hellp With Tomcat 6 / Apache 2.2 Cluster Problem

2009-03-10 Thread Filip Hanik - Dev Lists

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



RE: Need Hellp With Tomcat 6 / Apache 2.2 Cluster Problem

2009-03-10 Thread Alston, Brian (US SSA)

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



Re: Need Hellp With Tomcat 6 / Apache 2.2 Cluster Problem

2009-03-10 Thread Filip Hanik - Dev Lists

hi Brian,
your stickysession attribute is wrong, it should look like

|stickysession=JSESSIONID|jsessionid

then you must set jvmRoute in server.xml (Engine name=xxx 
jvmRoute=tc1) the jvmRoute has to be unique across the tc nodes.

stickyness will only apply to request that have sessions

remove smax/max, better to use the defaults

I would also set the property disablereuse to On if it is supported in 
your httpd version, right now it may try to use a connection that is 
dead, and it seems its not trying another node, there may be some other 
attributes that can help with that too


documentation is here
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html

Filip

|Alston, Brian (US SSA) wrote:

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


  



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Need Hellp With Tomcat 6 / Apache 2.2 Cluster Problem

2009-03-10 Thread Alston, Brian (US SSA)
Filip

Thank you for your help. I made the changes like you suggested:

changed stickysession-jsessionid to 
stickysession=JSESSIONID|jsessionid
I already had stickysession=jsessionid (it was a typo here in my 
post) but I added the pipe and uppercase JSESSIONID

my server.xml already had the line you suggested.

If I use disablereuse=On won't I then have problems with my cookies 
and sessions?

Again, thank you very much for your help.


From: Filip Hanik - Dev Lists [devli...@hanik.com]
Sent: Tuesday, March 10, 2009 12:42 PM
To: Tomcat Users List
Subject: Re: Need Hellp With Tomcat 6 / Apache 2.2 Cluster Problem

hi Brian,
your stickysession attribute is wrong, it should look like

|stickysession=JSESSIONID|jsessionid

then you must set jvmRoute in server.xml (Engine name=xxx
jvmRoute=tc1) the jvmRoute has to be unique across the tc nodes.
stickyness will only apply to request that have sessions

remove smax/max, better to use the defaults

I would also set the property disablereuse to On if it is supported in
your httpd version, right now it may try to use a connection that is
dead, and it seems its not trying another node, there may be some other
attributes that can help with that too

documentation is here
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html

Filip

|Alston, Brian (US SSA) wrote:
 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

Re: Need Hellp With Tomcat 6 / Apache 2.2 Cluster Problem

2009-03-10 Thread Filip Hanik - Dev Lists

Alston, Brian (US SSA) wrote:

Filip

Thank you for your help. I made the changes like you suggested:

changed stickysession-jsessionid to 
stickysession=JSESSIONID|jsessionid
I already had stickysession=jsessionid (it was a typo here in my post) but I added the 
pipe and uppercase JSESSIONID

my server.xml already had the line you suggested.

If I use disablereuse=On won't I then have problems with my cookies 
and sessions?
  

disable reuse will not affect your cookies or sessions

Filip

Again, thank you very much for your help.


From: Filip Hanik - Dev Lists [devli...@hanik.com]
Sent: Tuesday, March 10, 2009 12:42 PM
To: Tomcat Users List
Subject: Re: Need Hellp With Tomcat 6 / Apache 2.2 Cluster Problem

hi Brian,
your stickysession attribute is wrong, it should look like

|stickysession=JSESSIONID|jsessionid

then you must set jvmRoute in server.xml (Engine name=xxx
jvmRoute=tc1) the jvmRoute has to be unique across the tc nodes.
stickyness will only apply to request that have sessions

remove smax/max, better to use the defaults

I would also set the property disablereuse to On if it is supported in
your httpd version, right now it may try to use a connection that is
dead, and it seems its not trying another node, there may be some other
attributes that can help with that too

documentation is here
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html

Filip

|Alston, Brian (US SSA) wrote:
  

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