You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Rick Szeto <ri...@cuberoute.com> on 2004/02/11 23:54:31 UTC

Problem with Tomcat5 session replication.

Hi all,
  I am having quite a bit of trouble getting the sessions from one node in
the cluster to the other nodes of the cluster. The multicast is working fine
as I can see that each of the nodes can recognize when a new node is brought
up as well as when they are removed.

  No where in the logs are there mention of sessions being replicated and/or
errors encounter while trying to do so. I have Apache in front doing URL
rewriting and forwarded via proxy so the client does not know the
difference.

  I have pasted the relevant snippets from the server.xml, which are
identical
on both nodes. I am running Tomcat 5.0.18 with one node running on Windows
XP
and the other node on RH 9.0(which should not make any difference).

  I guess that what I am hoping for is someone can look at my replication
config
and tell me that I did something stupid. I rather have that happen then not
being
able to get the sessions replicated. =)

ps. Out of curiousity, I have been unable to find any documentation on the
JDBCManager, reference here:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/cluster-howto.html

Thanks in advance,
Rick Szeto


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Problem with Tomcat5 session replication.

Posted by Rick Szeto <ri...@cuberoute.com>.
Thanks Apu,
  I knw it was going to be something simple and stupid on my part, as these
things are always are. I added the <distributable/> to my web.xml and they
are at least trying to replicate the sessions over to each other. Me thinks
a lot of them do not implement the Serializable interface. But at least I am
getting exceptions(who ever said exceptions are a bad thing? =)).

Thanks again for the help from people in this mailing list,
Rick Szeto

-----Original Message-----
From: Apu Shah [mailto:apu@esaya.com]
Sent: Wednesday, February 11, 2004 7:43 PM
To: Tomcat Users List
Subject: Re: Problem with Tomcat5 session replication.



also make sure that the web.xml for the webapp has the <distributable />
element and all session vars are serializable.

apu

On Wed, 11 Feb 2004 15:13:39 -0800
"Filip Hanik \(lists\)" <de...@hanik.com> wrote:

> on RH 9 you must also set,
>
> export LD_ASSUME_KERNEL=2.4
>
> Filip
>
> -----Original Message-----
> From: Rick Szeto [mailto:rick.szeto@cuberoute.com]
> Sent: Wednesday, February 11, 2004 2:55 PM
> To: tomcat
> Subject: Problem with Tomcat5 session replication.
>
>
> Hi all,
>   I am having quite a bit of trouble getting the sessions from one
>   node in
> the cluster to the other nodes of the cluster. The multicast is
> working fine as I can see that each of the nodes can recognize when a
> new node is brought up as well as when they are removed.
>
>   No where in the logs are there mention of sessions being replicated
>   and/or
> errors encounter while trying to do so. I have Apache in front doing
> URL rewriting and forwarded via proxy so the client does not know the
> difference.
>
>   I have pasted the relevant snippets from the server.xml, which are
> identical
> on both nodes. I am running Tomcat 5.0.18 with one node running on
> Windows XP
> and the other node on RH 9.0(which should not make any difference).
>
>   I guess that what I am hoping for is someone can look at my
>   replication
> config
> and tell me that I did something stupid. I rather have that happen
> then not being
> able to get the sessions replicated. =)
>
> ps. Out of curiousity, I have been unable to find any documentation on
> the JDBCManager, reference here:
> http://jakarta.apache.org/tomcat/tomcat-5.0-doc/cluster-howto.html
>
> Thanks in advance,
> Rick Szeto
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.577 / Virus Database: 366 - Release Date: 2/3/2004
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.577 / Virus Database: 366 - Release Date: 2/3/2004
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Problem with Tomcat5 session replication.

Posted by Apu Shah <ap...@esaya.com>.
also make sure that the web.xml for the webapp has the <distributable />
element and all session vars are serializable.

apu

On Wed, 11 Feb 2004 15:13:39 -0800
"Filip Hanik \(lists\)" <de...@hanik.com> wrote:

