Tomcat 6 clustering problem...rltd to context path

2008-11-14 Thread rohit aman
*I have two tomcats (tomcat 6)** setup on two separate machines. I have a
hardware load balancer with scheduling method configured to round robin.*
**
*each tomcat recognizes the other one by saying replication member added *
**
*I also made the "examples" web application (that comes with tomcat) a
cluster aware application. For this "examples" application, session
replication and everything works fine. This is how the log shows for this
application.*

2008-11-14 16:15:41.582 [main] [INFO]
org.apache.catalina.ha.session.DeltaManager - Register manager /examples to
cluster element Engine with name Catalina
2008-11-14 16:15:41.582 [main] [INFO]
org.apache.catalina.ha.session.DeltaManager - Register manager /examples to
cluster element Engine with name Catalina
2008-11-14 16:15:41.582 [main] [INFO]
org.apache.catalina.ha.session.DeltaManager - Starting clustering manager at
/examples
2008-11-14 16:15:41.582 [main] [INFO]
org.apache.catalina.ha.session.DeltaManager - Starting clustering manager at
/examples
2008-11-14 16:15:41.582 [main] [WARN]
org.apache.catalina.ha.session.DeltaManager - Manager [localhost#/examples],
requesting session state from
org.apache.catalina.tribes.membership.MemberImpl[tcp://{-64, -88, -46,
11}:4000,{-64, -88, -46, 11},4000, alive=159203,id={-68 -112 77 -71 -86 -30
77 94 -65 -9 108 56 48 -127 -101 -125 }, payload={}, command={}, domain={},
]. This operation will timeout if no session state has been received within
60 seconds.
2008-11-14 16:15:41.582 [main] [WARN]
org.apache.catalina.ha.session.DeltaManager - Manager [localhost#/examples],
requesting session state from
org.apache.catalina.tribes.membership.MemberImpl[tcp://{-64, -88, -46,
11}:4000,{-64, -88, -46, 11},4000, alive=159203,id={-68 -112 77 -71 -86 -30
77 94 -65 -9 108 56 48 -127 -101 -125 }, payload={}, command={}, domain={},
]. This operation will timeout if no session state has been received within
60 seconds.
2008-11-14 16:15:41.691 [main] [INFO]
org.apache.catalina.ha.session.DeltaManager - Manager [localhost#/examples];
session state send at 11/14/08 4:15 PM received in 109 ms.
2008-11-14 16:15:41.691 [main] [INFO]
org.apache.catalina.ha.session.DeltaManager - Manager [localhost#/examples];
session state send at 11/14/08 4:15 PM received in 109 ms.
2008-11-14 16:15:41.691 [main] [INFO]
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/examples] -
ContextListener: contextInitialized()
2008-11-14 16:15:41.691 [main] [INFO]
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/examples] -
SessionListener: contextInitialized()

*Now, I wanted to try my own application. For my own application... I want
it to be a default application for the server, so I put it in webappps/ea
directory and configured the context path as below in server.xml*



Re: Tomcat 6 clustering problem...rltd to context path

2008-11-17 Thread rohit aman
Thanks for the reply...

The app is installed on node 2 as well. But, for some reason it looks at
the context path localhost#/ea where as the app is at localhost#/  . So,
Somehow I need to tell tomcat to look at localhost#/ instead of
localhost#/ea Any input is appreciated...Thanks

On Fri, Nov 14, 2008 at 9:01 PM, Filip Hanik - Dev Lists <[EMAIL PROTECTED]
> wrote:

