Re: Hello and Tomcat issues with sticky sessions

2010-06-30 Thread M.H.G. Emmerig

Hello gabriel

I think you should have the following in your configuration:

in de workers definition something like

worker.pub-app01.domain=pub-app01-jvm


and in your tomcat server.xml

Engine name=Catalina defaultHost=localhost jvmRoute=pub-app01-jvm




regards

Milko Emmerig

   
 Gabriel Tabares   
 gabriel.tabares@ 
 roboreus.com  To
   users@tomcat.apache.org 
 30-06-2010 12:16   cc
   
   Subject
 Please respond to Hello and Tomcat issues with sticky
   Tomcat Users   sessions
   List   
 us...@tomcat.apa 
 che.org  
   
   
   




Hi everybody,

I have been running Tomcat on production for a few years with no problem
but now, after moving to a new company, I am completely unable to get
session stickyness working.

The setup is as follows:

Apache 2.2.3 (CentOS 5.4 version) - Tomcat 6.0.24.

I have tried all of mod_proxy, mod_ajp_proxy and mod_jk but, no matter
what I do, I can not get Apache to always send the requests to the
Tomcat specified in the jsession.

Firebug indicates that the JSESSIONID cookie is being set as it should
but it still sees requests going to the other server. I have also tried
changing the jvmRoute to exactly match the worker name for mod_jk but it
still doesn't work.

I would appreciate any help, as I am stuck.

Here are the configurations I have tried. Obviously, only of them is
active at any given time. httpd.conf is the standard one from the CentOS
RPM.

Tomcats:

All of them have a jvmRoute of pub-app0X, where X goes from 1 to 5.

mod_proxy

proxy.conf
---

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_http_module modules/mod_proxy_http.so

ProxyRequests Off

Proxy balancer://public_web_cluster
 Order deny,allow
 Allow from all

 BalancerMember http://app01:8080 route=pub-app01
 BalancerMember http://app02:8080 route=pub-app02
 BalancerMember http://app03:8080 route=pub-app03
 BalancerMember http://app04:8080 route=pub-app04
 BalancerMember http://app05:8080 route=pub-app05
/Proxy

virtual.conf

LogLevel Debug

VirtualHost 10.1.2.1:80
 DocumentRoot /var/www/html
 ServerName www.myserver.com
 ServerAlias myserver.com

 RewriteEngine On
 RewriteRule ^/$ /appname/ [R]
 RewriteRule ^$ /appname/ [R]

Location /
 AuthType Basic
 AuthName Please enter your details
 AuthUserFile /etc/httpd/conf.d/htpasswd
 Require valid-user

 ProxyPass balancer://public_web_cluster/
stickysession=JSESSIONID lbmethod=byrequests
 ProxyPassReverse balancer://public_web_cluster/
/Location
/VirtualHost

mod_ajp_proxy
===

mod_proxy_ajp.conf
--

LoadModule proxy_ajp_module modules/mod_proxy_ajp.so

Proxy balancer://pubLB
BalancerMember ajp://app01:8009/ timeout=5 route=pub-app01
BalancerMember ajp://app02:8009/ timeout=5 route=pub-app02
BalancerMember ajp://app03:8009/ timeout=5 route=pub-app03
BalancerMember ajp://app04:8009/ timeout=5 route=pub-app04
BalancerMember ajp://app05:8009/ timeout=5 route=pub-app05
/Proxy

virtual.conf
---
ProxyRequests Off
VirtualHost 10.1.2.1:80
 DocumentRoot /var/www/html
 ServerName www.myserver.com
 ServerAlias myserver.com

 RewriteEngine On
 RewriteRule ^$ /myapp [R]
 RewriteRule ^/$ /myapp [R]

Location /
 AuthType Basic
 AuthName Please enter your details
 AuthUserFile /etc/httpd/conf.d/htpasswd
 Require valid-user

 ProxyPass balancer://pubLB/ stickysession=JSESSIONID nofailover=on
 ProxyPassReverse balancer://pubLB/
/Location
/VirtualHost

mod_jk
=

mod_jk.conf
-
LoadModule jk_module modules/mod_jk.so

JkWorkersFile /etc/httpd/conf.d/workers.properties
JkLogFile /var/log/httpd/mod_jk.log
JkLogLeveldebug
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 

workers.properties
---
ps=/

worker.list=pub-app01, pub-app02, pub-app03, pub-app04, pub-app05, pub-lb

worker.pub-app01.type=ajp13
worker.pub-app01.host=app01

