session load-balancing and clustering of tomcat

2005-03-01 Thread Sng Wee Jim

Hi,



I am using tomcat 5.0.28.



My question is how to setup sticky-session load-balancing and clustering
of tomcat?





Do I need to upgrade to tomcat 5.5.X? Note the requirement is on
sticky-session.



- Jim







The information in this email is confidential and is intended solely
for the addressee(s).
Access to this email by anyone else is unauthorized. If you are not
an intended recipient, please notify the sender of this email
immediately. You should not copy, use or disseminate the
information contained in the email.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of Capco.

http://www.capco.com/



Re: session load-balancing and clustering of tomcat

2005-03-01 Thread Lionel Farbos
1) In server.xml :

- uncomment the AJP 1.3 Connector (on port 8009),
- set the jvmRoute in each Engine
example : Engine name=Standalone defaultHost=host1 debug=0 
jvmRoute=t1_ajp13

2) then add the module mod_jk in apache
with jk workers defined like this :

worker.list=t1_ajp13,t2_ajp13,loadbalancer

worker.t1_ajp13.type=ajp13
worker.t1_ajp13.host=host1
worker.t1_ajp13.port=8009
worker.t1_ajp13.lbfactor=1
worker.t1_ajp13.socket_timeout=5
worker.t1_ajp13.recycle_timeout=10

worker.t2_ajp13.type=ajp13
worker.t2_ajp13.host=host2
worker.t2_ajp13.port=8009
worker.t2_ajp13.lbfactor=1
worker.t2_ajp13.socket_timeout=5
worker.t2_ajp13.recycle_timeout=10

worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers= t1_ajp13,t2_ajp13