> you need to deploy the app on node 2 as well, it says the app is not
> installed there
>
> Filip
>
> rohit aman wrote:
>
>> *I have two tomcats (tomcat 6)** setup on two separate machines. I have a
>>
>> hardware load balancer with scheduling method configured to round robin.*
>> **
>> *each tomcat recognizes the other one by saying replication member added *
>> **
>> *I also made the "examples" web application (that comes with tomcat) a
>> cluster aware application. For this "examples" application, session
>> replication and everything works fine. This is how the log shows for this
>> application.*
>>
>> 2008-11-14 16:15:41.582 [main] [INFO]
>> org.apache.catalina.ha.session.DeltaManager - Register manager /examples
>> to
>> cluster element Engine with name Catalina
>> 2008-11-14 16:15:41.582 [main] [INFO]
>> org.apache.catalina.ha.session.DeltaManager - Register manager /examples
>> to
>> cluster element Engine with name Catalina
>> 2008-11-14 16:15:41.582 [main] [INFO]
>> org.apache.catalina.ha.session.DeltaManager - Starting clustering manager
>> at
>> /examples
>> 2008-11-14 16:15:41.582 [main] [INFO]
>> org.apache.catalina.ha.session.DeltaManager - Starting clustering manager
>> at
>> /examples
>> 2008-11-14 16:15:41.582 [main] [WARN]
>> org.apache.catalina.ha.session.DeltaManager - Manager
>> [localhost#/examples],
>> requesting session state from
>> org.apache.catalina.tribes.membership.MemberImpl[tcp://{-64, -88, -46,
>> 11}:4000,{-64, -88, -46, 11},4000, alive=159203,id={-68 -112 77 -71 -86
>> -30
>> 77 94 -65 -9 108 56 48 -127 -101 -125 }, payload={}, command={},
>> domain={},
>> ]. This operation will timeout if no session state has been received
>> within
>> 60 seconds.
>> 2008-11-14 16:15:41.582 [main] [WARN]
>> org.apache.catalina.ha.session.DeltaManager - Manager
>> [localhost#/examples],
>> requesting session state from
>> org.apache.catalina.tribes.membership.MemberImpl[tcp://{-64, -88, -46,
>> 11}:4000,{-64, -88, -46, 11},4000, alive=159203,id={-68 -112 77 -71 -86
>> -30
>> 77 94 -65 -9 108 56 48 -127 -101 -125 }, payload={}, command={},
>> domain={},
>> ]. This operation will timeout if no session state has been received
>> within
>> 60 seconds.
>> 2008-11-14 16:15:41.691 [main] [INFO]
>> org.apache.catalina.ha.session.DeltaManager - Manager
>> [localhost#/examples];
>> session state send at 11/14/08 4:15 PM received in 109 ms.
>> 2008-11-14 16:15:41.691 [main] [INFO]
>> org.apache.catalina.ha.session.DeltaManager - Manager
>> [localhost#/examples];
>> session state send at 11/14/08 4:15 PM received in 109 ms.
>> 2008-11-14 16:15:41.691 [main] [INFO]
>> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/examples]
>> -
>> ContextListener: contextInitialized()
>> 2008-11-14 16:15:41.691 [main] [INFO]
>> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/examples]
>> -
>> SessionListener: contextInitialized()
>>
>> *Now, I wanted to try my own application. For my own application... I want
>> it to be a default application for the server, so I put it in webappps/ea
>> directory and configured the context path as below in server.xml*
>>
>> >   docBase="ea"
>>   className="org.apache.catalina.core.StandardContext"
>>cachingAllowed="true" ...
>>
>> *Session replication is not working for this application and the log says*
>>
>> 2008-11-14 16:15:43.581 [main] [INFO]
>> org.apache.catalina.ha.session.DeltaManager - Register manager /ea to
>> cluster element Engine with name Catalina
>> 2008-11-14 16:15:43.581 [main] [INFO]
>> org.apache.catalina.ha.session.DeltaManager - Register manager /ea to
>> cluster element Engine with name Catalina
>> 2008-11-14 16:15:43.581 [main] [INFO]
>> org.apache.catalina.ha.session.DeltaManager - Starting clustering manager
>> at
>> /ea
>> 2008-11-14 16:15:43.581 [main] [INFO]
>> org.apache.catalina.ha.session.DeltaManager - Starting clustering manager
>> at
>> /e

tomcat 6 clustering issue

2008-11-20 Thread rohit aman
Hi,

   I have a tomcat cluster ( with tomcat 1 and tomcat 2 ) with a hardware
load balancer infront. Session replication only works in some scenario and
does not in others. Here is the scenario where it works...