RE: Hello and Tomcat issues with sticky sessions

2010-06-30 Thread M.H.G. Emmerig

you beat me to it I think

regards

Milko Emmerig

   
 Ockleford Paul   
 (NHS Connecting   
 for Health)   To
 paul.ocklef...@n Tomcat Users List   
 hs.net   users@tomcat.apache.org   
cc
 30-06-2010 12:31  
   Subject
   RE: Hello and Tomcat issues with
 Please respond to sticky sessions 
   Tomcat Users   
   List   
 us...@tomcat.apa 
 che.org  
   
   




I'm not sure if this is what you are looking for but I just checked how our
stuff is set up here and wondered if you have the jvm route mapped in the
server xml for the tomcat instances you want loadbalanced?

Engine jvmRoute=route_7 name=Catalina defaultHost=localhost

Paul



-Original Message-
From: Gabriel Tabares [mailto:gabriel.taba...@roboreus.com]
Sent: 30 June 2010 11:17
To: users@tomcat.apache.org
Subject: Hello and Tomcat issues with sticky sessions

Hi everybody,

I have been running Tomcat on production for a few years with no problem
but now, after moving to a new company, I am completely unable to get
session stickyness working.

The setup is as follows:

Apache 2.2.3 (CentOS 5.4 version) - Tomcat 6.0.24.

I have tried all of mod_proxy, mod_ajp_proxy and mod_jk but, no matter
what I do, I can not get Apache to always send the requests to the
Tomcat specified in the jsession.

Firebug indicates that the JSESSIONID cookie is being set as it should
but it still sees requests going to the other server. I have also tried
changing the jvmRoute to exactly match the worker name for mod_jk but it
still doesn't work.

I would appreciate any help, as I am stuck.

Here are the configurations I have tried. Obviously, only of them is
active at any given time. httpd.conf is the standard one from the CentOS
RPM.

Tomcats:

All of them have a jvmRoute of pub-app0X, where X goes from 1 to 5.

mod_proxy

proxy.conf
---

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_http_module modules/mod_proxy_http.so

ProxyRequests Off

Proxy balancer://public_web_cluster
 Order deny,allow
 Allow from all

 BalancerMember http://app01:8080 route=pub-app01
 BalancerMember http://app02:8080 route=pub-app02
 BalancerMember http://app03:8080 route=pub-app03
 BalancerMember http://app04:8080 route=pub-app04
 BalancerMember http://app05:8080 route=pub-app05
/Proxy

virtual.conf

LogLevel Debug

VirtualHost 10.1.2.1:80
 DocumentRoot /var/www/html
 ServerName www.myserver.com
 ServerAlias myserver.com

 RewriteEngine On
 RewriteRule ^/$ /appname/ [R]
 RewriteRule ^$ /appname/ [R]

Location /
 AuthType Basic
 AuthName Please enter your details
 AuthUserFile /etc/httpd/conf.d/htpasswd
 Require valid-user

 ProxyPass balancer://public_web_cluster/
stickysession=JSESSIONID lbmethod=byrequests
 ProxyPassReverse balancer://public_web_cluster/
/Location
/VirtualHost

mod_ajp_proxy
===

mod_proxy_ajp.conf
--

LoadModule proxy_ajp_module modules/mod_proxy_ajp.so

Proxy balancer://pubLB
BalancerMember ajp://app01:8009/ timeout=5 route=pub-app01
BalancerMember ajp://app02:8009/ timeout=5 route=pub-app02
BalancerMember ajp://app03:8009/ timeout=5 route=pub-app03
BalancerMember ajp://app04:8009/ timeout=5 route=pub-app04
BalancerMember ajp://app05:8009/ timeout=5 route=pub-app05
/Proxy

virtual.conf
---
ProxyRequests Off
VirtualHost 10.1.2.1:80
 DocumentRoot /var/www/html
 ServerName www.myserver.com
 ServerAlias myserver.com

 RewriteEngine On
 RewriteRule ^$ /myapp [R]
 RewriteRule ^/$ /myapp [R]

Location /
 AuthType Basic
 AuthName Please enter your details
 AuthUserFile /etc/httpd/conf.d/htpasswd
 Require valid-user

 ProxyPass balancer://pubLB/ stickysession=JSESSIONID nofailover=on
 ProxyPassReverse balancer://pubLB/
/Location
/VirtualHost

mod_jk
=

mod_jk.conf
-
LoadModule jk_module modules/mod_jk.so