> on RH 9 you must also set,
> 
> export LD_ASSUME_KERNEL=2.4
> 
> Filip
> 
> -----Original Message-----
> From: Rick Szeto [mailto:rick.szeto@cuberoute.com]
> Sent: Wednesday, February 11, 2004 2:55 PM
> To: tomcat
> Subject: Problem with Tomcat5 session replication.
> 
> 
> Hi all,
>   I am having quite a bit of trouble getting the sessions from one
>   node in
> the cluster to the other nodes of the cluster. The multicast is
> working fine as I can see that each of the nodes can recognize when a
> new node is brought up as well as when they are removed.
> 
>   No where in the logs are there mention of sessions being replicated
>   and/or
> errors encounter while trying to do so. I have Apache in front doing
> URL rewriting and forwarded via proxy so the client does not know the
> difference.
> 
>   I have pasted the relevant snippets from the server.xml, which are
> identical
> on both nodes. I am running Tomcat 5.0.18 with one node running on
> Windows XP
> and the other node on RH 9.0(which should not make any difference).
> 
>   I guess that what I am hoping for is someone can look at my
>   replication
> config
> and tell me that I did something stupid. I rather have that happen
> then not being
> able to get the sessions replicated. =)
> 
> ps. Out of curiousity, I have been unable to find any documentation on
> the JDBCManager, reference here:
> http://jakarta.apache.org/tomcat/tomcat-5.0-doc/cluster-howto.html
> 
> Thanks in advance,
> Rick Szeto
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.577 / Virus Database: 366 - Release Date: 2/3/2004
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.577 / Virus Database: 366 - Release Date: 2/3/2004
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Problem with Tomcat5 session replication.

Posted by Apu Shah <ap...@esaya.com>.
i found that replacing 

tcpListenAddress="auto"

with 

tcpListenAddress="IP"

and

mcastBindAddress="IP"

works better with multi-homed machines. 

apu

On Wed, 11 Feb 2004 17:58:59 -0500
"Rick Szeto" <ri...@cuberoute.com> wrote:

> Sorry, my bad...
> 
>         <Cluster
> className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
>                   name="FilipsCluster"
>                   debug="10"
> 
> serviceclass="org.apache.catalina.cluster.mcast.McastService"
>           mcastAddr="228.1.2.3"
>                   mcastPort="45564"
>                   mcastFrequency="500"
>                   mcastDropTime="3000"
>                   tcpThreadCount="2"
>                   tcpListenAddress="auto"
>                   tcpListenPort="4001"
>                   tcpSelectorTimeout="100"
>                   printToScreen="true"
>                   expireSessionsOnShutdown="false"
>                   useDirtyFlag="false"
>                   replicationMode="synchronous"
>         />
> 
>         <Valve
>         className="org.apache.catalina.cluster.tcp.ReplicationValve"
> debug="9"
>                filter=".*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.tx
>                t;"/>
> 
> Thanks again,
> Rick Szeto
> 
> -----Original Message-----
> From: Rick Szeto [mailto:rick.szeto@cuberoute.com]
> Sent: Wednesday, February 11, 2004 5:55 PM
> To: tomcat
> Subject: Problem with Tomcat5 session replication.
> 
> 
> Hi all,
>   I am having quite a bit of trouble getting the sessions from one
>   node in
> the cluster to the other nodes of the cluster. The multicast is
> working fine as I can see that each of the nodes can recognize when a
> new node is brought up as well as when they are removed.
> 
>   No where in the logs are there mention of sessions being replicated
>   and/or
> errors encounter while trying to do so. I have Apache in front doing
> URL rewriting and forwarded via proxy so the client does not know the
> difference.
> 
>   I have pasted the relevant snippets from the server.xml, which are
> identical
> on both nodes. I am running Tomcat 5.0.18 with one node running on
> Windows XP
> and the other node on RH 9.0(which should not make any difference).
> 
>   I guess that what I am hoping for is someone can look at my
>   replication
> config
> and tell me that I did something stupid. I rather have that happen
> then not being
> able to get the sessions replicated. =)
> 
> ps. Out of curiousity, I have been unable to find any documentation on
> the JDBCManager, reference here:
> http://jakarta.apache.org/tomcat/tomcat-5.0-doc/cluster-howto.html
> 
> Thanks in advance,
> Rick Szeto
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Problem with Tomcat5 session replication.