1) Start tomcat 1
2) access the web application ( session gets created in tomcat 1 )
3) Start tomcat 2 ( session gets replicated onto tomcat 2  )
4) kill tomcat 1
5) access the web application ( works fine )

N here is the scenario where it does not work

1) Start tomcat 1
2) Start tomcat 2
3) create atleast once session on tomcat 1 and tomcat 2 by accessing the
web application
4) kill any tomcat..  lets say tomcat 1
5) try to access the session that got created in tomcat1 ( logs out from
the we application...session attributes are lost )
and also gives the below warning on tomcat 1

Tribes-MembershipReceiver] [WARN]
org.apache.catalina.tribes.membership.McastService - Error receiving mcast
package. Sleeping 500ms
java.net.SocketException: socket closed
 at java.net.PlainDatagramSocketImpl.receive0(Native Method)
 at
java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:136)
 at java.net.DatagramSocket.receive(DatagramSocket.java:712)
 at
org.apache.catalina.tribes.membership.McastServiceImpl.receive(McastServiceImpl.java:314)
 at
org.apache.catalina.tribes.membership.McastServiceImpl$ReceiverThread.run(McastServiceImpl.java:414)
2008-11-20 17:08:29.999 [Tribes-MembershipReceiver] [WARN]
org.apache.catalina.tribes.membership.McastService - Error receiving mcast
package. Sleeping 500ms
java.net.SocketException: socket closed
 at java.net.PlainDatagramSocketImpl.receive0(Native Method)
 at
java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:136)
 at java.net.DatagramSocket.receive(DatagramSocket.java:712)
 at
org.apache.catalina.tribes.membership.McastServiceImpl.receive(McastServiceImpl.java:314)
 at
org.apache.catalina.tribes.membership.McastServiceImpl$ReceiverThread.run(McastServiceImpl.java:414)
2008-11-20 17:08:29.999 [main] [INFO]
org.apache.coyote.http11.Http11Protocol - Stopping Coyote HTTP/1.1 on
http-8080

I have my logs configured to debug level and all the messages I see from
tribes show that the session is being replicated successfully. Please let me
know if any of those logs are needed for better understanding.

I am also monitoring tomcats with JConsole and it shows that the sessions
are getting replicated.

Thanks for your help

Rohit


Re: tomcat 6 clustering issue

2008-11-21 Thread rohit aman
Ya... I got that message when I stopped the tomcat ( it shuts down with a
warning )

4th step in below is the scenario is where I got that warning

  1) Start tomcat 1
   2) Start tomcat 2
   3) create atleast once session on tomcat 1 and tomcat 2 by accessing the
web application
   4) kill any tomcat..  lets say tomcat 1
   5) try to access the session that got created in tomcat1 ( logs out from
the we application...session attributes are lost )
and also gives the below warning on tomcat 1

Tribes-MembershipReceiver] [WARN]
org.apache.catalina.tribes.membership.McastService - Error receiving mcast
package. Sleeping 500ms
java.net.SocketException: socket closed
 at java.net.PlainDatagramSocketImpl.receive0(Native Method)
 at
java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:136)
 at java.net.DatagramSocket.receive(DatagramSocket.java:712)
 at
org.apache.catalina.tribes.membership.McastServiceImpl.receive(McastServiceImpl.java:314)
 at
org.apache.catalina.tribes.membership.McastServiceImpl$ReceiverThread.run(McastServiceImpl.java:414)
2008-11-20 17:08:29.999 [Tribes-MembershipReceiver] [WARN]
org.apache.catalina.tribes.membership.McastService - Error receiving mcast
package. Sleeping 500ms
java.net.SocketException: socket closed
 at java.net.PlainDatagramSocketImpl.receive0(Native Method)
 at
java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:136)
 at java.net.DatagramSocket.receive(DatagramSocket.java:712)
 at
org.apache.catalina.tribes.membership.McastServiceImpl.receive(McastServiceImpl.java:314)
 at
