You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Andrew Hole <an...@gmail.com> on 2007/09/27 16:21:27 UTC

Session Replication

Hello everyone!

For using Tomcat session clustering I need to put the following
component in all nodes?

<Cluster
className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
                                       doClusterLog="true"
                                     clusterLogName="clusterlog"

manager.className="org.apache.catalina.cluster.session.DeltaManager"
                   manager.expireSessionsOnShutdown="false"
               manager.notifyListenersOnReplication="false"
        manager.notifySessionListenersOnReplication="false"
                            manager.sendAllSessions="false"
                        manager.sendAllSessionsSize="500"
                    manager.sendAllSessionsWaitTime="20">
                  <Membership

className="org.apache.catalina.cluster.mcast.McastService"
                                          mcastAddr="228.0.0.4"
                                   mcastBindAddress="127.0.0.1"
                                 mcastClusterDomain="d10"
                                          mcastPort="45564"
                                     mcastFrequency="1000"
                                      mcastDropTime="30000"
									recoveryCounter="10"
                                    recoveryEnabled="true"
                                  recoverySleepTime="5000"/>
                  <Receiver

className="org.apache.catalina.cluster.tcp.ReplicationListener"
                                    tcpListenAddress="auto"
                                       tcpListenPort="9016"
                                  tcpSelectorTimeout="100"
                                      tcpThreadCount="6"/>
                  <Sender

className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
                                     replicationMode="fastasyncqueue"
                                      recoverTimeout="5000"
                                      recoverCounter="6"
                        doTransmitterProcessingStats="true"
                                   doProcessingStats="true"
                                      doWaitAckStats="true"
                                       queueTimeWait="true"
                                        queueDoStats="true"
                                      queueCheckLock="true"
                                          ackTimeout="15000"
                                          waitForAck="true"
                                    keepAliveTimeout="80000"
                            keepAliveMaxRequestCount="-1"/>
                  <Valve
className="org.apache.catalina.cluster.tcp.ReplicationValve"

filter=".*\.gif;.*\.js;.*\.css;.*\.png;.*\.jpeg;.*\.jpg;.*\.htm;.*\.html;.*\.txt;"
                                    primaryIndicator="true" />
                  <Valve
className="org.apache.catalina.cluster.session.JvmRouteBinderValve"
                                             enabled="true" />	
                  <ClusterListener
className="org.apache.catalina.cluster.session.ClusterSessionListener"
/>
                  <ClusterListener
className="org.apache.catalina.cluster.session.JvmRouteSessionIDBinderListener"
/>
                  <Deployer
className="org.apache.catalina.cluster.deploy.FarmWarDeployer"
                                            tempDir="${catalina.base}/war-temp"

deployDir="${catalina.base}/war-deploy/"

watchDir="${catalina.base}/war-listen/"
                                       watchEnabled="true"/>
                  </Cluster>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Session Replication

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
bit confused on what you are trying to achieve

Filip

Andrew Hole wrote:
> Thanks.
>
> Exists some layer to replicate database sessions? If my application is
> connected to an instance that crasches, every sessions dies. I would
> like to obtain response from the other database instance when this
> happens.
> Thanks
>
> On 9/27/07, Filip Hanik - Dev Lists <de...@hanik.com> wrote:
>   
>> then, the tcpListenPort must be unique for each instance, since you
>> cannot share the port
>>
>> Filip
>>
>> Andrew Hole wrote:
>>     
>>> I only have one machine to test Session Replication. Every tomcat
>>> instances are in same machine.
>>>
>>> On 9/27/07, Caldarale, Charles R <Ch...@unisys.com> wrote:
>>>
>>>       
>>>>> From: Filip Hanik - Dev Lists [mailto:devlists@hanik.com]
>>>>> Subject: Re: Session Replication
>>>>>
>>>>> yeah, but if you bind to 127.0.0.1 how do you expect
>>>>> clustering to work between nodes? :)
>>>>>
>>>>>           
>>>> Well, you could run all the Tomcat instances on the same box.  What's
>>>> that saying about eggs and baskets?
>>>>
>>>>  - Chuck
>>>>
>>>>
>>>> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
>>>> MATERIAL and is thus for use only by the intended recipient. If you
>>>> received this in error, please contact the sender and delete the e-mail
>>>> and its attachments from all computers.
>>>>
>>>> ---------------------------------------------------------------------
>>>> To start a new topic, e-mail: users@tomcat.apache.org
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>>
>>>>
>>>>         
>>> ---------------------------------------------------------------------
>>> To start a new topic, e-mail: users@tomcat.apache.org
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
>>>
>>>       
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>     
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>   


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Session Replication

Posted by Andrew Hole <an...@gmail.com>.
Thanks.