JkWorkersFile 

Re: Hello and Tomcat issues with sticky sessions

2010-06-30 Thread M.H.G. Emmerig

Gabriel

have you also set de directive in de workers.properties I suggested?

in your case that should look like

worker.pub-app01.domain=pub-app01
etc

Milko



   
 Gabriel Tabares   
 gabriel.tabares@ 
 roboreus.com  To
   users@tomcat.apache.org 
 30-06-2010 12:41   cc
   
   Subject
 Please respond to Re: Hello and Tomcat issues with
   Tomcat Users   sticky sessions 
   List   
 us...@tomcat.apa 
 che.org  
   
   
   




I'm not sure if this is what you are looking for but I just checked how
our stuff is set up here and wondered if you have the jvm route mapped
in the server xml for the tomcat instances you want loadbalanced?
 Engine jvmRoute=route_7 name=Catalina defaultHost=localhost

 Paul



Sorry if it wasn't clear on my original message, they already have the
jvmRoute set:

Engine name=Catalina defaultHost=localhost jvmRoute=pub-app01
for the first, server
Engine name=Catalina defaultHost=localhost jvmRoute=pub-app02
for the second, etc.



 -Original Message-
 From: Gabriel Tabares [mailto:gabriel.taba...@roboreus.com]
 Sent: 30 June 2010 11:17
 To: users@tomcat.apache.org
 Subject: Hello and Tomcat issues with sticky sessions

 Hi everybody,

 I have been running Tomcat on production for a few years with no problem
 but now, after moving to a new company, I am completely unable to get
 session stickyness working.

 The setup is as follows:

 Apache 2.2.3 (CentOS 5.4 version) -  Tomcat 6.0.24.

 I have tried all of mod_proxy, mod_ajp_proxy and mod_jk but, no matter
 what I do, I can not get Apache to always send the requests to the
 Tomcat specified in the jsession.

 Firebug indicates that the JSESSIONID cookie is being set as it should
 but it still sees requests going to the other server. I have also tried
 changing the jvmRoute to exactly match the worker name for mod_jk but it
 still doesn't work.

 I would appreciate any help, as I am stuck.

 Here are the configurations I have tried. Obviously, only of them is
 active at any given time. httpd.conf is the standard one from the CentOS
 RPM.

 Tomcats:

 All of them have a jvmRoute of pub-app0X, where X goes from 1 to 5.

 mod_proxy
 
 proxy.conf
 ---

 LoadModule proxy_module modules/mod_proxy.so
 LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
 LoadModule proxy_http_module modules/mod_proxy_http.so

 ProxyRequests Off

 Proxy balancer://public_web_cluster
   Order deny,allow
   Allow from all

   BalancerMember http://app01:8080 route=pub-app01
   BalancerMember http://app02:8080 route=pub-app02
   BalancerMember http://app03:8080 route=pub-app03
   BalancerMember http://app04:8080 route=pub-app04
   BalancerMember http://app05:8080 route=pub-app05
 /Proxy

 virtual.conf
 
 LogLevel Debug

 VirtualHost 10.1.2.1:80
   DocumentRoot /var/www/html
   ServerName www.myserver.com
   ServerAlias myserver.com

   RewriteEngine On
   RewriteRule ^/$ /appname/ [R]
   RewriteRule ^$ /appname/ [R]

 Location /
   AuthType Basic
   AuthName Please enter your details
   AuthUserFile /etc/httpd/conf.d/htpasswd
   Require valid-user

   ProxyPass balancer://public_web_cluster/
 stickysession=JSESSIONID lbmethod=byrequests
   ProxyPassReverse balancer://public_web_cluster/
 /Location
 /VirtualHost

 mod_ajp_proxy
 ===

 mod_proxy_ajp.conf
 --

 LoadModule proxy_ajp_module modules/mod_proxy_ajp.so

 Proxy balancer://pubLB
 BalancerMember ajp://app01:8009/ timeout=5 route=pub-app01
 BalancerMember ajp://app02:8009/ timeout=5 route=pub-app02
 BalancerMember ajp://app03:8009/ timeout=5 route=pub-app03
 BalancerMember ajp://app04:8009/ timeout=5 route=pub-app04
 BalancerMember ajp://app05:8009/ timeout=5 route=pub-app05
 /Proxy

 virtual.conf
 ---
 ProxyRequests Off
 VirtualHost 10.1.2.1:80
   DocumentRoot /var/www/html
   ServerName www.myserver.com
   ServerAlias myserver.com

   RewriteEngine On
   RewriteRule ^$ /myapp [R]
   RewriteRule ^/$ /myapp 