org.apache.catalina.tribes.membership.McastServiceImpl$ReceiverThread.run(McastServiceImpl.java:414)
2008-11-20 17:08:29.999 [main] [INFO]
org.apache.coyote.http11.Http11Protocol - Stopping Coyote HTTP/1.1 on
http-8080

Any Idea Why I am not able to access tomcat 1 ( stopped with warning )
session from tomcat 2...

Thanks for your help
Rohit

p.s.  session replication is working fine in the below scenario

1) Start tomcat 1
   2) access the web application ( session gets created in tomcat 1 )
   3) Start tomcat 2 ( session gets replicated onto tomcat 2  )
   4) kill tomcat 1
   5) access the web application ( works fine )









On Thu, Nov 20, 2008 at 10:15 PM, Filip Hanik - Dev Lists <
[EMAIL PROTECTED]> wrote:

> this message
>
> 2008-11-20 17:08:29.999 [main] [INFO]
> org.apache.coyote.http11.Http11Protocol - Stopping Coyote HTTP/1.1 on
> http-8080
>
> tells us that you stopped the tomcat instance
>
> Filip
>
>
>
>
> rohit aman wrote:
>
>> Hi,
>>
>>   I have a tomcat cluster ( with tomcat 1 and tomcat 2 ) with a hardware
>> load balancer infront. Session replication only works in some scenario and
>> does not in others. Here is the scenario where it works...
>>
>>1) Start tomcat 1
>>2) access the web application ( session gets created in tomcat 1 )
>>3) Start tomcat 2 ( session gets replicated onto tomcat 2  )
>>4) kill tomcat 1
>>5) access the web application ( works fine )
>>
>> N here is the scenario where it does not work
>>
>>1) Start tomcat 1
>>2) Start tomcat 2
>>3) create atleast once session on tomcat 1 and tomcat 2 by accessing
>> the
>> web application
>>4) kill any tomcat..  lets say tomcat 1
>>5) try to access the session that got created in tomcat1 ( logs out
>> from
>> the we application...session attributes are lost )
>> and also gives the below warning on tomcat 1
>>
>> Tribes-MembershipReceiver] [WARN]
>> org.apache.catalina.tribes.membership.McastService - Error receiving mcast
>> package. Sleeping 500ms
>> java.net.SocketException: socket closed
>>  at java.net.PlainDatagramSocketImpl.receive0(Native Method)
>>  at
>> java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:136)
>>  at java.net.DatagramSocket.receive(DatagramSocket.java:712)
>>  at
>>
>> org.apache.catalina.tribes.membership.McastServiceImpl.receive(McastServiceImpl.java:314)
>>  at
>>
>> org.apache.catalina.tribes.membership.McastServiceImpl$ReceiverThread.run(McastServiceImpl.java:414)
>> 2008-11-20 17:08:29.999 [Tribes-MembershipReceiver] [WARN]
>> org.apache.catalina.tribes.membership.McastService - Error receiving mcast
>> package. Sleeping 500ms
>> java.net.SocketException: socket closed
>>  at java.net.PlainDatagramSocketImpl.receive0(Native Method)
>>  at
>> java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:136)
>>  at java.net.DatagramSocket.receive(DatagramSocket.java:712)
>>  at
>>
>> org.apache.catalina.tribes.membership.McastServiceImpl.receive(McastServiceImpl.java:314)
>>  at
>>
>> org.apache.catalina.tribes.membership.

tomcat 6.0.18 clustering issue

2008-11-21 Thread rohit aman
Hi guys...I had setup tomcat cluster with 2 nodes. cluster has hardware load
balancer with sticky sessions configuration... All the log messages and
everything say that the session is being replicated but when one server
fails over the other server is kicking out the user

here is my server.xml cluster configuration ( do we need jvmroute attribute
for hardware load balancer?.)

Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
 channelSendOptions="8">
  
  



  




   
  
  
  
  


*Log from node1 ( this log shows the log for starting the node, creating a
session in it, and stopping it later)*