Exists some layer to replicate database sessions? If my application is
connected to an instance that crasches, every sessions dies. I would
like to obtain response from the other database instance when this
happens.
Thanks

On 9/27/07, Filip Hanik - Dev Lists <de...@hanik.com> wrote:
> then, the tcpListenPort must be unique for each instance, since you
> cannot share the port
>
> Filip
>
> Andrew Hole wrote:
> > I only have one machine to test Session Replication. Every tomcat
> > instances are in same machine.
> >
> > On 9/27/07, Caldarale, Charles R <Ch...@unisys.com> wrote:
> >
> >>> From: Filip Hanik - Dev Lists [mailto:devlists@hanik.com]
> >>> Subject: Re: Session Replication
> >>>
> >>> yeah, but if you bind to 127.0.0.1 how do you expect
> >>> clustering to work between nodes? :)
> >>>
> >> Well, you could run all the Tomcat instances on the same box.  What's
> >> that saying about eggs and baskets?
> >>
> >>  - Chuck
> >>
> >>
> >> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> >> MATERIAL and is thus for use only by the intended recipient. If you
> >> received this in error, please contact the sender and delete the e-mail
> >> and its attachments from all computers.
> >>
> >> ---------------------------------------------------------------------
> >> To start a new topic, e-mail: users@tomcat.apache.org
> >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >> For additional commands, e-mail: users-help@tomcat.apache.org
> >>
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Session Replication

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
then, the tcpListenPort must be unique for each instance, since you 
cannot share the port

Filip

Andrew Hole wrote:
> I only have one machine to test Session Replication. Every tomcat
> instances are in same machine.
>
> On 9/27/07, Caldarale, Charles R <Ch...@unisys.com> wrote:
>   
>>> From: Filip Hanik - Dev Lists [mailto:devlists@hanik.com]
>>> Subject: Re: Session Replication
>>>
>>> yeah, but if you bind to 127.0.0.1 how do you expect
>>> clustering to work between nodes? :)
>>>       
>> Well, you could run all the Tomcat instances on the same box.  What's
>> that saying about eggs and baskets?
>>
>>  - Chuck
>>
>>
>> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
>> MATERIAL and is thus for use only by the intended recipient. If you
>> received this in error, please contact the sender and delete the e-mail
>> and its attachments from all computers.
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>     
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>   


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Session Replication

Posted by Andrew Hole <an...@gmail.com>.
I only have one machine to test Session Replication. Every tomcat
instances are in same machine.

On 9/27/07, Caldarale, Charles R <Ch...@unisys.com> wrote:
> > From: Filip Hanik - Dev Lists [mailto:devlists@hanik.com]
> > Subject: Re: Session Replication
> >
> > yeah, but if you bind to 127.0.0.1 how do you expect
> > clustering to work between nodes? :)
>
> Well, you could run all the Tomcat instances on the same box.  What's
> that saying about eggs and baskets?
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Session Replication

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Filip Hanik - Dev Lists [mailto:devlists@hanik.com] 
> Subject: Re: Session Replication
> 
> yeah, but if you bind to 127.0.0.1 how do you expect 
> clustering to work between nodes? :)

Well, you could run all the Tomcat instances on the same box.  What's
that saying about eggs and baskets?

 - Chuck


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

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Session Replication

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
yeah, but if you bind to 127.0.0.1 how do you expect clustering to work 
between nodes? :)

Filip