placiing content and application on a microsoft DFS solution

2010-06-22 Thread M.H.G. Emmerig


Has anyone ever placed an application and its content on a redundant DFS
solution?
So as when one DFS server fails, another takes over.
Does anyone see possible problems with this setup?
ie. when dfs server fails does tomcat loose connection to the app or is the
failover fast enough.


regards

Milko Emmerig



Please consider the environment before printing this email.

De informatie verzonden met dit e-mailbericht is vertrouwelijk en
uitsluitend bestemd voor de geadresseerde. Indien u als niet-geadresseerde
dit bericht ontvangt, wordt u verzocht direct de afzender hierover te
informeren en het bericht te vernietigen. Gebruik van informatie door
onbevoegden, openbaarmaking of vermenigvuldiging  is verboden en kan leiden
tot aansprakelijkheid. De afzender is niet aansprakelijk in geval van
onjuiste overbrenging van het e-mailbericht en/of bij ontijdige ontvangst
daarvan.

The information transmitted is confidential and intended only for the
person or entity to whom or which it is addressed. If you are not the
intended recipient of this communication, please inform us immediately and
destroy this communication. Unauthorised use, disclosure or copying of
information is strictly prohibited and may entail liability. The sender
accepts no liability for improper transmission of this communication nor
for any delay in its receipt.

RE: deleted page not immediately invalidated

2010-04-28 Thread M.H.G. Emmerig

Wireshark didn't show anything that was helpful

but installing tomcat 6.0.26 did do the trick.
nmow we have to plan to upgrade our tomcat farm.

do you know if i have to upgrade the mod_jk as well?


regards

Milko Emmerig

   
 Caldarale,   
 Charles R
 Chuck.Caldarale@  To
 unisys.com   Tomcat Users List   
   users@tomcat.apache.org   
 27-04-2010 18:35   cc
   
   Subject
 Please respond to RE: deleted page not immediately
   Tomcat Users   invalidated 
   List   
 us...@tomcat.apa 
 che.org  
   
   
   




 From: M.H.G. Emmerig [mailto:m.h.g.emme...@dnb.nl]
 Subject: Re: deleted page not immediately invalidated

 Jamie is not an alias for me ;-)

Didn't think so.

 we are using version 6.0.16 on windows 2003 SP1

Any chance of trying it on a Tomcat version that's less than two years old
(6.0.26, preferably)?

Have you taken any Wireshark traces to see what's really occurring on the
wire?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail and
its attachments from all computers.


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




Please consider the environment before printing this email.

De informatie verzonden met dit e-mailbericht is vertrouwelijk en
uitsluitend bestemd voor de geadresseerde. Indien u als niet-geadresseerde
dit bericht ontvangt, wordt u verzocht direct de afzender hierover te
informeren en het bericht te vernietigen. Gebruik van informatie door
onbevoegden, openbaarmaking of vermenigvuldiging  is verboden en kan leiden
tot aansprakelijkheid. De afzender is niet aansprakelijk in geval van
onjuiste overbrenging van het e-mailbericht en/of bij ontijdige ontvangst
daarvan.

The information transmitted is confidential and intended only for the
person or entity to whom or which it is addressed. If you are not the
intended recipient of this communication, please inform us immediately and
destroy this communication. Unauthorised use, disclosure or copying of
information is strictly prohibited and may entail liability. The sender
accepts no liability for improper transmission of this communication nor
for any delay in its receipt.

deleted page not immediately invalidated

2010-04-27 Thread M.H.G. Emmerig


hello

We have a website which has it's content on a filesystem.
all pages are jsp, with caching off.

when we change a jsp, it get's recompiled at once when refreshing the page,
so the new content is displayed. This is correct.

now, when we delete a page from the filesystem and we do a refresh, it
displays the page, when we do another refresh we get a page not found.
I would expect a page not found after the first refresh!

What could be causing this behaviour?


regards
Milko Emmerig



Please consider the environment before printing this email.

De informatie verzonden met dit e-mailbericht is vertrouwelijk en
uitsluitend bestemd voor de geadresseerde. Indien u als niet-geadresseerde
dit bericht ontvangt, wordt u verzocht direct de afzender hierover te
informeren en het bericht te vernietigen. Gebruik van informatie door
onbevoegden, openbaarmaking of vermenigvuldiging  is verboden en kan leiden
tot aansprakelijkheid. De afzender is niet aansprakelijk in geval van
onjuiste overbrenging van het e-mailbericht en/of bij ontijdige ontvangst
daarvan.