2008-11-21 14:38:46.671 [main] [INFO]
org.apache.catalina.ha.tcp.SimpleTcpCluster - Cluster is about to start
2008-11-21 14:38:46.702 [main] [INFO]
org.apache.catalina.tribes.transport.ReceiverBase - Receiver Server Socket
bound to:/192.168.210.6:4000
2008-11-21 14:38:46.717 [main] [INFO]
org.apache.catalina.tribes.membership.McastService - Setting cluster mcast
soTimeout to 500
2008-11-21 14:38:46.717 [main] [INFO]
org.apache.catalina.tribes.membership.McastService - Sleeping for 1000
milliseconds to establish cluster membership, start level:4
2008-11-21 14:38:47.717 [main] [INFO]
org.apache.catalina.tribes.membership.McastService - Done sleeping,
membership established, start level:4
2008-11-21 14:38:47.717 [main] [INFO]
org.apache.catalina.tribes.membership.McastService - Sleeping for 1000
milliseconds to establish cluster membership, start level:8
2008-11-21 14:38:48.717 [main] [INFO]
org.apache.catalina.tribes.membership.McastService - Done sleeping,
membership established, start level:8
2008-11-21 14:38:51.092 [main] [INFO]
org.apache.catalina.ha.session.DeltaManager - Register manager /wa to
cluster element Engine with name Catalina
2008-11-21 14:38:51.092 [main] [INFO]
org.apache.catalina.ha.session.DeltaManager - Starting clustering manager at
/wa
2008-11-21 14:38:51.092 [main] [INFO]
org.apache.catalina.ha.session.DeltaManager - Manager [localhost#/wa]:
skipping state transfer. No members active in cluster group.
2008-11-21 14:38:56.372 [main] [INFO]
org.apache.catalina.ha.session.DeltaManager - Register manager /examples to
cluster element Engine with name Catalina
2008-11-21 14:38:56.372 [main] [INFO]
org.apache.catalina.ha.session.DeltaManager - Starting clustering manager at
/examples
2008-11-21 14:38:56.372 [main] [INFO]
org.apache.catalina.ha.session.DeltaManager - Manager [localhost#/examples]:
skipping state transfer. No members active in cluster group.
2008-11-21 14:38:56.497 [main] [INFO]
org.apache.catalina.ha.session.JvmRouteBinderValve - JvmRouteBinderValve
started
2008-11-21 14:39:05.418 [pool-2-thread-1] [INFO]
org.apache.catalina.tribes.io.BufferPool - Created a buffer pool with max
size:104857600 bytes of type:org.apache.catalina.tribes.io.BufferPool15Impl
2008-11-21 14:39:06.277 [Thread-11] [INFO]
org.apache.catalina.ha.tcp.SimpleTcpCluster - Replication member
added:org.apache.catalina.tribes.membership.MemberImpl[tcp://{-64, -88, -46,
11}:4000,{-64, -88, -46, 11},4000, alive=1000,id={42 -64 13 -75 79 -88 79
-56 -79 -54 14 16 29 77 -20 -50 }, payload={}, command={}, domain={}, ]
2008-11-21 14:39:09.683 [pool-1-thread-2] [INFO]
org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor -
ThroughputInterceptor Report[
 Tx Msg:2 messages
 Sent:0.00 MB (total)
 Sent:0.00 MB (application)
 Time:0.02 seconds
 Tx Speed:0.07 MB/sec (total)
 TxSpeed:0.07 MB/sec (application)
 Error Msg:0
 Rx Msg:2 messages
 Rx Speed:0.00 MB/sec (since 1st msg)
 Received:0.00 MB]
2008-11-21 14:41:00.978 [main] [INFO]
org.apache.catalina.ha.session.JvmRouteBinderValve - JvmRouteBinderValve
stopped
2008-11-21 14:41:00.978 [main] [INFO]
org.apache.catalina.ha.session.DeltaManager - Manager [localhost#/examples]
expiring sessions upon shutdown
2008-11-21 14:41:01.025 [main] [INFO]
org.apache.catalina.ha.session.DeltaManager - Manager [localhost#/wa]
expiring sessions upon shutdown
2008-11-21 14:41:02.103 [Tribes-MembershipReceiver] [WARN]
org.apache.catalina.tribes.membership.McastService - *Error receiving mcast
package*. Sleeping 500ms
java.net.SocketException: socket closed
 at java.net.PlainDatagramSocketImpl.receive0(Native Method)
 at
java.net.PlainDatagramSocketImpl.receive(PlainDatagramSocketImpl.java:136)
 at java.net.DatagramSocket.receive(DatagramSocket.java:712)
 at
org.apache.catalina.tribes.membership.McastServiceImpl.receive(McastServiceImpl.java:314)
 at
org.apache.catalina.tribes.membership.McastServiceImpl$ReceiverThread.run(McastServiceImpl.java:414)

*Log from node 2 ( this log shows starting this node and thereafter )*

2008-11-21 14:39:06.040 [main] [INFO]
org.apache.catalina.ha.tcp.SimpleTcpCluster - Cluster is about to start
2008-11-21 14:39:06.071 [main] [INFO]
org.apache.catalina.tribes.transport.R

tomcat 6.0.18 clustering.. session getting replicated partially

2008-11-24 Thread rohit aman
Hi,

   I had setup a tomcat cluster with two nodes. followed the instructions
from "tomcat 6 clustering how to" document. I created a sample
application to test out my cluster.  This application has a cart where u can
add items.

now, the problem is, not all session variables are getting replicated. below
is the scenario..

1)start tomcat 1
2)access the cart add items to it ( lets say added 5 items )
3)start tomcat 2
4)add some more items ( 3 more...so totally 8) ( this is done using tomcat 1
again because my LB is configured for sticky sessions)
5)stop tomcat 1
6)access the cart (now the request goes to tomcat 2)...here *I can only see
the first 5 items where as it should be 8. *So, the next three did not get
replicated.