Andrew Hole wrote:
> Hello everyone!
>
> For using Tomcat session clustering I need to put the following
> component in all nodes?
>
> <Cluster
> className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
>                                        doClusterLog="true"
>                                      clusterLogName="clusterlog"
>
> manager.className="org.apache.catalina.cluster.session.DeltaManager"
>                    manager.expireSessionsOnShutdown="false"
>                manager.notifyListenersOnReplication="false"
>         manager.notifySessionListenersOnReplication="false"
>                             manager.sendAllSessions="false"
>                         manager.sendAllSessionsSize="500"
>                     manager.sendAllSessionsWaitTime="20">
>                   <Membership
>
> className="org.apache.catalina.cluster.mcast.McastService"
>                                           mcastAddr="228.0.0.4"
>                                    mcastBindAddress="127.0.0.1"
>                                  mcastClusterDomain="d10"
>                                           mcastPort="45564"
>                                      mcastFrequency="1000"
>                                       mcastDropTime="30000"
> 									recoveryCounter="10"
>                                     recoveryEnabled="true"
>                                   recoverySleepTime="5000"/>
>                   <Receiver
>
> className="org.apache.catalina.cluster.tcp.ReplicationListener"
>                                     tcpListenAddress="auto"
>                                        tcpListenPort="9016"
>                                   tcpSelectorTimeout="100"
>                                       tcpThreadCount="6"/>
>                   <Sender
>
> className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
>                                      replicationMode="fastasyncqueue"
>                                       recoverTimeout="5000"
>                                       recoverCounter="6"
>                         doTransmitterProcessingStats="true"
>                                    doProcessingStats="true"
>                                       doWaitAckStats="true"
>                                        queueTimeWait="true"
>                                         queueDoStats="true"
>                                       queueCheckLock="true"
>                                           ackTimeout="15000"
>                                           waitForAck="true"
>                                     keepAliveTimeout="80000"
>                             keepAliveMaxRequestCount="-1"/>
>                   <Valve
> className="org.apache.catalina.cluster.tcp.ReplicationValve"
>
> filter=".*\.gif;.*\.js;.*\.css;.*\.png;.*\.jpeg;.*\.jpg;.*\.htm;.*\.html;.*\.txt;"
>                                     primaryIndicator="true" />
>                   <Valve
> className="org.apache.catalina.cluster.session.JvmRouteBinderValve"
>                                              enabled="true" />	
>                   <ClusterListener
> className="org.apache.catalina.cluster.session.ClusterSessionListener"
> />
>                   <ClusterListener
> className="org.apache.catalina.cluster.session.JvmRouteSessionIDBinderListener"
> />
>                   <Deployer
> className="org.apache.catalina.cluster.deploy.FarmWarDeployer"
>                                             tempDir="${catalina.base}/war-temp"
>
> deployDir="${catalina.base}/war-deploy/"
>
> watchDir="${catalina.base}/war-listen/"
>                                        watchEnabled="true"/>
>                   </Cluster>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>   


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Session Replication

Posted by Pid <p...@pidster.com>.
Andrew Hole wrote:
> Hello everyone!
> 
> For using Tomcat session clustering I need to put the following
> component in all nodes?

Yes, obviously.  Any node without a cluster definition won't know that
it's supposed to be in a cluster without it...

I don't suppose you've read the docs on clustering, at all?

p



> <Cluster
> className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
>                                        doClusterLog="true"
>                                      clusterLogName="clusterlog"
> 
> manager.className="org.apache.catalina.cluster.session.DeltaManager"
>                    manager.expireSessionsOnShutdown="false"
>                manager.notifyListenersOnReplication="false"
>         manager.notifySessionListenersOnReplication="false"
>                             manager.sendAllSessions="false"
>                         manager.sendAllSessionsSize="500"
>                     manager.sendAllSessionsWaitTime="20">
>                   <Membership
> 
> className="org.apache.catalina.cluster.mcast.McastService"
>                                           mcastAddr="228.0.0.4"
>                                    mcastBindAddress="127.0.0.1"
>                                  mcastClusterDomain="d10"
>                                           mcastPort="45564"
>                                      mcastFrequency="1000"
>                                       mcastDropTime="30000"
> 									recoveryCounter="10"
>                                     recoveryEnabled="true"
>                                   recoverySleepTime="5000"/>
>                   <Receiver
> 
> className="org.apache.catalina.cluster.tcp.ReplicationListener"
>                                     tcpListenAddress="auto"
>                                        tcpListenPort="9016"
>                                   tcpSelectorTimeout="100"
>                                       tcpThreadCount="6"/>
>                   <Sender
> 
> className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
>                                      replicationMode="fastasyncqueue"
>                                       recoverTimeout="5000"
>                                       recoverCounter="6"
>                         doTransmitterProcessingStats="true"
>                                    doProcessingStats="true"
>                                       doWaitAckStats="true"
>                                        queueTimeWait="true"
>                                         queueDoStats="true"
>                                       queueCheckLock="true"
>                                           ackTimeout="15000"
>                                           waitForAck="true"
>                                     keepAliveTimeout="80000"
>                             keepAliveMaxRequestCount="-1"/>
>                   <Valve
> className="org.apache.catalina.cluster.tcp.ReplicationValve"
> 
> filter=".*\.gif;.*\.js;.*\.css;.*\.png;.*\.jpeg;.*\.jpg;.*\.htm;.*\.html;.*\.txt;"
>                                     primaryIndicator="true" />
>                   <Valve
> className="org.apache.catalina.cluster.session.JvmRouteBinderValve"
>                                              enabled="true" />	
>                   <ClusterListener
> className="org.apache.catalina.cluster.session.ClusterSessionListener"
> />
>                   <ClusterListener
> className="org.apache.catalina.cluster.session.JvmRouteSessionIDBinderListener"
> />
>                   <Deployer
> className="org.apache.catalina.cluster.deploy.FarmWarDeployer"
>                                             tempDir="${catalina.base}/war-temp"
> 
> deployDir="${catalina.base}/war-deploy/"
> 
> watchDir="${catalina.base}/war-listen/"
>                                        watchEnabled="true"/>
>                   </Cluster>
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org