then, you can load-balance your virtual host like this :
JkMount /*.jsp loadbalancer

3) Conclusion :
Thanks to mod_jk, you'll have load-balancing (with sticky sessions with 
JSESSION_ID like this : x.t1_ajp13 or y.t2_ajp13), and failover.

This feature work with all tomcats (TC3.3-TC5)
 
On Tue, 1 Mar 2005 18:08:59 +0800
Sng Wee Jim [EMAIL PROTECTED] wrote:

 
 Hi,
 
 
 
 I am using tomcat 5.0.28.
 
 
 
 My question is how to setup sticky-session load-balancing and clustering
 of tomcat?
 
 
 
 
 
 Do I need to upgrade to tomcat 5.5.X? Note the requirement is on
 sticky-session.
 
 
 
 - Jim
 
 
 
 
 
 
 
 The information in this email is confidential and is intended solely
 for the addressee(s).
 Access to this email by anyone else is unauthorized. If you are not
 an intended recipient, please notify the sender of this email
 immediately. You should not copy, use or disseminate the
 information contained in the email.
 Any views expressed in this message are those of the individual
 sender, except where the sender specifically states them to be
 the views of Capco.
 
 http://www.capco.com/
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: session load-balancing and clustering of tomcat

2005-03-01 Thread Marc Wiatrowski
My gotcha was setting the jvmRoute in EACH/EVERY Engine! 

 -Original Message-
 From: Lionel Farbos [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, March 01, 2005 8:20 AM
 To: Tomcat Users List
 Cc: [EMAIL PROTECTED]
 Subject: Re: session load-balancing and clustering of tomcat
 
 1) In server.xml :
 
 - uncomment the AJP 1.3 Connector (on port 8009),
 - set the jvmRoute in each Engine
 example : Engine name=Standalone defaultHost=host1 
 debug=0 jvmRoute=t1_ajp13
 
 2) then add the module mod_jk in apache
 with jk workers defined like this :
 
 worker.list=t1_ajp13,t2_ajp13,loadbalancer
 
 worker.t1_ajp13.type=ajp13
 worker.t1_ajp13.host=host1
 worker.t1_ajp13.port=8009
 worker.t1_ajp13.lbfactor=1
 worker.t1_ajp13.socket_timeout=5
 worker.t1_ajp13.recycle_timeout=10
 
 worker.t2_ajp13.type=ajp13
 worker.t2_ajp13.host=host2
 worker.t2_ajp13.port=8009
 worker.t2_ajp13.lbfactor=1
 worker.t2_ajp13.socket_timeout=5
 worker.t2_ajp13.recycle_timeout=10
 
 worker.loadbalancer.type=lb
 worker.loadbalancer.balanced_workers= t1_ajp13,t2_ajp13
 
 then, you can load-balance your virtual host like this :
 JkMount /*.jsp loadbalancer
 
 3) Conclusion :
 Thanks to mod_jk, you'll have load-balancing (with sticky 
 sessions with JSESSION_ID like this : x.t1_ajp13 or 
 y.t2_ajp13), and failover.
 
 This feature work with all tomcats (TC3.3-TC5)
  
 On Tue, 1 Mar 2005 18:08:59 +0800
 Sng Wee Jim [EMAIL PROTECTED] wrote:
 
  
  Hi,
  
  
  
  I am using tomcat 5.0.28.
  
  
  
  My question is how to setup sticky-session load-balancing 
 and clustering
  of tomcat?
  
  
  
  
  
  Do I need to upgrade to tomcat 5.5.X? Note the requirement is on
  sticky-session.
  
  
  
  - Jim
  
  
  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: session load-balancing and clustering of tomcat

2005-03-01 Thread Mladen Turk
Lionel Farbos wrote:
1) In server.xml :
- uncomment the AJP 1.3 Connector (on port 8009),
- set the jvmRoute in each Engine
example : Engine name=Standalone defaultHost=host1 debug=0 
jvmRoute=t1_ajp13
Session route *must* consists only of alphanumeric characters.
See the:
http://jakarta.apache.org/tomcat/connectors-doc/config/workers.html
Later mod_jk releases will have that as prerequisite so that we
don't need to url encode session routes.

2) then add the module mod_jk in apache
with jk workers defined like this :
worker.list=t1_ajp13,t2_ajp13,loadbalancer
This is not quite correct, although it will work.
You should set worker.list only for workers that
have JkMount directive registered.
Also workers that are member of load balancer
*should* not be listed within worker.list
Regards,
Mladen.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: session load-balancing and clustering of tomcat

2005-03-01 Thread Lionel Farbos
On Tue, 01 Mar 2005 17:55:15 +0100
Mladen Turk [EMAIL PROTECTED] wrote:

 Lionel Farbos wrote:
  2) then add the module mod_jk in apache
  with jk workers defined like this :
  
  worker.list=t1_ajp13,t2_ajp13,loadbalancer
 
 
 This is not quite correct, although it will work.
 You should set worker.list only for workers that
 have JkMount directive registered.
 Also workers that are member of load balancer
 *should* not be listed within worker.list
 
I put this example because it can be useful for maintenance
(the JkMount directive at the instant t is possibly not the same as at the 
instant t+x)

Example :
My webapp testAppli is now loadbalanced on hosts h1 and h2.
If want to upgrade my webapp testAppli.
So,
1) I mono-balance testAppli on h2 (with JkMount /*.jsp h2 + apache reload)
2) I restart testAppli on the Tomcat_h1 instance
3) I mono-balance testAppli on h1 
4) I restart testAppli on the Tomcat_h2 instance
5) I re-loadbalance testAppli

With this principle + mod_jk 1.2.9 (with dynamic change of properties) + a 
graceful restart of Context
I hope upgrading my webapp transparently (without interruptions)...

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: session load-balancing and clustering of tomcat

2005-03-01 Thread Sng Wee Jim


Hi,

I am actually trying to get sticky session load-balancing with IIS 
tomcat (not apache webserver, client's requirement).

My worker.properties:
==
worker.list=tomcat1,tomcat2

worker.tomcat1.type=ajp13
worker.tomcat1.host=localhost
worker.tomcat1.port=8009
worker.tomcat1.lbfactor=1
worker.tomcat1.socket_timeout=5
worker.tomcat1.recycle_timeout=10

worker.tomcat2.type=ajp13
worker.tomcat2.host=localhost
worker.tomcat2.port=8209
worker.tomcat2.lbfactor=1
worker.tomcat2.socket_timeout=5
worker.tomcat2.recycle_timeout=10

worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=tomcat1


My uriworkermap.properties:
===
default.worker=tomcat1

/webapp/*.jsp=$(default.worker)
/webapp/*.do=$(default.worker)


tomcat1 seems to be hardcoded to be the default worker. So how should
I configure, so that tomcat2 will be used for the load-balancing
redirection too?

Also tomcat1 is specified as a load-balancer worker, does that mean that
if tomcat1 goes down, then load-balancing will cease too?


- Jim


-Original Message-
From: Mladen Turk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 02, 2005 12:55 AM
To: Tomcat Users List
Subject: Re: session load-balancing and clustering of tomcat

Lionel Farbos wrote:
 1) In server.xml :

 - uncomment the AJP 1.3 Connector (on port 8009),
 - set the jvmRoute in each Engine
 example : Engine name=Standalone defaultHost=host1 debug=0
jvmRoute=t1_ajp13


Session route *must* consists only of alphanumeric characters.
See the:
http://jakarta.apache.org/tomcat/connectors-doc/config/workers.html

Later mod_jk releases will have that as prerequisite so that we
don't need to url encode session routes.


 2) then add the module mod_jk in apache
 with jk workers defined like this :

 worker.list=t1_ajp13,t2_ajp13,loadbalancer


This is not quite correct, although it will work.
You should set worker.list only for workers that
have JkMount directive registered.
Also workers that are member of load balancer
*should* not be listed within worker.list

Regards,
Mladen.



The information in this email is confidential and is intended solely
for the addressee(s).
Access to this email by anyone else is unauthorized. If you are not
an intended recipient, please notify the sender of this email
immediately. You should not copy, use or disseminate the
information contained in the email.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of Capco.

http://www.capco.com/



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: session load-balancing and clustering of tomcat

2005-03-01 Thread Sng Wee Jim


Hi,

Sorry for the noise. I have found the solution at
   http://marc.theaimsgroup.com/?l=tomcat-userm=104808785801048w=2


- Jim

-Original Message-
From: Sng Wee Jim
Sent: Wednesday, March 02, 2005 2:14 PM
To: 'Mladen Turk'; Tomcat Users List
Subject: RE: session load-balancing and clustering of tomcat


Hi,

I am actually trying to get sticky session load-balancing with IIS 
tomcat (not apache webserver, client's requirement).

My worker.properties:
==
worker.list=tomcat1,tomcat2

worker.tomcat1.type=ajp13
worker.tomcat1.host=localhost
worker.tomcat1.port=8009
worker.tomcat1.lbfactor=1
worker.tomcat1.socket_timeout=5
worker.tomcat1.recycle_timeout=10

worker.tomcat2.type=ajp13
worker.tomcat2.host=localhost
worker.tomcat2.port=8209
worker.tomcat2.lbfactor=1
worker.tomcat2.socket_timeout=5
worker.tomcat2.recycle_timeout=10

worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=tomcat1


My uriworkermap.properties:
===
default.worker=tomcat1

/webapp/*.jsp=$(default.worker)
/webapp/*.do=$(default.worker)


tomcat1 seems to be hardcoded to be the default worker. So how should
I configure, so that tomcat2 will be used for the load-balancing
redirection too?

Also tomcat1 is specified as a load-balancer worker, does that mean that
if tomcat1 goes down, then load-balancing will cease too?


- Jim


-Original Message-
From: Mladen Turk [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 02, 2005 12:55 AM
To: Tomcat Users List
Subject: Re: session load-balancing and clustering of tomcat

Lionel Farbos wrote:
 1) In server.xml :

 - uncomment the AJP 1.3 Connector (on port 8009),
 - set the jvmRoute in each Engine
 example : Engine name=Standalone defaultHost=host1 debug=0
jvmRoute=t1_ajp13


Session route *must* consists only of alphanumeric characters.
See the:
http://jakarta.apache.org/tomcat/connectors-doc/config/workers.html

Later mod_jk releases will have that as prerequisite so that we
don't need to url encode session routes.


 2) then add the module mod_jk in apache
 with jk workers defined like this :

 worker.list=t1_ajp13,t2_ajp13,loadbalancer


This is not quite correct, although it will work.
You should set worker.list only for workers that
have JkMount directive registered.
Also workers that are member of load balancer
*should* not be listed within worker.list

Regards,
Mladen.



The information in this email is confidential and is intended solely
for the addressee(s).
Access to this email by anyone else is unauthorized. If you are not
an intended recipient, please notify the sender of this email
immediately. You should not copy, use or disseminate the
information contained in the email.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of Capco.

http://www.capco.com/



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Has anyone managed clustering with Tomcat 5.5.4+Apache+mod_jk?

2005-01-11 Thread Gary Zhu
Hi all, 
 
Has anyone successfully configured Tomcat 5.5.4 with Apache and mod_jk
to do load balancing and session replication? I did everything as
documents suggested but with no luck. If so, could you advise? 
 
I have configured TWO tomcat instances and a lb worker. Whenever I map
the lb worker to URLs, I got Server Internal error. Then, just change
the URL mapping to one of the TWO tomcat backend workers, it works as
expected. Thus, it indicated that Apache can talk to Tomcat through
mod_jk. 
 
I need your confirmation before trying to use another version of Tomcat.
 
Thanks.
 
Gary


Re: Has anyone managed clustering with Tomcat 5.5.4+Apache+mod_jk?

2005-01-11 Thread Mladen Turk
Gary Zhu wrote:
Hi all, 
 
Has anyone successfully configured Tomcat 5.5.4 with Apache and mod_jk
to do load balancing and session replication? I did everything as
documents suggested but with no luck. If so, could you advise? 

Not if you don't send the workers.properties :).
I have configured TWO tomcat instances and a lb worker. Whenever I map
the lb worker to URLs, I got Server Internal error. Then, just change
the URL mapping to one of the TWO tomcat backend workers, it works as
expected. Thus, it indicated that Apache can talk to Tomcat through
mod_jk. 
 
You made some configuration error in workers properties.
Probably not added lb worker to worker.list
Mladen.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Has anyone managed clustering with Tomcat 5.5.4+Apache+mod_jk?

2005-01-11 Thread Gary Zhu
 
Thanks Mladen, 

The document for Tomcat has explicitly emphasized NOT to add the lb
worker to the worker.list. Attached is my workers properties file. 

Gary
-Original Message-
From: Mladen Turk [mailto:[EMAIL PROTECTED] 
Sent: January 11, 2005 9:54 AM
To: Tomcat Users List
Subject: Re: Has anyone managed clustering with Tomcat
5.5.4+Apache+mod_jk?

Gary Zhu wrote:
 Hi all,
  
 Has anyone successfully configured Tomcat 5.5.4 with Apache and mod_jk

 to do load balancing and session replication? I did everything as 
 documents suggested but with no luck. If so, could you advise?


Not if you don't send the workers.properties :).

 I have configured TWO tomcat instances and a lb worker. Whenever I map

 the lb worker to URLs, I got Server Internal error. Then, just change 
 the URL mapping to one of the TWO tomcat backend workers, it works as 
 expected. Thus, it indicated that Apache can talk to Tomcat through 
 mod_jk.
  

You made some configuration error in workers properties.
Probably not added lb worker to worker.list

Mladen.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Has anyone managed clustering with Tomcat 5.5.4+Apache+mod_jk?

2005-01-11 Thread Mladen Turk
Gary Zhu wrote:
 
Thanks Mladen, 

The document for Tomcat has explicitly emphasized NOT to add the lb
worker to the worker.list.
Can you point where this statement exists?
If it does then I'll chage it, because it's wrong.
Here is what documentation says:
worker.list:
A comma separated list of workers names that the JK will use. When 
starting up, the web server plugin will instantiate the workers whose 
name appears in the worker.list property, these are also the workers to 
whom you can map requests.


Attached is my workers properties file. 

No it is not ;).
Mladen.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Has anyone managed clustering with Tomcat 5.5.4+Apache+mod_jk?

2005-01-11 Thread Gary Zhu
In the document for workers.properties, there are TWO places emphasizing
NOT to put the lb in the worker.list. One is right in the first
paragraph of Sub Titled Load Balancing directives; and the other one
is within the Description column for the directive
balance(ed)_workers. 

Here is the doc link:
http://jakarta.apache.org/tomcat/connectors-doc/config/workers.html 

Thanks.

Gary

-Original Message-
From: Mladen Turk [mailto:[EMAIL PROTECTED] 
Sent: January 11, 2005 10:07 AM
To: Tomcat Users List
Subject: Re: Has anyone managed clustering with Tomcat
5.5.4+Apache+mod_jk?

Gary Zhu wrote:
  
 Thanks Mladen,
 
 The document for Tomcat has explicitly emphasized NOT to add the lb 
 worker to the worker.list.

Can you point where this statement exists?
If it does then I'll chage it, because it's wrong.

Here is what documentation says:
worker.list:
A comma separated list of workers names that the JK will use. When
starting up, the web server plugin will instantiate the workers whose
name appears in the worker.list property, these are also the workers to
whom you can map requests.



 Attached is my workers properties file. 
 

No it is not ;).

Mladen.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Has anyone managed clustering with Tomcat 5.5.4+Apache+mod_jk?

2005-01-11 Thread Mladen Turk
Gary Zhu wrote:
In the document for workers.properties, there are TWO places emphasizing
NOT to put the lb in the worker.list. One is right in the first
paragraph of Sub Titled Load Balancing directives; and the other one
is within the Description column for the directive
balance(ed)_workers. 


No it says:
The workers that are member of load balancer must not appear in the 
worker.list directive.

So you don't put the workers that belong to load balancer to worker.list
only the lb worker(s).
Mladen.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Has anyone managed clustering with Tomcat 5.5.4+Apache+mod_jk?

2005-01-11 Thread Gary Zhu
Oh that's confusing to me. Would it be clearer to say something like
The workers that are to be loadbalanced/managed by the lb worker must
not appear in the worker.list directive.?

Anyway, very much appreciate your assistance. I will now try it out.

Thanks.

Gary 

-Original Message-
From: Mladen Turk [mailto:[EMAIL PROTECTED] 
Sent: January 11, 2005 10:31 AM
To: Tomcat Users List
Subject: Re: Has anyone managed clustering with Tomcat
5.5.4+Apache+mod_jk?

Gary Zhu wrote:
 In the document for workers.properties, there are TWO places 
 emphasizing NOT to put the lb in the worker.list. One is right in the 
 first paragraph of Sub Titled Load Balancing directives; and the 
 other one is within the Description column for the directive 
 balance(ed)_workers.



No it says:
The workers that are member of load balancer must not appear in the
worker.list directive.

So you don't put the workers that belong to load balancer to worker.list
only the lb worker(s).

Mladen.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Example config file for clustering with Tomcat 5.5.4

2005-01-06 Thread Gary Zhu
Hi All, 
 
I am trying to set up several instances of Tomcat(5.5.4) and load
balance them using JK connector. And I have read through all the docs on
Tomcat loading balancing and clustering. Now I am having difficulty
moving forward as I don't see any configuaration/setup examples
anywhere. I did google search prior to my question. 
 
Could anyone kindly guide me through this? 
 
Thanks.

Gary


Re: Clustering in Tomcat

2004-11-25 Thread Faisal Abdullah
I don't know the answer to that, but here's a Cluster/Session
Replication HOWTO, in case it might help.
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/cluster-howto.html

Regards,
Faisal


On Thu, 25 Nov 2004 09:36:52 +0530, Gaurav Vaish [EMAIL PROTECTED] wrote:
 Hi,
 
I am facing an issue with Tomcat Clustering. With the details
 provided on the website, I implemented it. The session (session-ID) is
 not lost when the machine serving it goes down however all
 session-data (attributes in session) is lost.
 
What can be the issues?
 
To  start with, I had two Tomcat on the same machine with only
 their port numbers changes (4001 and 4002 for cluster).
 
 --
 Happy Hacking,
 Gaurav Vaish
 http://gallery.mastergaurav.org
 ---
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
There are many ways of going forward, but there is only one way of
standing still.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Clustering in Tomcat

2004-11-25 Thread Dale, Matt

Have you got the distributable/ tag in your context's web.xml? Do all the 
objects in your session implement Serializable?

-Original Message-
From: Gaurav Vaish [mailto:[EMAIL PROTECTED]
Sent: 25 November 2004 04:07
To: Tomcat Users List
Subject: Clustering in Tomcat


Hi,

   I am facing an issue with Tomcat Clustering. With the details
provided on the website, I implemented it. The session (session-ID) is
not lost when the machine serving it goes down however all
session-data (attributes in session) is lost.

   What can be the issues?

   To  start with, I had two Tomcat on the same machine with only
their port numbers changes (4001 and 4002 for cluster).



--
Happy Hacking,
Gaurav Vaish
http://gallery.mastergaurav.org
---

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Any opinions expressed in this E-mail may be those of the individual and not 
necessarily the company. This E-mail and any files transmitted with it are 
confidential and solely for the use of the intended recipient. If you are not 
the intended recipient or the person responsible for delivering to the intended 
recipient, be advised that you have received this E-mail in error and that any 
use or copying is strictly prohibited. If you have received this E-mail in 
error please notify the beCogent postmaster at [EMAIL PROTECTED]
Unless expressly stated, opinions in this email are those of the individual 
sender and not beCogent Ltd. You must take full responsibility for virus 
checking this email and any attachments.
Please note that the content of this email or any of its attachments may 
contain data that falls within the scope of the Data Protection Acts and that 
you must ensure that any handling or processing of such data by you is fully 
compliant with the terms and provisions of the Data Protection Act 1984 and 
1998.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Clustering in Tomcat

2004-11-25 Thread Gaurav Vaish
Thanks everybody for your help.

It's working fine now. The problem was with pooling. One server had
pooling while the other did not.


Cheers,
Gaurav


On Thu, 25 Nov 2004 10:33:21 -, Dale, Matt [EMAIL PROTECTED] wrote:
 
 Have you got the distributable/ tag in your context's web.xml? Do all the 
 objects in your session implement Serializable?
 
 
 
 -Original Message-
 From: Gaurav Vaish [mailto:[EMAIL PROTECTED]
 Sent: 25 November 2004 04:07
 To: Tomcat Users List
 Subject: Clustering in Tomcat
 
 Hi,
 
   I am facing an issue with Tomcat Clustering. With the details
 provided on the website, I implemented it. The session (session-ID) is
 not lost when the machine serving it goes down however all
 session-data (attributes in session) is lost.
 
   What can be the issues?
 
   To  start with, I had two Tomcat on the same machine with only
 their port numbers changes (4001 and 4002 for cluster).
 
 --
 Happy Hacking,
 Gaurav Vaish
 http://gallery.mastergaurav.org
 ---
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Clustering in Tomcat

2004-11-24 Thread Gaurav Vaish
Hi,

   I am facing an issue with Tomcat Clustering. With the details
provided on the website, I implemented it. The session (session-ID) is
not lost when the machine serving it goes down however all
session-data (attributes in session) is lost.

   What can be the issues?

   To  start with, I had two Tomcat on the same machine with only
their port numbers changes (4001 and 4002 for cluster).



--
Happy Hacking,
Gaurav Vaish
http://gallery.mastergaurav.org
---

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Clustering on Tomcat 5.0.26 with DeltaManager

2004-06-09 Thread Matt Smith
Any info on the following would be appreciated, cannot see the exception
being generated.  I have the logging level set to debug.  I am using a
filter to wrap the session, but I the valve should never see this so I
would not expect a ClassCastException.  Is there any way to tell the
logging in tomcat to dump the exception???
 
In my log, I am seeing the following
 
StandardContext[]2004-06-06 21:39:25,347 ERROR [http-80-Processor24]
org.apache.catalina.cluster.session.DeltaManager - Unable to serialize
delta request

Looking at the Delta Manager, somewhere here is the problem, in request
Completed...
 
   try {
   DeltaSession session = (DeltaSession)
findSession(sessionId);
   DeltaRequest deltaRequest = session.getDeltaRequest();
   SessionMessage msg = null;
   if (deltaRequest.getSize()  0) {
   
   byte[] data = unloadDeltaRequest(deltaRequest);
   msg = new SessionMessageImpl(name,
SessionMessage.EVT_SESSION_DELTA,
data, sessionId,
 
sessionId+System.currentTimeMillis());
   session.resetDeltaRequest();
   } else if ( !session.isPrimarySession() ) {
   msg = new SessionMessageImpl(getName(),
 
SessionMessage.EVT_SESSION_ACCESSED,
 null,
 sessionId,
 
sessionId+System.currentTimeMillis());
   }
   session.setPrimarySession(true);
   //check to see if we need to send out an access message
   if ( (msg == null) ) {
   long replDelta = System.currentTimeMillis() -
session.getLastTimeReplicated();
   if ( replDelta  (getMaxInactiveInterval()*1000) ) {
   msg = new SessionMessageImpl(getName(),
 
SessionMessage.EVT_SESSION_ACCESSED,
 null,
 sessionId,
 
sessionId+System.currentTimeMillis());
   }
   
   }
   
   //update last replicated time
   if ( msg != null )
session.setLastTimeReplicated(System.currentTimeMillis());
   return msg;
   }
   catch (IOException x) {
   log.error(Unable to serialize delta request, x);
   return null;
   }

 
Thanks,
 
m.


Re: Clustering on Tomcat 5.0.26 with DeltaManager

2004-06-09 Thread Filip Hanik - Dev
you should also see a stack trace, please post that one to the list, 
that should give us all the info we need. Most likely is that one of your attributes 
are not serializable

Filip

- Original Message - 
From: Matt Smith [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 09, 2004 12:05 PM
Subject: Clustering on Tomcat 5.0.26 with DeltaManager


 Any info on the following would be appreciated, cannot see the exception
 being generated.  I have the logging level set to debug.  I am using a
 filter to wrap the session, but I the valve should never see this so I
 would not expect a ClassCastException.  Is there any way to tell the
 logging in tomcat to dump the exception???
  
 In my log, I am seeing the following
  
 StandardContext[]2004-06-06 21:39:25,347 ERROR [http-80-Processor24]
 org.apache.catalina.cluster.session.DeltaManager - Unable to serialize
 delta request
 
 Looking at the Delta Manager, somewhere here is the problem, in request
 Completed...
  
try {
DeltaSession session = (DeltaSession)
 findSession(sessionId);
DeltaRequest deltaRequest = session.getDeltaRequest();
SessionMessage msg = null;
if (deltaRequest.getSize()  0) {

byte[] data = unloadDeltaRequest(deltaRequest);
msg = new SessionMessageImpl(name,
 SessionMessage.EVT_SESSION_DELTA,
 data, sessionId,
  
 sessionId+System.currentTimeMillis());
session.resetDeltaRequest();
} else if ( !session.isPrimarySession() ) {
msg = new SessionMessageImpl(getName(),
  
 SessionMessage.EVT_SESSION_ACCESSED,
  null,
  sessionId,
  
 sessionId+System.currentTimeMillis());
}
session.setPrimarySession(true);
//check to see if we need to send out an access message
if ( (msg == null) ) {
long replDelta = System.currentTimeMillis() -
 session.getLastTimeReplicated();
if ( replDelta  (getMaxInactiveInterval()*1000) ) {
msg = new SessionMessageImpl(getName(),
  
 SessionMessage.EVT_SESSION_ACCESSED,
  null,
  sessionId,
  
 sessionId+System.currentTimeMillis());
}

}

//update last replicated time
if ( msg != null )
 session.setLastTimeReplicated(System.currentTimeMillis());
return msg;
}
catch (IOException x) {
log.error(Unable to serialize delta request, x);
return null;
}
 
  
 Thanks,
  
 m.
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Clustering on Tomcat 5.0.26 with DeltaManager

2004-06-09 Thread Matt Smith
That is what I am wondering about ... I have the level set to debug, but
no stack trace is being logged ...  I could probably determine the issue
if I could see the stack trace.

Here is the log with the messages just prior, and the messages just
after.  There are no more messages from Processor23

StandardContext[]2004-06-07 07:56:50,948 DEBUG [http-80-Processor24]
kodo.DataCache - Cache hit while looking up key 370. 
StandardContext[]2004-06-07 07:56:50,953 DEBUG [http-80-Processor24]
Logs.com.incursiontech.ipscp.jdbc.PreparedStatementWrapper -
[EMAIL PROTECTED]
SQL::[EMAIL PROTECTED]: SELECT t0._version,
t0.count, t0.end, t1.id, t1._class, t1._version, t2.id, t2._class,
t2._version, t2.description, t2.name, t1.current, t1.description,
t1.name, t0.start FROM PegCountBucket t0 LEFT OUTER JOIN PegCount t1 ON
t0.peg = t1.id LEFT OUTER JOIN PegCategory t2 ON t1.category = t2.id
WHERE t0.id = 370 FOR UPDATE]
StandardContext[]2004-06-07 07:56:51,006 ERROR [http-80-Processor23]
org.apache.catalina.cluster.session.DeltaManager - Unable to serialize
delta request
StandardContext[]2004-06-07 07:56:51,010 DEBUG [http-80-Processor24]
kodo.jdbc.SQL - t 32697810, conn 24577207 [57 ms] executing prepstmnt
11370703 SELECT t0._version, t0.count, t0.end, t1.id, t1._class,
t1._version, t2.id, t2._class, t2._version, t2.description, t2.name,
t1.current, t1.description, t1.name, t0.start FROM PegCountBucket t0
LEFT OUTER JOIN PegCount t1 ON t0.peg = t1.id LEFT OUTER JOIN
PegCategory t2 ON t1.category = t2.id WHERE t0.id = ? FOR UPDATE
[params=(long) 370]
StandardContext[]2004-06-07 07:56:51,018 DEBUG [http-80-Processor24]
kodo.DataCache - Cache hit while looking up key 19.

m.

-Original Message-
From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 09, 2004 12:13 PM
To: Tomcat Users List; [EMAIL PROTECTED]
Subject: Re: Clustering on Tomcat 5.0.26 with DeltaManager


you should also see a stack trace, please post that one to the list, 
that should give us all the info we need. Most likely is that one of
your attributes are not serializable

Filip

- Original Message - 
From: Matt Smith [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 09, 2004 12:05 PM
Subject: Clustering on Tomcat 5.0.26 with DeltaManager


 Any info on the following would be appreciated, cannot see the 
 exception being generated.  I have the logging level set to debug.  I 
 am using a filter to wrap the session, but I the valve should never 
 see this so I would not expect a ClassCastException.  Is there any way

 to tell the logging in tomcat to dump the exception???
  
 In my log, I am seeing the following
  
 StandardContext[]2004-06-06 21:39:25,347 ERROR [http-80-Processor24] 
 org.apache.catalina.cluster.session.DeltaManager - Unable to serialize

 delta request
 
 Looking at the Delta Manager, somewhere here is the problem, in 
 request Completed...
  
try {
DeltaSession session = (DeltaSession) 
 findSession(sessionId);
DeltaRequest deltaRequest = session.getDeltaRequest();
SessionMessage msg = null;
if (deltaRequest.getSize()  0) {

byte[] data = unloadDeltaRequest(deltaRequest);
msg = new SessionMessageImpl(name, 
 SessionMessage.EVT_SESSION_DELTA,
 data, sessionId,
  
 sessionId+System.currentTimeMillis());
session.resetDeltaRequest();
} else if ( !session.isPrimarySession() ) {
msg = new SessionMessageImpl(getName(),
  
 SessionMessage.EVT_SESSION_ACCESSED,
  null,
  sessionId,
  
 sessionId+System.currentTimeMillis());
}
session.setPrimarySession(true);
//check to see if we need to send out an access message
if ( (msg == null) ) {
long replDelta = System.currentTimeMillis() - 
 session.getLastTimeReplicated();
if ( replDelta  (getMaxInactiveInterval()*1000) )
{
msg = new SessionMessageImpl(getName(),
  
 SessionMessage.EVT_SESSION_ACCESSED,
  null,
  sessionId,
  
 sessionId+System.currentTimeMillis());
}

}

//update last replicated time
if ( msg != null ) 
 session.setLastTimeReplicated(System.currentTimeMillis());
return msg;
}
catch (IOException x) {
log.error(Unable to serialize delta request, x);
return null;
}
 
  
 Thanks,
  
 m.
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED

Re: Clustering on Tomcat 5.0.26 with DeltaManager

2004-06-09 Thread Filip Hanik - Dev
duh, didn't read your message all the way through.
look in the other log files, it should get logged somewhere.

Filip

- Original Message - 
From: Filip Hanik - Dev [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, June 09, 2004 12:12 PM
Subject: Re: Clustering on Tomcat 5.0.26 with DeltaManager


 you should also see a stack trace, please post that one to the list, 
 that should give us all the info we need. Most likely is that one of your attributes 
 are not serializable
 
 Filip
 
 - Original Message - 
 From: Matt Smith [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, June 09, 2004 12:05 PM
 Subject: Clustering on Tomcat 5.0.26 with DeltaManager
 
 
  Any info on the following would be appreciated, cannot see the exception
  being generated.  I have the logging level set to debug.  I am using a
  filter to wrap the session, but I the valve should never see this so I
  would not expect a ClassCastException.  Is there any way to tell the
  logging in tomcat to dump the exception???
   
  In my log, I am seeing the following
   
  StandardContext[]2004-06-06 21:39:25,347 ERROR [http-80-Processor24]
  org.apache.catalina.cluster.session.DeltaManager - Unable to serialize
  delta request
  
  Looking at the Delta Manager, somewhere here is the problem, in request
  Completed...
   
 try {
 DeltaSession session = (DeltaSession)
  findSession(sessionId);
 DeltaRequest deltaRequest = session.getDeltaRequest();
 SessionMessage msg = null;
 if (deltaRequest.getSize()  0) {
 
 byte[] data = unloadDeltaRequest(deltaRequest);
 msg = new SessionMessageImpl(name,
  SessionMessage.EVT_SESSION_DELTA,
  data, sessionId,
   
  sessionId+System.currentTimeMillis());
 session.resetDeltaRequest();
 } else if ( !session.isPrimarySession() ) {
 msg = new SessionMessageImpl(getName(),
   
  SessionMessage.EVT_SESSION_ACCESSED,
   null,
   sessionId,
   
  sessionId+System.currentTimeMillis());
 }
 session.setPrimarySession(true);
 //check to see if we need to send out an access message
 if ( (msg == null) ) {
 long replDelta = System.currentTimeMillis() -
  session.getLastTimeReplicated();
 if ( replDelta  (getMaxInactiveInterval()*1000) ) {
 msg = new SessionMessageImpl(getName(),
   
  SessionMessage.EVT_SESSION_ACCESSED,
   null,
   sessionId,
   
  sessionId+System.currentTimeMillis());
 }
 
 }
 
 //update last replicated time
 if ( msg != null )
  session.setLastTimeReplicated(System.currentTimeMillis());
 return msg;
 }
 catch (IOException x) {
 log.error(Unable to serialize delta request, x);
 return null;
 }
  
   
  Thanks,
   
  m.
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Clustering on Tomcat 5.0.26 with DeltaManager

2004-06-09 Thread Matt Smith
Filip,

I am using a custom appender for the servlet context, and was not
passing the Throwable on down.  Once I did this, I am getting a
java.io.NotSerializableException...  I'll look into what's being added
to the session, that is not Serializable.

Thanks,
m.

-Original Message-
From: Filip Hanik - Dev [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 09, 2004 12:25 PM
To: Tomcat Users List
Subject: Re: Clustering on Tomcat 5.0.26 with DeltaManager


duh, didn't read your message all the way through.
look in the other log files, it should get logged somewhere.

Filip

- Original Message - 
From: Filip Hanik - Dev [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Wednesday, June 09, 2004 12:12 PM
Subject: Re: Clustering on Tomcat 5.0.26 with DeltaManager


 you should also see a stack trace, please post that one to the list,
 that should give us all the info we need. Most likely is that one of
your attributes are not serializable
 
 Filip
 
 - Original Message -
 From: Matt Smith [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, June 09, 2004 12:05 PM
 Subject: Clustering on Tomcat 5.0.26 with DeltaManager
 
 
  Any info on the following would be appreciated, cannot see the 
  exception being generated.  I have the logging level set to debug.  
  I am using a filter to wrap the session, but I the valve should 
  never see this so I would not expect a ClassCastException.  Is there

  any way to tell the logging in tomcat to dump the exception???
   
  In my log, I am seeing the following
   
  StandardContext[]2004-06-06 21:39:25,347 ERROR [http-80-Processor24]

  org.apache.catalina.cluster.session.DeltaManager - Unable to 
  serialize delta request
  
  Looking at the Delta Manager, somewhere here is the problem, in 
  request Completed...
   
 try {
 DeltaSession session = (DeltaSession) 
  findSession(sessionId);
 DeltaRequest deltaRequest =
session.getDeltaRequest();
 SessionMessage msg = null;
 if (deltaRequest.getSize()  0) {
 
 byte[] data = unloadDeltaRequest(deltaRequest);
 msg = new SessionMessageImpl(name, 
  SessionMessage.EVT_SESSION_DELTA,
  data, sessionId,
   
  sessionId+System.currentTimeMillis());
 session.resetDeltaRequest();
 } else if ( !session.isPrimarySession() ) {
 msg = new SessionMessageImpl(getName(),
   
  SessionMessage.EVT_SESSION_ACCESSED,
   null,
   sessionId,
   
  sessionId+System.currentTimeMillis());
 }
 session.setPrimarySession(true);
 //check to see if we need to send out an access
message
 if ( (msg == null) ) {
 long replDelta = System.currentTimeMillis() - 
  session.getLastTimeReplicated();
 if ( replDelta  (getMaxInactiveInterval()*1000)
) {
 msg = new SessionMessageImpl(getName(),
   
  SessionMessage.EVT_SESSION_ACCESSED,
   null,
   sessionId,
   
  sessionId+System.currentTimeMillis());
 }
 
 }
 
 //update last replicated time
 if ( msg != null ) 
  session.setLastTimeReplicated(System.currentTimeMillis());
 return msg;
 }
 catch (IOException x) {
 log.error(Unable to serialize delta request, x);
 return null;
 }
  
   
  Thanks,
   
  m.
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: clustering/replication tomcat 5

2004-03-26 Thread Filip Hanik \(lists\)
should be a document in the doc folder shipped with tomcat.

steps are pretty simple

1. ucomment the cluster section in server.xml
2. add distributable/ to web.xml
3. make all your attributes serializable

4. if you have two or more tomcat instances on the same machine then you
will need to adjust the tcpListenPort in server.xml

Filip

-Original Message-
From: pablo [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 25, 2004 7:05 AM
To: [EMAIL PROTECTED]
Subject: clustering/replication tomcat 5


Hi folks,
  I am looking for a step by step on how to do tomcat
clustering/replication .  I am unable to find anything decent on the
web nor in my books (being that they are still tomcat 4 specific ).  If
anybody has a quick down and dirty on these procedures please let me
know.
-Pablo


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.614 / Virus Database: 393 - Release Date: 3/5/2004


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



clustering/replication tomcat 5

2004-03-25 Thread pablo
Hi folks,
 I am looking for a step by step on how to do tomcat 
clustering/replication .  I am unable to find anything decent on the 
web nor in my books (being that they are still tomcat 4 specific ).  If 
anybody has a quick down and dirty on these procedures please let me 
know.
-Pablo

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Error in clustering in tomcat 5

2003-12-22 Thread daniel
configuration

tomcat1 and tomcat 2 load balanced with mod_jk with apache 

in the tomcat server.xml file i have clustering enabled and i have the following for 
10 different hosts. The web.xml file for each host has the 

distributable/

Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster
name=etrakCluster1
debug=100
serviceclass=org.apache.catalina.cluster.mcast.McastService
mcastAddr=224.0.0.1
mcastPort=45564
mcastFrequency=500
mcastDropTime=3000
tcpThreadCount=2
tcpListenAddress=auto
tcpListenPort=10001
tcpSelectorTimeout=100
printToScreen=true
expireSessionsOnShutdown=false
useDirtyFlag=false
replicationMode=synchronous
/
Valve className=org.apache.catalina.cluster.tcp.ReplicationValve
filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;/
Valve className=org.apache.catalina.valves.AccessLogValve
directory=logs prefix=etrakCluster1_access_log. suffix=.txt
pattern=common resolveHosts=false/


i am reciving the fowling when i kill one of the 2 tomcat instances and also recive a 
html error message as follows

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to 
complete your request. Please contact the server administrator, [EMAIL PROTECTED] and 
inform them of the time the error occurred, and anything you might have done that may 
have caused the error. More information about this error may be available in the 
server error log. Apache/1.3.29 Server at www.etrak-plus.com Port 80
and i get this in the log.
Dec 22, 2003 2:08:21 PM 
org.apache.catalina.cluster.session.SimpleTcpReplicationManager log
SEVERE: Unable to receive message through TCP channel
java.lang.IllegalStateException: getAttributeNames: Session already invalidated
at 
org.apache.catalina.session.StandardSession.getAttributeNames(StandardSession.java:1005)
at 
org.apache.catalina.cluster.session.ReplicatedSession.toString(ReplicatedSession.java:272)
at java.lang.String.valueOf(String.java:2131)
at java.lang.StringBuffer.append(StringBuffer.java:370)
at 
org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageReceived(SimpleTcpReplicationManager.java:620)
at 
org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageDataReceived(SimpleTcpReplicationManager.java:653)
at 
org.apache.catalina.cluster.tcp.SimpleTcpCluster.messageDataReceived(SimpleTcpCluster.java:678)
at org.apache.catalina.cluster.io.ObjectReader.append(ObjectReader.java:110)
at 
org.apache.catalina.cluster.tcp.TcpReplicationThread.drainChannel(TcpReplicationThread.java:167)
at 
org.apache.catalina.cluster.tcp.TcpReplicationThread.run(TcpReplicationThread.java:113)
at 
org.apache.catalina.cluster.session.ReplicatedSession.toString(ReplicatedSession.java:272)
at java.lang.String.valueOf(String.java:2131)
at java.lang.StringBuffer.append(StringBuffer.java:370)
at 
org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageReceived(SimpleTcpReplicationManager.java:620)
at 
org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageDataReceived(SimpleTcpReplicationManager.java:653)
at 
org.apache.catalina.cluster.tcp.SimpleTcpCluster.messageDataReceived(SimpleTcpCluster.java:678)
at org.apache.catalina.cluster.io.ObjectReader.append(ObjectReader.java:110)
at 
org.apache.catalina.cluster.tcp.TcpReplicationThread.drainChannel(TcpReplicationThread.java:167)
at 
org.apache.catalina.cluster.tcp.TcpReplicationThread.run(TcpReplicationThread.java:113)
Dec 22, 2003 2:08:21 PM 
org.apache.catalina.cluster.session.SimpleTcpReplicationManager log


does any one have anyidea why this would be happing?

is it a configuration that i missed?



Thanks,

Daniel Schulken


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.554 / Virus Database: 346 - Release Date: 12/20/2003


Re: Error in clustering in tomcat 5

2003-12-22 Thread Filip Hanik
no, you are experiencing a bug, one of you sessions is invalidated, and when
the system tries to copy it over, it fails.
I will add in the check to not copy over invalid sessions.

Filip

- Original Message -
From: [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, December 22, 2003 10:51 AM
Subject: Error in clustering in tomcat 5


configuration

tomcat1 and tomcat 2 load balanced with mod_jk with apache

in the tomcat server.xml file i have clustering enabled and i have the
following for 10 different hosts. The web.xml file for each host has the

distributable/

Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster
name=etrakCluster1
debug=100
serviceclass=org.apache.catalina.cluster.mcast.McastService
mcastAddr=224.0.0.1
mcastPort=45564
mcastFrequency=500
mcastDropTime=3000
tcpThreadCount=2
tcpListenAddress=auto
tcpListenPort=10001
tcpSelectorTimeout=100
printToScreen=true
expireSessionsOnShutdown=false
useDirtyFlag=false
replicationMode=synchronous
/
Valve className=org.apache.catalina.cluster.tcp.ReplicationValve
filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;/
Valve className=org.apache.catalina.valves.AccessLogValve
directory=logs prefix=etrakCluster1_access_log. suffix=.txt
pattern=common resolveHosts=false/


i am reciving the fowling when i kill one of the 2 tomcat instances and also
recive a html error message as follows

Internal Server Error
The server encountered an internal error or misconfiguration and was unable
to complete your request. Please contact the server administrator,
[EMAIL PROTECTED] and inform them of the time the error occurred, and
anything you might have done that may have caused the error. More
information about this error may be available in the server error log.
Apache/1.3.29 Server at www.etrak-plus.com Port 80
and i get this in the log.
Dec 22, 2003 2:08:21 PM
org.apache.catalina.cluster.session.SimpleTcpReplicationManager log
SEVERE: Unable to receive message through TCP channel
java.lang.IllegalStateException: getAttributeNames: Session already
invalidated
at
org.apache.catalina.session.StandardSession.getAttributeNames(StandardSessio
n.java:1005)
at
org.apache.catalina.cluster.session.ReplicatedSession.toString(ReplicatedSes
sion.java:272)
at java.lang.String.valueOf(String.java:2131)
at java.lang.StringBuffer.append(StringBuffer.java:370)
at
org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageRecei
ved(SimpleTcpReplicationManager.java:620)
at
org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageDataR
eceived(SimpleTcpReplicationManager.java:653)
at
org.apache.catalina.cluster.tcp.SimpleTcpCluster.messageDataReceived(SimpleT
cpCluster.java:678)
at org.apache.catalina.cluster.io.ObjectReader.append(ObjectReader.java:110)
at
org.apache.catalina.cluster.tcp.TcpReplicationThread.drainChannel(TcpReplica
tionThread.java:167)
at
org.apache.catalina.cluster.tcp.TcpReplicationThread.run(TcpReplicationThrea
d.java:113)
at
org.apache.catalina.cluster.session.ReplicatedSession.toString(ReplicatedSes
sion.java:272)
at java.lang.String.valueOf(String.java:2131)
at java.lang.StringBuffer.append(StringBuffer.java:370)
at
org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageRecei
ved(SimpleTcpReplicationManager.java:620)
at
org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageDataR
eceived(SimpleTcpReplicationManager.java:653)
at
org.apache.catalina.cluster.tcp.SimpleTcpCluster.messageDataReceived(SimpleT
cpCluster.java:678)
at org.apache.catalina.cluster.io.ObjectReader.append(ObjectReader.java:110)
at
org.apache.catalina.cluster.tcp.TcpReplicationThread.drainChannel(TcpReplica
tionThread.java:167)
at
org.apache.catalina.cluster.tcp.TcpReplicationThread.run(TcpReplicationThrea
d.java:113)
Dec 22, 2003 2:08:21 PM
org.apache.catalina.cluster.session.SimpleTcpReplicationManager log


does any one have anyidea why this would be happing?

is it a configuration that i missed?



Thanks,

Daniel Schulken


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.554 / Virus Database: 346 - Release Date: 12/20/2003


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Error in clustering in tomcat 5

2003-12-22 Thread daniel
thanks for the quick reply Filip.
as a side note i seem to consistly get this message running on slackware 9.1
distro. not sure if that may help.

thanks aging,
Daniel Schulken

- Original Message - 
From: Filip Hanik [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, December 22, 2003 2:00 PM
Subject: Re: Error in clustering in tomcat 5


 no, you are experiencing a bug, one of you sessions is invalidated, and
when
 the system tries to copy it over, it fails.
 I will add in the check to not copy over invalid sessions.

 Filip

 - Original Message -
 From: [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Monday, December 22, 2003 10:51 AM
 Subject: Error in clustering in tomcat 5


 configuration

 tomcat1 and tomcat 2 load balanced with mod_jk with apache

 in the tomcat server.xml file i have clustering enabled and i have the
 following for 10 different hosts. The web.xml file for each host has the

 distributable/

 Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster
 name=etrakCluster1
 debug=100
 serviceclass=org.apache.catalina.cluster.mcast.McastService
 mcastAddr=224.0.0.1
 mcastPort=45564
 mcastFrequency=500
 mcastDropTime=3000
 tcpThreadCount=2
 tcpListenAddress=auto
 tcpListenPort=10001
 tcpSelectorTimeout=100
 printToScreen=true
 expireSessionsOnShutdown=false
 useDirtyFlag=false
 replicationMode=synchronous
 /
 Valve className=org.apache.catalina.cluster.tcp.ReplicationValve
 filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;/
 Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs prefix=etrakCluster1_access_log. suffix=.txt
 pattern=common resolveHosts=false/


 i am reciving the fowling when i kill one of the 2 tomcat instances and
also
 recive a html error message as follows

 Internal Server Error
 The server encountered an internal error or misconfiguration and was
unable
 to complete your request. Please contact the server administrator,
 [EMAIL PROTECTED] and inform them of the time the error occurred,
and
 anything you might have done that may have caused the error. More
 information about this error may be available in the server error log.
 Apache/1.3.29 Server at www.etrak-plus.com Port 80
 and i get this in the log.
 Dec 22, 2003 2:08:21 PM
 org.apache.catalina.cluster.session.SimpleTcpReplicationManager log
 SEVERE: Unable to receive message through TCP channel
 java.lang.IllegalStateException: getAttributeNames: Session already
 invalidated
 at

org.apache.catalina.session.StandardSession.getAttributeNames(StandardSessio
 n.java:1005)
 at

org.apache.catalina.cluster.session.ReplicatedSession.toString(ReplicatedSes
 sion.java:272)
 at java.lang.String.valueOf(String.java:2131)
 at java.lang.StringBuffer.append(StringBuffer.java:370)
 at

org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageRecei
 ved(SimpleTcpReplicationManager.java:620)
 at

org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageDataR
 eceived(SimpleTcpReplicationManager.java:653)
 at

org.apache.catalina.cluster.tcp.SimpleTcpCluster.messageDataReceived(SimpleT
 cpCluster.java:678)
 at
org.apache.catalina.cluster.io.ObjectReader.append(ObjectReader.java:110)
 at

org.apache.catalina.cluster.tcp.TcpReplicationThread.drainChannel(TcpReplica
 tionThread.java:167)
 at

org.apache.catalina.cluster.tcp.TcpReplicationThread.run(TcpReplicationThrea
 d.java:113)
 at

org.apache.catalina.cluster.session.ReplicatedSession.toString(ReplicatedSes
 sion.java:272)
 at java.lang.String.valueOf(String.java:2131)
 at java.lang.StringBuffer.append(StringBuffer.java:370)
 at

org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageRecei
 ved(SimpleTcpReplicationManager.java:620)
 at

org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageDataR
 eceived(SimpleTcpReplicationManager.java:653)
 at

org.apache.catalina.cluster.tcp.SimpleTcpCluster.messageDataReceived(SimpleT
 cpCluster.java:678)
 at
org.apache.catalina.cluster.io.ObjectReader.append(ObjectReader.java:110)
 at

org.apache.catalina.cluster.tcp.TcpReplicationThread.drainChannel(TcpReplica
 tionThread.java:167)
 at

org.apache.catalina.cluster.tcp.TcpReplicationThread.run(TcpReplicationThrea
 d.java:113)
 Dec 22, 2003 2:08:21 PM
 org.apache.catalina.cluster.session.SimpleTcpReplicationManager log


 does any one have anyidea why this would be happing?

 is it a configuration that i missed?



 Thanks,

 Daniel Schulken


 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.554 / Virus Database: 346 - Release Date: 12/20/2003


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.554 / Virus Database: 346 - Release Date: 12

Re: Error in clustering in tomcat 5

2003-12-22 Thread Filip Hanik
let me get a fix out this week, and we shall see if we get a difference :)

Filip
- Original Message -
From: [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, December 22, 2003 11:25 AM
Subject: Re: Error in clustering in tomcat 5


thanks for the quick reply Filip.
as a side note i seem to consistly get this message running on slackware 9.1
distro. not sure if that may help.

thanks aging,
Daniel Schulken

- Original Message -
From: Filip Hanik [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Monday, December 22, 2003 2:00 PM
Subject: Re: Error in clustering in tomcat 5


 no, you are experiencing a bug, one of you sessions is invalidated, and
when
 the system tries to copy it over, it fails.
 I will add in the check to not copy over invalid sessions.

 Filip

 - Original Message -
 From: [EMAIL PROTECTED]
 To: Tomcat Users List [EMAIL PROTECTED]
 Sent: Monday, December 22, 2003 10:51 AM
 Subject: Error in clustering in tomcat 5


 configuration

 tomcat1 and tomcat 2 load balanced with mod_jk with apache

 in the tomcat server.xml file i have clustering enabled and i have the
 following for 10 different hosts. The web.xml file for each host has the

 distributable/

 Cluster className=org.apache.catalina.cluster.tcp.SimpleTcpCluster
 name=etrakCluster1
 debug=100
 serviceclass=org.apache.catalina.cluster.mcast.McastService
 mcastAddr=224.0.0.1
 mcastPort=45564
 mcastFrequency=500
 mcastDropTime=3000
 tcpThreadCount=2
 tcpListenAddress=auto
 tcpListenPort=10001
 tcpSelectorTimeout=100
 printToScreen=true
 expireSessionsOnShutdown=false
 useDirtyFlag=false
 replicationMode=synchronous
 /
 Valve className=org.apache.catalina.cluster.tcp.ReplicationValve
 filter=.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;/
 Valve className=org.apache.catalina.valves.AccessLogValve
 directory=logs prefix=etrakCluster1_access_log. suffix=.txt
 pattern=common resolveHosts=false/


 i am reciving the fowling when i kill one of the 2 tomcat instances and
also
 recive a html error message as follows

 Internal Server Error
 The server encountered an internal error or misconfiguration and was
unable
 to complete your request. Please contact the server administrator,
 [EMAIL PROTECTED] and inform them of the time the error occurred,
and
 anything you might have done that may have caused the error. More
 information about this error may be available in the server error log.
 Apache/1.3.29 Server at www.etrak-plus.com Port 80
 and i get this in the log.
 Dec 22, 2003 2:08:21 PM
 org.apache.catalina.cluster.session.SimpleTcpReplicationManager log
 SEVERE: Unable to receive message through TCP channel
 java.lang.IllegalStateException: getAttributeNames: Session already
 invalidated
 at

org.apache.catalina.session.StandardSession.getAttributeNames(StandardSessio
 n.java:1005)
 at

org.apache.catalina.cluster.session.ReplicatedSession.toString(ReplicatedSes
 sion.java:272)
 at java.lang.String.valueOf(String.java:2131)
 at java.lang.StringBuffer.append(StringBuffer.java:370)
 at

org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageRecei
 ved(SimpleTcpReplicationManager.java:620)
 at

org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageDataR
 eceived(SimpleTcpReplicationManager.java:653)
 at

org.apache.catalina.cluster.tcp.SimpleTcpCluster.messageDataReceived(SimpleT
 cpCluster.java:678)
 at
org.apache.catalina.cluster.io.ObjectReader.append(ObjectReader.java:110)
 at

org.apache.catalina.cluster.tcp.TcpReplicationThread.drainChannel(TcpReplica
 tionThread.java:167)
 at

org.apache.catalina.cluster.tcp.TcpReplicationThread.run(TcpReplicationThrea
 d.java:113)
 at

org.apache.catalina.cluster.session.ReplicatedSession.toString(ReplicatedSes
 sion.java:272)
 at java.lang.String.valueOf(String.java:2131)
 at java.lang.StringBuffer.append(StringBuffer.java:370)
 at

org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageRecei
 ved(SimpleTcpReplicationManager.java:620)
 at

org.apache.catalina.cluster.session.SimpleTcpReplicationManager.messageDataR
 eceived(SimpleTcpReplicationManager.java:653)
 at

org.apache.catalina.cluster.tcp.SimpleTcpCluster.messageDataReceived(SimpleT
 cpCluster.java:678)
 at
org.apache.catalina.cluster.io.ObjectReader.append(ObjectReader.java:110)
 at

org.apache.catalina.cluster.tcp.TcpReplicationThread.drainChannel(TcpReplica
 tionThread.java:167)
 at

org.apache.catalina.cluster.tcp.TcpReplicationThread.run(TcpReplicationThrea
 d.java:113)
 Dec 22, 2003 2:08:21 PM
 org.apache.catalina.cluster.session.SimpleTcpReplicationManager log


 does any one have anyidea why this would be happing?

 is it a configuration that i missed?



 Thanks,

 Daniel Schulken


 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.554 / Virus Database: 346 - Release Date: 12/20/2003

Trouble with clustering ending tomcat process on 4.1.24

2003-07-14 Thread Lawrence, Gabriel
Howdy,

I've noticed that sporadically my tomcat process dies with the following
error in the Catalina.out. Anyone have any ideas on whats going on?
Obviously an exception of somesort, but why the exception?

Thanks,
-gabe

[InMemoryReplicationManager]   storing attribute 'artifactbinding' with
value 'e
[EMAIL PROTECTED]'
[InMemoryReplicationManager] Session queued for replication
ReplicatedSession id=C54825CD094CEB71F3E891B19D34BA0E
ref=StandardSession[C54825
CD094CEB71F3E891B19D34BA0E]
name=userID; [EMAIL PROTECTED]
name=authResult;
value=edu.ucsd.security.ldapauth.LDAPAuthenticationResu
[EMAIL PROTECTED]
name=artifactbinding;
value=edu.ucsd.security.saml.server.SamlArtifactBi
[EMAIL PROTECTED]
LastAccess=1058226313531

file sync interval: 60091
file sync: 1
ServerLifecycleListener: destroyMBeans: Throwable
javax.management.InstanceNotFoundException: MBeanServer cannot find
MBean with O
bjectName
Catalina:type=Valve,sequence=18528421,path=/a4,host=asdfasdf.ucsd.edu,se
rvic
e=Tomcat-Standalone
at
mx4j.server.MBeanServerImpl.findMBeanMetaData(MBeanServerImpl.java:52
8)
at
mx4j.server.MBeanServerImpl.unregisterMBean(MBeanServerImpl.java:1165
)
at
org.apache.catalina.mbeans.MBeanUtils.destroyMBean(MBeanUtils.java:22
89)
at
org.apache.catalina.mbeans.ServerLifecycleListener.destroyMBeans(Serv
erLifecycleListener.java:930)
at
org.apache.catalina.mbeans.ServerLifecycleListener.destroyMBeans(Serv
erLifecycleListener.java:1165)
at
org.apache.catalina.mbeans.ServerLifecycleListener.destroyMBeans(Serv
erLifecycleListener.java:1114)
at
org.apache.catalina.mbeans.ServerLifecycleListener.destroyMBeans(Serv
erLifecycleListener.java:1296)
at
org.apache.catalina.mbeans.ServerLifecycleListener.destroyMBeans(Serv
erLifecycleListener.java:1268)
at
org.apache.catalina.mbeans.ServerLifecycleListener.destroyMBeans(Serv
erLifecycleListener.java:873)
at
org.apache.catalina.mbeans.ServerLifecycleListener.lifecycleEvent(Ser
verLifecycleListener.java:254)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:166)
at
org.apache.catalina.core.StandardServer.stop(StandardServer.java:2219
)
at
org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalin
a.java:624)
Stopping service Tomcat-Standalone
[InMemoryReplicationManager] Stopping

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



problem with clustering using Tomcat 4.1

2003-06-30 Thread Das, Sanjeev
Hello Filip,

I have been trying to use your session replication libs in tomcat 4.1 and have run 
into problems. I was wondering if you could help me out here. I am trying the 
replication with a simple jsp page on a one box setup with two instances of tomcat 
running.

The jsp page simply prints out the session id and the cookies it has received. Here is 
the text of the JSP page:

%@ page import=javax.servlet.http.* %
HTML
BODY
Server: ONE
p/


%
if (request.getSession().isNew())
{
%

This is a new session.

%
}
else
{
%
This is an old session.
%
}
%

p/

The session id : %=request.getSession().getId()%


bCookies:/bbr/

%
Cookie[] cookies = request.getCookies();
if (cookies != null)
{
for (int i=0; i  cookies.length; i++)
{
%

bDomain:/bbr/
%=cookies[i].getDomain()%br/

bName:/bbr/
%=cookies[i].getName()%br/

bValue:/bbr/
%=cookies[i].getValue()%br/

bPath:/bbr/
%=cookies[i].getPath()%br/

bMaxAge:/bbr/
%=cookies[i].getMaxAge()%br/


%
}
}
%
/BODY
/HTML

The pages in the two instances are exactly the same except that one says SERVER ONE 
and the other SERVER TWO so that I can distinguish between the two. I believe I have 
setup the Context properly for both the instances. 

I am using Apache to do the round robin scheduling using mod_jk.


When I hit the page and look at the message in the two tomcat consoles I get the 
following:

first console:

[InMemoryReplicationManager] Replicated Session created at org.apache.catalina.c
luster.mcast.McastMember[tcp://172.17.1.106:4001,172.17.1.106,4001] with ID=6B5C
F3C232D4D8636D14586083E0B094
[InMemoryReplicationManager] writeObject() storing session 6B5CF3C232D4D8636D145
86083E0B094
[InMemoryReplicationManager] Replication Statistics
Messages sent=2
Message serialization time=31
Average serialization time=15.5ms
Average session send  size=805.0
Messages received=0
Message deserialization time=0
Average deserialization time=NaNms
Average message  delay  time=NaNms

second console:
[InMemoryReplicationManager] InMemoryReplicationManager.messageDataReceived(): r
eceived message
[InMemoryReplicationManager] Received SessionMessage of type=SESSION-CREATED
[InMemoryReplicationManager] Replicated session received ID=6B5CF3C232D4D8636D14
586083E0B094
[InMemoryReplicationManager] readObject() loading session 6B5CF3C232D4D8636D1458
6083E0B094
[InMemoryReplicationManager] Replicated session received=ReplicatedSession id=6B
5CF3C232D4D8636D14586083E0B094 ref=StandardSession[6B5CF3C232D4D8636D14586083E0B
094]
LastAccess=1056747084419

[InMemoryReplicationManager] Replication Statistics
Messages sent=1
Message serialization time=16
Average serialization time=16.0ms
Average session send  size=491.0
Messages received=2
Message deserialization time=46
Average deserialization time=23.0ms
Average message  delay  time=15.5ms

It seems like the first box created the session and it was replicated properly in the 
second box.

Now when I reload the page and the request goes to the second box I would expect the 
same session id to be printed out. Instead I get the following output from the jsp 
page:

Server: TWO 
This is a new session. 
The session id : E086477BF76F98820020F3FA7048C5E8 Cookies:
Domain:
null
Name:
JSESSIONID
Value:
6B5CF3C232D4D8636D14586083E0B094
Path:
null
MaxAge:
-1

The second server did receive the right JSESSIONID (6B5CF3C232D4D8636D14586083E0B094) 
but decided to create a new session instead of the replicated one.

Do you have any ideas as to why this occur?

thanks

Sanjeev



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: problem with clustering using Tomcat 4.1

2003-06-30 Thread Angus Mezick
Check the name of the cookie, the host of the cookie, and the path of
the cookie.  ESP the path and the host of the cookie.  These things need
to match.  Netscape 7 also have a LiveHTTPHeaders plugin at mozdev.org
that is REALLY helpful for debugging this stuff.

 -Original Message-
 From: Das, Sanjeev [mailto:[EMAIL PROTECTED] 
 Sent: Friday, June 27, 2003 5:11 PM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: problem with clustering using Tomcat 4.1
 
 
 Hello Filip,
 
 I have been trying to use your session replication libs in 
 tomcat 4.1 and have run into problems. I was wondering if you 
 could help me out here. I am trying the replication with a 
 simple jsp page on a one box setup with two instances of 
 tomcat running.
 
 The jsp page simply prints out the session id and the cookies 
 it has received. Here is the text of the JSP page:
 
 %@ page import=javax.servlet.http.* %
 HTML
 BODY
 Server: ONE
 p/
 
 
 %
 if (request.getSession().isNew())
 {
 %
 
 This is a new session.
 
 %
 }
 else
 {
 %
 This is an old session.
 %
 }
 %
 
 p/
 
 The session id : %=request.getSession().getId()%
 
 
 bCookies:/bbr/
 
 %
 Cookie[] cookies = request.getCookies();
 if (cookies != null)
 {
   for (int i=0; i  cookies.length; i++)
   {
   %
 
   bDomain:/bbr/
   %=cookies[i].getDomain()%br/
 
   bName:/bbr/
   %=cookies[i].getName()%br/
 
   bValue:/bbr/
   %=cookies[i].getValue()%br/
 
   bPath:/bbr/
   %=cookies[i].getPath()%br/
 
   bMaxAge:/bbr/
   %=cookies[i].getMaxAge()%br/
 
 
   %
   }
 }
 %
 /BODY
 /HTML
 
 The pages in the two instances are exactly the same except 
 that one says SERVER ONE and the other SERVER TWO so that I 
 can distinguish between the two. I believe I have setup the 
 Context properly for both the instances. 
 
 I am using Apache to do the round robin scheduling using mod_jk.
 
 
 When I hit the page and look at the message in the two tomcat 
 consoles I get the following:
 
 first console:
 
 [InMemoryReplicationManager] Replicated Session created at 
 org.apache.catalina.c
 luster.mcast.McastMember[tcp://172.17.1.106:4001,172.17.1.106,
 4001] with ID=6B5C
 F3C232D4D8636D14586083E0B094
 [InMemoryReplicationManager] writeObject() storing session 
 6B5CF3C232D4D8636D145
 86083E0B094
 [InMemoryReplicationManager] Replication Statistics
 Messages sent=2
 Message serialization time=31
 Average serialization time=15.5ms
 Average session send  size=805.0
 Messages received=0
 Message deserialization time=0
 Average deserialization time=NaNms
 Average message  delay  time=NaNms
 
 second console:
 [InMemoryReplicationManager] 
 InMemoryReplicationManager.messageDataReceived(): r
 eceived message
 [InMemoryReplicationManager] Received SessionMessage of 
 type=SESSION-CREATED
 [InMemoryReplicationManager] Replicated session received 
 ID=6B5CF3C232D4D8636D14
 586083E0B094
 [InMemoryReplicationManager] readObject() loading session 
 6B5CF3C232D4D8636D1458
 6083E0B094
 [InMemoryReplicationManager] Replicated session 
 received=ReplicatedSession id=6B
 5CF3C232D4D8636D14586083E0B094 
 ref=StandardSession[6B5CF3C232D4D8636D14586083E0B
 094]
 LastAccess=1056747084419
 
 [InMemoryReplicationManager] Replication Statistics
 Messages sent=1
 Message serialization time=16
 Average serialization time=16.0ms
 Average session send  size=491.0
 Messages received=2
 Message deserialization time=46
 Average deserialization time=23.0ms
 Average message  delay  time=15.5ms
 
 It seems like the first box created the session and it was 
 replicated properly in the second box.
 
 Now when I reload the page and the request goes to the second 
 box I would expect the same session id to be printed out. 
 Instead I get the following output from the jsp page:
 
 Server: TWO 
 This is a new session. 
 The session id : E086477BF76F98820020F3FA7048C5E8 Cookies:
 Domain:
 null
 Name:
 JSESSIONID
 Value:
 6B5CF3C232D4D8636D14586083E0B094
 Path:
 null
 MaxAge:
 -1
 
 The second server did receive the right JSESSIONID 
 (6B5CF3C232D4D8636D14586083E0B094) but decided to create a 
 new session instead of the replicated one.
 
 Do you have any ideas as to why this occur?
 
 thanks
 
 Sanjeev
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: problem with clustering using Tomcat 4.1

2003-06-30 Thread Filip Hanik
send complete info, configurations and complete logs.
I'm going on my honey moon, be back in three weeks.

have fun!
filip

 -Original Message-
 From: Das, Sanjeev [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 27, 2003 2:11 PM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: problem with clustering using Tomcat 4.1
 
 
 Hello Filip,
 
 I have been trying to use your session replication libs in tomcat 
 4.1 and have run into problems. I was wondering if you could help 
 me out here. I am trying the replication with a simple jsp page 
 on a one box setup with two instances of tomcat running.
 
 The jsp page simply prints out the session id and the cookies it 
 has received. Here is the text of the JSP page:
 
 %@ page import=javax.servlet.http.* %
 HTML
 BODY
 Server: ONE
 p/
 
 
 %
 if (request.getSession().isNew())
 {
 %
 
 This is a new session.
 
 %
 }
 else
 {
 %
 This is an old session.
 %
 }
 %
 
 p/
 
 The session id : %=request.getSession().getId()%
 
 
 bCookies:/bbr/
 
 %
 Cookie[] cookies = request.getCookies();
 if (cookies != null)
 {
   for (int i=0; i  cookies.length; i++)
   {
   %
 
   bDomain:/bbr/
   %=cookies[i].getDomain()%br/
 
   bName:/bbr/
   %=cookies[i].getName()%br/
 
   bValue:/bbr/
   %=cookies[i].getValue()%br/
 
   bPath:/bbr/
   %=cookies[i].getPath()%br/
 
   bMaxAge:/bbr/
   %=cookies[i].getMaxAge()%br/
 
 
   %
   }
 }
 %
 /BODY
 /HTML
 
 The pages in the two instances are exactly the same except that 
 one says SERVER ONE and the other SERVER TWO so that I can 
 distinguish between the two. I believe I have setup the Context 
 properly for both the instances. 
 
 I am using Apache to do the round robin scheduling using mod_jk.
 
 
 When I hit the page and look at the message in the two tomcat 
 consoles I get the following:
 
 first console:
 
 [InMemoryReplicationManager] Replicated Session created at 
 org.apache.catalina.c
 luster.mcast.McastMember[tcp://172.17.1.106:4001,172.17.1.106,4001
 ] with ID=6B5C
 F3C232D4D8636D14586083E0B094
 [InMemoryReplicationManager] writeObject() storing session 
 6B5CF3C232D4D8636D145
 86083E0B094
 [InMemoryReplicationManager] Replication Statistics
 Messages sent=2
 Message serialization time=31
 Average serialization time=15.5ms
 Average session send  size=805.0
 Messages received=0
 Message deserialization time=0
 Average deserialization time=NaNms
 Average message  delay  time=NaNms
 
 second console:
 [InMemoryReplicationManager] 
 InMemoryReplicationManager.messageDataReceived(): r
 eceived message
 [InMemoryReplicationManager] Received SessionMessage of 
 type=SESSION-CREATED
 [InMemoryReplicationManager] Replicated session received 
 ID=6B5CF3C232D4D8636D14
 586083E0B094
 [InMemoryReplicationManager] readObject() loading session 
 6B5CF3C232D4D8636D1458
 6083E0B094
 [InMemoryReplicationManager] Replicated session 
 received=ReplicatedSession id=6B
 5CF3C232D4D8636D14586083E0B094 
 ref=StandardSession[6B5CF3C232D4D8636D14586083E0B
 094]
 LastAccess=1056747084419
 
 [InMemoryReplicationManager] Replication Statistics
 Messages sent=1
 Message serialization time=16
 Average serialization time=16.0ms
 Average session send  size=491.0
 Messages received=2
 Message deserialization time=46
 Average deserialization time=23.0ms
 Average message  delay  time=15.5ms
 
 It seems like the first box created the session and it was 
 replicated properly in the second box.
 
 Now when I reload the page and the request goes to the second box 
 I would expect the same session id to be printed out. Instead I 
 get the following output from the jsp page:
 
 Server: TWO 
 This is a new session. 
 The session id : E086477BF76F98820020F3FA7048C5E8 Cookies:
 Domain:
 null
 Name:
 JSESSIONID
 Value:
 6B5CF3C232D4D8636D14586083E0B094
 Path:
 null
 MaxAge:
 -1
 
 The second server did receive the right JSESSIONID 
 (6B5CF3C232D4D8636D14586083E0B094) but decided to create a new 
 session instead of the replicated one.
 
 Do you have any ideas as to why this occur?
 
 thanks
 
 Sanjeev
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: problem with clustering using Tomcat 4.1

2003-06-30 Thread Shapira, Yoav

Howdy,
No, YOU have fun Senor Hanik ;)  Congratulations!!!

Yoav Shapira
Millennium ChemInformatics


-Original Message-
From: Filip Hanik [mailto:[EMAIL PROTECTED]
Sent: Monday, June 30, 2003 12:17 PM
To: Tomcat Users List
Cc: [EMAIL PROTECTED]
Subject: RE: problem with clustering using Tomcat 4.1

send complete info, configurations and complete logs.
I'm going on my honey moon, be back in three weeks.

have fun!
filip

 -Original Message-
 From: Das, Sanjeev [mailto:[EMAIL PROTECTED]
 Sent: Friday, June 27, 2003 2:11 PM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: problem with clustering using Tomcat 4.1


 Hello Filip,

 I have been trying to use your session replication libs in tomcat
 4.1 and have run into problems. I was wondering if you could help
 me out here. I am trying the replication with a simple jsp page
 on a one box setup with two instances of tomcat running.

 The jsp page simply prints out the session id and the cookies it
 has received. Here is the text of the JSP page:

 %@ page import=javax.servlet.http.* %
 HTML
 BODY
 Server: ONE
 p/


 %
 if (request.getSession().isNew())
 {
 %

 This is a new session.

 %
 }
 else
 {
 %
 This is an old session.
 %
 }
 %

 p/

 The session id : %=request.getSession().getId()%


 bCookies:/bbr/

 %
 Cookie[] cookies = request.getCookies();
 if (cookies != null)
 {
  for (int i=0; i  cookies.length; i++)
  {
  %

  bDomain:/bbr/
  %=cookies[i].getDomain()%br/

  bName:/bbr/
  %=cookies[i].getName()%br/

  bValue:/bbr/
  %=cookies[i].getValue()%br/

  bPath:/bbr/
  %=cookies[i].getPath()%br/

  bMaxAge:/bbr/
  %=cookies[i].getMaxAge()%br/


  %
  }
 }
 %
 /BODY
 /HTML

 The pages in the two instances are exactly the same except that
 one says SERVER ONE and the other SERVER TWO so that I can
 distinguish between the two. I believe I have setup the Context
 properly for both the instances.

 I am using Apache to do the round robin scheduling using mod_jk.


 When I hit the page and look at the message in the two tomcat
 consoles I get the following:

 first console:

 [InMemoryReplicationManager] Replicated Session created at
 org.apache.catalina.c
 luster.mcast.McastMember[tcp://172.17.1.106:4001,172.17.1.106,4001
 ] with ID=6B5C
 F3C232D4D8636D14586083E0B094
 [InMemoryReplicationManager] writeObject() storing session
 6B5CF3C232D4D8636D145
 86083E0B094
 [InMemoryReplicationManager] Replication Statistics
 Messages sent=2
 Message serialization time=31
 Average serialization time=15.5ms
 Average session send  size=805.0
 Messages received=0
 Message deserialization time=0
 Average deserialization time=NaNms
 Average message  delay  time=NaNms

 second console:
 [InMemoryReplicationManager]
 InMemoryReplicationManager.messageDataReceived(): r
 eceived message
 [InMemoryReplicationManager] Received SessionMessage of
 type=SESSION-CREATED
 [InMemoryReplicationManager] Replicated session received
 ID=6B5CF3C232D4D8636D14
 586083E0B094
 [InMemoryReplicationManager] readObject() loading session
 6B5CF3C232D4D8636D1458
 6083E0B094
 [InMemoryReplicationManager] Replicated session
 received=ReplicatedSession id=6B
 5CF3C232D4D8636D14586083E0B094
 ref=StandardSession[6B5CF3C232D4D8636D14586083E0B
 094]
 LastAccess=1056747084419

 [InMemoryReplicationManager] Replication Statistics
 Messages sent=1
 Message serialization time=16
 Average serialization time=16.0ms
 Average session send  size=491.0
 Messages received=2
 Message deserialization time=46
 Average deserialization time=23.0ms
 Average message  delay  time=15.5ms

 It seems like the first box created the session and it was
 replicated properly in the second box.

 Now when I reload the page and the request goes to the second box
 I would expect the same session id to be printed out. Instead I
 get the following output from the jsp page:

 Server: TWO
 This is a new session.
 The session id : E086477BF76F98820020F3FA7048C5E8 Cookies:
 Domain:
 null
 Name:
 JSESSIONID
 Value:
 6B5CF3C232D4D8636D14586083E0B094
 Path:
 null
 MaxAge:
 -1

 The second server did receive the right JSESSIONID
 (6B5CF3C232D4D8636D14586083E0B094) but decided to create a new
 session instead of the replicated one.

 Do you have any ideas as to why this occur?

 thanks

 Sanjeev



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only

Reg. Clustering with Tomcat

2003-03-27 Thread K. Loganathan

Dear friends,

   Can any one tell me how to implement clustering technology with Tomcat.  I 
asked help to tomcat-user list, i got some response, but i am struggled to execute 
that. Please if any one knows well, help me.

Thanks and regards

loganathan, Chennai.



-
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!

RE: Reg. Clustering with Tomcat

2003-03-27 Thread Filip Hanik
why dont you describe your problem, make sure you CC me so that I can help
you out,

it is very straight forward to and easy to set up

http://www.filip.net/tomcat-clustering.html

Filip

 -Original Message-
 From: K. Loganathan [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 27, 2003 7:04 PM
 To: [EMAIL PROTECTED]
 Subject: Reg. Clustering with Tomcat



 Dear friends,

Can any one tell me how to implement clustering
 technology with Tomcat.  I asked help to tomcat-user list, i got
 some response, but i am struggled to execute that. Please if any
 one knows well, help me.

 Thanks and regards

 loganathan, Chennai.



 -
 Do you Yahoo!?
 Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Clustering with Tomcat

2003-02-22 Thread Rifai

Hi All,

I recently read this article 
http://www.onjava.com/pub/a/onjava/2002/07/17/tomcluster.html

On Clustering using javaspaces technology.

They have provided a source code for this soluion in the 3rd page of the article.

I need to know whether anyone who tried it and got all working 

I am having few problems  configuring it.

If anyone have tried plese Reply.

Thank You

Rif


Take benefit of five before five: 
your youth before your old age, 
your health before your sickness, 
your wealth before your poverty,
your free-time before your preoccupation, 
and your life before your death.
[Muhammad sallallaahu `alayhi wa sallam - al-Haakim, al-Bayhaqee, Saheeh]



-
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, and more

Clustering with Tomcat

2002-08-16 Thread Alvaro Mota

Hi

I am reading article, Clustering Technologies - In Memory Session 
Replication with Tomcat by Filip Hanik.
I need source files http://www.filip.net/tomcat/tomcat-javagroups.jar 
and http://www.filip.net/tomcat/javagroups.jar,
but not avaliable in site. http://www.filip.net.

Do you could sent to me?

Regards
Alvaro  Mota


 


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Clustering with Tomcat

2002-07-28 Thread Luminous Heart

Here is a great article by Shyam Kumar posted on
O'Reilly onJava.com website.
http://www.onjava.com/pub/a/onjava/2002/07/17/tomcluster.html?page=1

The article comes with the needed code to implement
clustering. I hope someone would pass it to the core
development, this might move tomcat into a clustering
server by design.

Regards.

__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




How Session-Replication works when clustering Apache/Tomcat

2002-01-30 Thread lad

Hi everybody,


to distribute the load of client requests of our web application and to
guarantee reliability we have to do hardware load balancing and use two
redundant web servers.
For that we have to cluster Apache 1.3.23 with Tomcat 3.3a on our machines.

The file (sketch.txt) shows a scenario with our actual
hardware-architecture:

(2)
__\/
 webserver1 |Ap\ac/he |
| To\/mcat | - Session-ID (3)
   /|___/\_|
  //  \  ||
 /   ||
/_   ||
|  HW-   |   || (4) Session-
(1) |Balancer|   || Replication??
||   ||
\||
 \   ||
  \  \/
   \
| Apache  |
 webserber2 |  Tomcat  | - Session-ID?? (5)
|__|


Look at following scenario:

For example, if a user logs in he gets his own session ID. The hardware
load
balancer decides to forward his request to webserver1 and some information
of
this session is stored on that machine.
Then the same user sends a request again but webserver1 is not reachable
anymore
of any reasons! Of course the hardware load balancer forwards his request
to
webserver2. How that machine gets the previous session information?

  - Is it possible to configure Tomcat 3.3a in that way to do Session
Replication?
  - Is there any plugin to install for Tomcat 3.3a to guarantee this?
  - Or have I implement that for my own?


Of course I've searched in the internet to get information about it and
read
almost all newsletters on jakarta's website. But I didn't found any useful
information.



With kind regards,

Alexander Ladinig
System Architect


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




AW: How Session-Replication works when clustering Apache/Tomcat

2002-01-30 Thread Ralph Einfeldt

I know from some mails in this kist that there is work going on 
to deliver session replication for tomcat 4. Don't know the 
current state and if this will work for 3.3a.

The last message I've found:
http://mikal.org/interests/java/tomcat/archive/view?mesg=51707

 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Gesendet: Mittwoch, 30. Januar 2002 15:49
 An: [EMAIL PROTECTED]
 Betreff: How Session-Replication works when clustering Apache/Tomcat
 
 

--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]




Re: How Session-Replication works when clustering Apache/Tomcat

2002-01-30 Thread Tom Drake

Alexander:

Currently, Tomcat 4 doesn't really do session
replication. However, I've been working on a
clustering / distributed session management
solution that should work beautifully in the
the scenario you describe below.

The way it works is that all tomcats in the
cluster are given the same 'cluster multicast ip/port'
information (via server.xml). At startup time,
tomcat will discover all the session replication
(RMI) services, and obtain copies of sessions already
stored elsewhere in the cluster.

If a tc instance is required to create a new session
or update an existing session, it will, on completion
of the HttpServletRequest, persist that session to
all known session repositories in the cluster.

If a request for an 'unknown' jsession id comes to a
tc instance, it will query one of the other 'session
repositories' in the cluster, and obtain that session.
Normally, it would already have a copy of the session
because of what I described in the preceeding paragraph.

There is more to this, but this description is a fairly
accurate yet simple description.

I've completed (and tested) the multicast RMI registry
code which enables the auto-discovery of RMI services.

I've also completed (and tested) the distributed
object management code.

I've also done some of the integration work including
- a new SessionManager that performs the required
  interactions with the 'other' repositories in the cluster.
- a new Valve that notifies the new SessionManager when an
  HttpServletRequest is complete (so that it can then persist
  the new or changed session across the cluster).

But I've yet to properly integrate the session / object
repository into Tomcat such that it's lifecycle is properly
managed.

I really should have finished this all weeks ago, but I've
been pounding the pavement looking for a paying gig, as
resources are getting a bit thin around my place.

Regards,

Tom

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 30, 2002 6:48 AM
Subject: How Session-Replication works when clustering Apache/Tomcat


| Hi everybody,
|
|
| to distribute the load of client requests of our web application and to
| guarantee reliability we have to do hardware load balancing and use two
| redundant web servers.
| For that we have to cluster Apache 1.3.23 with Tomcat 3.3a on our
machines.
|
| The file (sketch.txt) shows a scenario with our actual
| hardware-architecture:
|
| (2)
| __\/
|  webserver1 |Ap\ac/he |
| | To\/mcat | - Session-ID (3)
|/|___/\_|
|   //  \  ||
|  /   ||
| /_   ||
| |  HW-   |   || (4) Session-
| (1) |Balancer|   || Replication??
| ||   ||
| \||
|  \   ||
|   \  \/
|\
| | Apache  |
|  webserber2 |  Tomcat  | - Session-ID?? (5)
| |__|
|
|
| Look at following scenario:
|
| For example, if a user logs in he gets his own session ID. The hardware
| load
| balancer decides to forward his request to webserver1 and some information
| of
| this session is stored on that machine.
| Then the same user sends a request again but webserver1 is not reachable
| anymore
| of any reasons! Of course the hardware load balancer forwards his request
| to
| webserver2. How that machine gets the previous session information?
|
|   - Is it possible to configure Tomcat 3.3a in that way to do Session
| Replication?
|   - Is there any plugin to install for Tomcat 3.3a to guarantee this?
|   - Or have I implement that for my own?
|
|
| Of course I've searched in the internet to get information about it and
| read
| almost all newsletters on jakarta's website. But I didn't found any useful
| information.
|
|
|
| With kind regards,
|
| Alexander Ladinig
| System Architect
|
|
| --
| To unsubscribe:   mailto:[EMAIL PROTECTED]
| For additional commands: mailto:[EMAIL PROTECTED]
| Troubles with the list: mailto:[EMAIL PROTECTED]
|
|
|


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]