whichever session or session attribute gets created when both nodes are
running is not getting replicated for some reason.

I am monitoring both nodes with Jconsole. In Jconsole the number of session
for the application =  sessions in node 1 + sessions in node 2. So, this
says that sessions are being replicated. But, I am not sure why I am not
able to access all sessions/sessionAttributes.

Any help is very much appreciated.

Thanks
Rohit


Re: tomcat 6.0.18 clustering.. session getting replicated partially

2008-11-25 Thread rohit aman
Hi Filip,

   All I did was to modify sessions application that comes with tomcat. It's
just two simple changes shown below.

   1) Replace the DummCart.class in
\apache-tomcat-6.0.18\webapps\examples\WEB-INF\classes\sessions
with the attached one.
   2)mark the web.xml in
\apache-tomcat-6.0.18\webapps\examples\WEB-INF as distributable
by adding  tag
   3)then access this by using
https://localhost/examples/jsp/sessions/carts.jsp

Please let me know...Thanks for doing this
Rohit

On Mon, Nov 24, 2008 at 6:55 PM, Filip Hanik - Dev Lists <[EMAIL PROTECTED]
> wrote:

> post a sample app, and we can test it out
>
> Filip
>
>
> rohit aman wrote:
>
>> Hi,
>>
>>   I had setup a tomcat cluster with two nodes. followed the instructions
>> from "tomcat 6 clustering how to" document. I created a sample
>> application to test out my cluster.  This application has a cart where u
>> can
>> add items.
>>
>> now, the problem is, not all session variables are getting replicated.
>> below
>> is the scenario..
>>
>> 1)start tomcat 1
>> 2)access the cart add items to it ( lets say added 5 items )
>> 3)start tomcat 2
>> 4)add some more items ( 3 more...so totally 8) ( this is done using tomcat
>> 1
>> again because my LB is configured for sticky sessions)
>> 5)stop tomcat 1
>> 6)access the cart (now the request goes to tomcat 2)...here *I can only
>> see
>> the first 5 items where as it should be 8. *So, the next three did not get
>> replicated.
>>
>> whichever session or session attribute gets created when both nodes are
>> running is not getting replicated for some reason.
>>
>> I am monitoring both nodes with Jconsole. In Jconsole the number of
>> session
>> for the application =  sessions in node 1 + sessions in node 2. So, this
>> says that sessions are being replicated. But, I am not sure why I am not
>> able to access all sessions/sessionAttributes.
>>
>> Any help is very much appreciated.
>>
>> Thanks
>> Rohit
>>
>>
>>
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: tomcat 6.0.18 clustering.. session getting replicated partially