The information transmitted is confidential and intended only for the
person or entity to whom or which it is addressed. If you are not the
intended recipient of this communication, please inform us immediately and
destroy this communication. Unauthorised use, disclosure or copying of
information is strictly prohibited and may entail liability. The sender
accepts no liability for improper transmission of this communication nor
for any delay in its receipt.

Re: deleted page not immediately invalidated

2010-04-27 Thread M.H.G. Emmerig

Jamie is not an alias  for me ;-)

we are using version 6.0.16 on windows 2003 SP1



Met vriendelijke groet

Milko Emmerig
afd. BEIT-ICT-VOI-Middleware
De Nederlandsche Bank
tel: +31205242056

   
 Konstantin
 Kolinko   
 knst.koli...@gma  To
 il.com   Tomcat Users List   
   users@tomcat.apache.org   
 27-04-2010 17:24   cc
   
   Subject
 Please respond to Re: deleted page not immediately
   Tomcat Users   invalidated 
   List   
 us...@tomcat.apa 
 che.org  
   
   
   




2010/4/27 M.H.G. Emmerig m.h.g.emme...@dnb.nl:


 What could be causing this behaviour?


Some tomcat versions work like that. See bugzilla for more details. I
have no clue on what Tomcat version you are using, etc. etc.

Best regards,
Konstantin Kolinko

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




Please consider the environment before printing this email.

De informatie verzonden met dit e-mailbericht is vertrouwelijk en
uitsluitend bestemd voor de geadresseerde. Indien u als niet-geadresseerde
dit bericht ontvangt, wordt u verzocht direct de afzender hierover te
informeren en het bericht te vernietigen. Gebruik van informatie door
onbevoegden, openbaarmaking of vermenigvuldiging  is verboden en kan leiden
tot aansprakelijkheid. De afzender is niet aansprakelijk in geval van
onjuiste overbrenging van het e-mailbericht en/of bij ontijdige ontvangst
daarvan.

The information transmitted is confidential and intended only for the
person or entity to whom or which it is addressed. If you are not the
intended recipient of this communication, please inform us immediately and
destroy this communication. Unauthorised use, disclosure or copying of
information is strictly prohibited and may entail liability. The sender
accepts no liability for improper transmission of this communication nor
for any delay in its receipt.

seperating content from the application

2010-04-21 Thread M.H.G. Emmerig


Hello

Our current configuration:

We are running tomcat 6.0.16 on windows 2003 enterprise.

We have a website which consists of an application part and a content part.
Both are in the same folder structure, eg.

webapps\Root\applicationfiles
webapps\Root\content\publications
webapps\Root\content\images

the application comes as a war file and the content is placed via another
process.

the folder structure is placed on a windows share.


Our current problem:

Whenever there is a problem with the share, the application crashes,
because tomcat can't find the application files anymore.
When the share comes back online, tomcat does not recover from the failure
and a restart is the only option.

Now I have the following questions:

I think separating the application from the content and placing the
application local to tomcat (basically on the same machine)
will solve the recovery issue.
I know placing everything local to the tomcat will be the best way and
gives the best performance, but at the moment that is not an option.

The questions

- Will placing the app local to the tomcat solve the recovery issue?
- Is there an easy way to seperate the app and the content, ie. some sort
of pathsetting ?


regards, Milko





Please consider the environment before printing this email.

De informatie verzonden met dit e-mailbericht is vertrouwelijk en
uitsluitend bestemd voor de geadresseerde. Indien u als niet-geadresseerde
dit bericht ontvangt, wordt u verzocht direct de afzender hierover te
informeren en het bericht te vernietigen. Gebruik van informatie door
onbevoegden, openbaarmaking of vermenigvuldiging  is verboden en kan leiden
tot aansprakelijkheid. De afzender is niet aansprakelijk in geval van
onjuiste overbrenging van het e-mailbericht en/of bij ontijdige ontvangst
daarvan.

The information transmitted is confidential and intended only for the
person or entity to whom or which it is addressed. If you are not the
intended recipient of this communication, please inform us immediately and
destroy this communication. Unauthorised use, disclosure or copying of
information is strictly prohibited and may entail liability. The sender
accepts no liability for improper transmission of this communication nor
for any delay in its receipt.