Posted by "Filip Hanik (lists)" <de...@hanik.com>.
on RH 9 you must also set,

export LD_ASSUME_KERNEL=2.4

Filip

-----Original Message-----
From: Rick Szeto [mailto:rick.szeto@cuberoute.com]
Sent: Wednesday, February 11, 2004 2:55 PM
To: tomcat
Subject: Problem with Tomcat5 session replication.


Hi all,
  I am having quite a bit of trouble getting the sessions from one node in
the cluster to the other nodes of the cluster. The multicast is working fine
as I can see that each of the nodes can recognize when a new node is brought
up as well as when they are removed.

  No where in the logs are there mention of sessions being replicated and/or
errors encounter while trying to do so. I have Apache in front doing URL
rewriting and forwarded via proxy so the client does not know the
difference.

  I have pasted the relevant snippets from the server.xml, which are
identical
on both nodes. I am running Tomcat 5.0.18 with one node running on Windows
XP
and the other node on RH 9.0(which should not make any difference).

  I guess that what I am hoping for is someone can look at my replication
config
and tell me that I did something stupid. I rather have that happen then not
being
able to get the sessions replicated. =)

ps. Out of curiousity, I have been unable to find any documentation on the
JDBCManager, reference here:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/cluster-howto.html

Thanks in advance,
Rick Szeto


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.577 / Virus Database: 366 - Release Date: 2/3/2004

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


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Problem with Tomcat5 session replication.

Posted by Rick Szeto <ri...@cuberoute.com>.
Sorry, my bad...

        <Cluster
className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
                  name="FilipsCluster"
                  debug="10"

serviceclass="org.apache.catalina.cluster.mcast.McastService"
          mcastAddr="228.1.2.3"
                  mcastPort="45564"
                  mcastFrequency="500"
                  mcastDropTime="3000"
                  tcpThreadCount="2"
                  tcpListenAddress="auto"
                  tcpListenPort="4001"
                  tcpSelectorTimeout="100"
                  printToScreen="true"
                  expireSessionsOnShutdown="false"
                  useDirtyFlag="false"
                  replicationMode="synchronous"
        />

        <Valve className="org.apache.catalina.cluster.tcp.ReplicationValve"
debug="9"
               filter=".*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;"/>

Thanks again,
Rick Szeto

-----Original Message-----
From: Rick Szeto [mailto:rick.szeto@cuberoute.com]
Sent: Wednesday, February 11, 2004 5:55 PM
To: tomcat
Subject: Problem with Tomcat5 session replication.


Hi all,
  I am having quite a bit of trouble getting the sessions from one node in
the cluster to the other nodes of the cluster. The multicast is working fine
as I can see that each of the nodes can recognize when a new node is brought
up as well as when they are removed.

  No where in the logs are there mention of sessions being replicated and/or
errors encounter while trying to do so. I have Apache in front doing URL
rewriting and forwarded via proxy so the client does not know the
difference.

  I have pasted the relevant snippets from the server.xml, which are
identical
on both nodes. I am running Tomcat 5.0.18 with one node running on Windows
XP
and the other node on RH 9.0(which should not make any difference).

  I guess that what I am hoping for is someone can look at my replication
config
and tell me that I did something stupid. I rather have that happen then not
being
able to get the sessions replicated. =)

ps. Out of curiousity, I have been unable to find any documentation on the
JDBCManager, reference here:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/cluster-howto.html

Thanks in advance,
Rick Szeto


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org