Session replication embeded tomcat

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Session replication embeded tomcat

Robert-165

Dear,

We strugle in replicating tomcat/catalina sessions on two linux server (two
debian etch OR  two suse sles10). The surprising thing is that this works
fine for two win xp machines  (same config files and same JDK 1.4!).

 * On linux we enabled the multicasting checked our network.  
 * With a network sniffer we see the multicast packets beiing delivered to
all the nodes but ofbiz/tomcat does not pick them.

Thanks
Robert  

Reply | Threaded
Open this post in threaded view
|

AW: Session replication embeded tomcat -- update

Robert-165
Dear,

Additionally we tested with jdk 1.5 but still we have the same behaviour.
Packets are in the network, but the embeded tomcat/catalina does not see
them.  On windows the session transfer is working fine but non on debian and
suse.


Regards
Robert  


-----Ursprüngliche Nachricht-----
Von: Robert [mailto:[hidden email]]
Gesendet: Dienstag, 20. März 2007 11:30
An: [hidden email]
Betreff: Session replication embeded tomcat


Dear,

We strugle in replicating tomcat/catalina sessions on two linux server (two
debian etch OR  two suse sles10). The surprising thing is that this works
fine for two win xp machines  (same config files and same JDK 1.4!).

 * On linux we enabled the multicasting checked our network.  
 * With a network sniffer we see the multicast packets beiing delivered to
all the nodes but ofbiz/tomcat does not pick them.

Thanks
Robert  


Reply | Threaded
Open this post in threaded view
|

Re: AW: Session replication embeded tomcat -- update

Sebastian Schirmer
Robert,

It seems that the mulicast address binding behauviour is different on
windows. The ofbiz-containers.xml cluster example seems also wrong

The replication-mode has a typo. change the line to
<property name="replication-mode" value="pooled"/>

Try to comment out the property name="mcast-bind-addr" and be sure that
multicast is enabled on your ethernet stack. you should also set a
multicast route explictly. Raise the log4j apache log level to INFO and
watch out the log. If the multicast between the machines is working you
will got a message like this:

(Cluster-MembershipReceiver) [ SimpleTcpCluster.java:1107:INFO ]
Replication member
added:org.apache.catalina.cluster.mcast.McastMember[tcp://xxx.xx.xxx.xx:4001,catalina,xxx.xxx.xxx.xxx,4001,
alive=46772864]

The message means that multicast commnication between different tomcats is
working. For a successful session clustering further steps are needed. For
Example in a Standalone Tomcat env you need an enabled ClusterListener
JvmRouteSessionIDBinderListener and a ClusterSessionListener but I suggest
this  is not implemented in the ofbiz yet. Take a look in the
CatalinaContainer Class. The embedded tomcat configuration is done here.

kind regards
Sebastian


--On Dienstag, 20. März 2007 12:38 +0100 Robert <[hidden email]>
wrote:

> Dear,
>
> Additionally we tested with jdk 1.5 but still we have the same behaviour.
> Packets are in the network, but the embeded tomcat/catalina does not see
> them.  On windows the session transfer is working fine but non on debian
> and suse.
>
>
> Regards
> Robert
>
>
> -----Ursprüngliche Nachricht-----
> Von: Robert [mailto:[hidden email]]
> Gesendet: Dienstag, 20. März 2007 11:30
> An: [hidden email]
> Betreff: Session replication embeded tomcat
>
>
> Dear,
>
> We strugle in replicating tomcat/catalina sessions on two linux server
> (two debian etch OR  two suse sles10). The surprising thing is that this
> works fine for two win xp machines  (same config files and same JDK 1.4!).
>
>  * On linux we enabled the multicasting checked our network.
>  * With a network sniffer we see the multicast packets beiing delivered to
> all the nodes but ofbiz/tomcat does not pick them.
>
> Thanks
> Robert
>
>

Reply | Threaded
Open this post in threaded view
|

AW: AW: Session replication embeded tomcat -- update

Robert-165
 
Thanks,

This is working now!  The tomcats "see" each other now.
We now go for the containers.

Robert


-----Ursprüngliche Nachricht-----
Von: Sebastian Schirmer [mailto:[hidden email]]
Gesendet: Mittwoch, 21. März 2007 17:38
An: [hidden email]
Betreff: Re: AW: Session replication embeded tomcat -- update

Robert,

It seems that the mulicast address binding behauviour is different on
windows. The ofbiz-containers.xml cluster example seems also wrong

The replication-mode has a typo. change the line to <property
name="replication-mode" value="pooled"/>

Try to comment out the property name="mcast-bind-addr" and be sure that
multicast is enabled on your ethernet stack. you should also set a multicast
route explictly. Raise the log4j apache log level to INFO and watch out the
log. If the multicast between the machines is working you will got a message
like this:

(Cluster-MembershipReceiver) [ SimpleTcpCluster.java:1107:INFO ] Replication
member
added:org.apache.catalina.cluster.mcast.McastMember[tcp://xxx.xx.xxx.xx:4001
,catalina,xxx.xxx.xxx.xxx,4001,
alive=46772864]

The message means that multicast commnication between different tomcats is
working. For a successful session clustering further steps are needed. For
Example in a Standalone Tomcat env you need an enabled ClusterListener
JvmRouteSessionIDBinderListener and a ClusterSessionListener but I suggest
this  is not implemented in the ofbiz yet. Take a look in the
CatalinaContainer Class. The embedded tomcat configuration is done here.

kind regards
Sebastian


--On Dienstag, 20. März 2007 12:38 +0100 Robert <[hidden email]>
wrote:

> Dear,
>
> Additionally we tested with jdk 1.5 but still we have the same behaviour.
> Packets are in the network, but the embeded tomcat/catalina does not
> see them.  On windows the session transfer is working fine but non on
> debian and suse.
>
>
> Regards
> Robert
>
>
> -----Ursprüngliche Nachricht-----
> Von: Robert [mailto:[hidden email]]
> Gesendet: Dienstag, 20. März 2007 11:30
> An: [hidden email]
> Betreff: Session replication embeded tomcat
>
>
> Dear,
>
> We strugle in replicating tomcat/catalina sessions on two linux server
> (two debian etch OR  two suse sles10). The surprising thing is that
> this works fine for two win xp machines  (same config files and same JDK
1.4!).
>
>  * On linux we enabled the multicasting checked our network.
>  * With a network sniffer we see the multicast packets beiing
> delivered to all the nodes but ofbiz/tomcat does not pick them.
>
> Thanks
> Robert
>
>