2008-11-25 Thread rohit aman
Hi Bhoosan,

   I am using sticky session setup at LB. What do you mean by "use
replicated sessions"? I dont have that kind of configuration setup at my LB.


As far as I know, whatever the configuration at LB is, when cluster
configuration (in server.xml) is correct, session replication should be done
no matter what the LB is setup for.

Thanks
Rohit

On Mon, Nov 24, 2008 at 11:08 PM, Bhooshan Pandit <[EMAIL PROTECTED]>wrote:

> Why don't you use replicated sessions? I believe with sticky sessions the
> session data does not get copied over to other servers in the LB setup, with
> replicated session it does.
>
> -Original Message-
> From: rohit aman <[EMAIL PROTECTED]>
> To: Tomcat Users List 
> Sent: Tue, 25 Nov 2008 6:57 am
> Subject: tomcat 6.0.18 clustering.. session getting replicated partially
>
>
>
>
>
>
>
>
> Hi,
>
>   I had setup a tomcat cluster with two nodes. followed the instructions
> from "tomcat 6 clustering how to" document. I created a sample
> application to test out my cluster.  This application has a cart where u
> can
> add items.
>
> now, the problem is, not all session variables are getting replicated.
> below
> is the scenario..
>
> 1)start tomcat 1
> 2)access the cart add items to it ( lets say added 5 items )
> 3)start tomcat 2
> 4)add some more items ( 3 more...so totally 8) ( this is done using tomcat
> 1
> again because my LB is configured for sticky sessions)
> 5)stop tomcat 1
> 6)access the cart (now the request goes to tomcat 2)...here *I can only see
> the first 5 items where as it should be 8. *So, the next three did not get
> replicated.
>
> whichever session or session attribute gets created when both nodes are
> running is not getting replicated for some reason.
>
> I am monitoring both nodes with Jconsole. In Jconsole the number of session
> for the application =  sessions in node 1 + sessions in node 2. So, this
> says that sessions are being replicated. But, I am not sure why I am not
> able to access all sessions/sessionAttributes.
>
> Any help is very much appreciated.
>
> Thanks
> Rohit
>
>
>
>
>
>
>
>
>
> 
> You are invited to Get a Free AOL Email ID. - http://webmail.aol.in
>


Re: tomcat 6.0.18 clustering.. session getting replicated partially

2008-11-25 Thread rohit aman
Hey Filip,

sorry abt that. here is the example web application zip file:
http://www.yousendit.com/download/TTZuRFFhbEo5eFh2Wmc9PQ

please unzip it, put it in your webapps directory, then you should be able
to access the cart using
https:///clusterex/sessions/carts.jsp<https://%3chostname%3e/clusterex/sessions/carts.jsp>


juss FYI...this is how u can reproduce it
1) set the LB for sticky sessions
2) start tomcat1
3) access the cart and add some items (lets say 6 items)
4) now start tomcat2
5) add some more items ( lets say 3 more...so total items would be 6+3=9)
(here request still goes to tomcat 1 because of sticky sessions setup)
6) stop tomcat1
7) add some more items (now request goes to tomcat2, here we can see that
the new item gets added as 7th item to the first 6 items and the 3 items we
added later can not be seen)

Thanks for the help
rohit

On Tue, Nov 25, 2008 at 10:20 AM, Filip Hanik - Dev Lists <
[EMAIL PROTECTED]> wrote:

> you're attachment didn't go through, just post a complete example somewhere
> on the web.
> for free support, you can't expect the other guy (me in this case) to have
> to spend time setting up to replicate your environment
> instead, you do the legwork, and you get help for free, not a bad trade if
> you ask me
> Filip
>
> rohit aman wrote:
>
>> Hi Filip,
>> All I did was to modify sessions application that comes with tomcat.
>> It's just two simple changes shown below.
>>
>>   1) Replace the DummCart.class in
>> \apache-tomcat-6.0.18\webapps\examples\WEB-INF\classes\sessions
>> with the attached one.
>>   2)mark the web.xml in
>> \apache-tomcat-6.0.18\webapps\examples\WEB-INF as distributable
>> by adding  tag
>>   3)then access this by using
>> https://localhost/examples/jsp/sessions/carts.jsp
>>
>> Please let me know...Thanks for doing this
>> Rohit
>>
>>  On Mon, Nov 24, 2008 at 6:55 PM, Filip Hanik - Dev Lists <
>> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:
>>
>>post a sample app, and we can test it out
>>
>>Filip
>>
>>
>>rohit aman wrote:
>>
>>Hi,
>>
>>  I had setup a tomcat cluster with two nodes. followed the
>>instructions
>>from "tomcat 6 clustering how to" document. I created a sample
>>application to test out my cluster.  This application has a
>>cart where u can
>>add items.
>>
>>now, the problem is, not all session variables are getting
>>replicated. below
>>is the scenario..
>>
>>1)start tomcat 1
>>2)access the cart add items to it ( lets say added 5 items )
>>3)start tomcat 2
>>4)add some more items ( 3 more...so totally 8) ( this is done
>>using tomcat 1
>>again because my LB is configured for sticky sessions)
>>5)stop tomcat 1
>>6)access the cart (now the request goes to tomcat 2)...here *I
>>can only see
>>the first 5 items where as it should be 8. *So, the next three
>>did not get
>>replicated.
>>
>>whichever session or session attribute gets created when both
>>nodes are
>>running is not getting replicated for some reason.
>>
>>I am monitoring both nodes with Jconsole. In Jconsole the
>>number of session
>>for the application =  sessions in node 1 + sessions in node
>>2. So, this
>>says that sessions are being replicated. But, I am not sure
>>why I am not
>>able to access all sessions/sessionAttributes.
>>
>>Any help is very much appreciated.
>>
>>Thanks
>>Rohit
>>
>>
>>
>>
>>-
>>To start a new topic, e-mail: users@tomcat.apache.org
>><mailto:users@tomcat.apache.org>
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>><mailto:[EMAIL PROTECTED]>
>>For additional commands, e-mail: [EMAIL PROTECTED]
>><mailto:[EMAIL PROTECTED]>
>>
>>
>> 
>>
>> -
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
>
> -
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


tomcat 6 delta manager dirtyFlag

2008-12-16 Thread rohit aman
Hi,

   I have tomcat cluster setup and it's working fine. All I need to do now
is to replicate the session after every request. For
SimpleTcpReplicationManager
we
can use useDirtyFlag. But, is there a way to do it with DeltaManger?

So, I guess the question is, to replicate the session after each request,
with DeltaManager (for tomcat 6), what flag needs to be set?

Thanks for the help
Rohit


Re: tomcat 6 delta manager dirtyFlag

2008-12-17 Thread rohit aman
Thanks Filip...

On Tue, Dec 16, 2008 at 8:35 PM, Filip Hanik - Dev Lists  wrote:

> rohit aman wrote:
>
>> Hi,
>>
>>   I have tomcat cluster setup and it's working fine. All I need to do now
>> is to replicate the session after every request. For
>> SimpleTcpReplicationManager<
>> http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/cluster/session/SimpleTcpReplicationManager.html>
>>
>> we
>> can use useDirtyFlag. But, is there a way to do it with DeltaManger?
>>
>> So, I guess the question is, to replicate the session after each request,
>> with DeltaManager (for tomcat 6), what flag needs to be set?
>>
>>
> Its not possible, DeltaManager replicates delta's only.
> However, you can easily achieve the same thing by writing a filter that
> creates the delta for you
>
> pseudo code for your filter
>
> 1. extract all attribute names from the session
> 2. for each attribute name
> 3. decide if you want it replicated
> 4. if yes, get the attribute and set it again
>
> Filip
>
> Thanks for the help
>> Rohit
>>
>>
>>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>