You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by vignesh sabapathi <vi...@tcs.com> on 2009/11/17 07:05:40 UTC
Session replication not working in OFBiz embedded tomcat clustering
Hi
I have done ofbiz clustering by deploying ofbiz in external tomcat. but when
i try to do clustering (load balancing using Apache) with embedded ofbiz
tomcat the session is not replicating
Like when i shut down one instances . .... OFbiz goes to login page again
here are my configuration files (ofbiz-containers.xml)
<container name="catalina-container"
class="org.ofbiz.catalina.container.CatalinaContainer">
<!-- static configuration for tomcat -->
<property name="delegator-name" value="default"/>
<property name="use-naming" value="false"/>
<property name="debug" value="0"/>
<property name="catalina-runtime-home" value="runtime/catalina"/>
<property name="apps-context-reloadable" value="false"/>
<property name="apps-cross-context" value="false"/>
<property name="apps-distributable" value="true"/>
<!-- one or more tomcat engines (servers); map to this + host -->
<property name="default-server" value="engine">
<property name="default-host" value="172.17.197.56"/>
<property name="jvm-route" value="node1"/>
<property name="access-log-pattern">
<property-value>%h %l %u %t "%r" %s %b "%{Referer}i"
"%{User-Agent}i"</property-value>
</property>
<property name="access-log-resolve" value="true"/>
<property name="access-log-rotate" value="true"/>
<property name="access-log-prefix" value="access_log."/>
<property name="access-log-dir" value="runtime/logs"/>
<property name="enable-request-dump" value="false"/>
<!-- uncomment for cluster support -->
<property name="default-server-cluster" value="cluster">
<property name="rep-valve-filter">
<property-value>.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;</property-value>
</property>
<property name="manager-class"
value="org.apache.catalina.ha.session.DeltaManager"/>
<property name="debug" value="5"/>
<property name="replication-mode" value="pooled"/>
<!-- <property name="tcp-listen-host" value="172.17.197.56"/>
-->
<property name="tcp-listen-port" value="4001"/>
<property name="tcp-sector-timeout" value="100"/>
<property name="tcp-thread-count" value="6"/>
<property name="mcast-bind-addr" value="172.17.197.56"/>
<property name="mcast-addr" value="228.0.0.4"/>
<property name="mcast-port" value="45564"/>
<property name="mcast-freq" value="500"/>
<property name="mcast-drop-time" value="3000"/>
</property>
In instances 2's ofbiz-containers.xml file i changed tcp-listen-port to 4002
and jvm node to node2.
And i am using "OFBiz-4.0 release version
And my terminal output doesnt show any error about clustering
Thanks in advance
looking forward your replies
bye
vignesh sabapathi
mailto : vignesh.sabapathi@tcs.com
--
View this message in context: http://n4.nabble.com/Session-replication-not-working-in-OFBiz-embedded-tomcat-clustering-tp622565p622565.html
Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: Session replication not working in OFBiz embedded tomcat
clustering
Posted by vignesh sabapathi <vi...@tcs.com>.
Hi Anil
Thanks for providing the configuration settings... i have made all the
changes but no success..
could you please review my configuration files.. here are they
node 1 (ofbiz instance1)
<container name="catalina-container"
class="org.ofbiz.catalina.container.CatalinaContainer">
<!-- static configuration for tomcat -->
<property name="delegator-name" value="default"/>
<property name="use-naming" value="false"/>
<property name="debug" value="0"/>
<property name="catalina-runtime-home" value="runtime/catalina"/>
<property name="apps-context-reloadable" value="false"/>
<property name="apps-cross-context" value="true"/>
<property name="apps-distributable" value="true"/>
<!-- one or more tomcat engines (servers); map to this + host -->
<property name="default-server" value="engine">
<property name="default-host" value="0.0.0.0"/>
<property name="jvm-route" value="node1"/>
<property name="access-log-pattern">
<property-value>%h %l %u %t "%r" %s %b "%{Referer}i"
"%{User-Agent}i"</property-value>
</property>
<property name="access-log-resolve" value="true"/>
<property name="access-log-rotate" value="true"/>
<property name="access-log-prefix" value="access_log."/>
<property name="access-log-dir" value="runtime/logs"/>
<property name="enable-request-dump" value="false"/>
<!-- uncomment for cluster support -->
<property name="default-server-cluster" value="cluster">
<property name="rep-valve-filter">
<property-value>.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;</property-value>
</property>
<property name="manager-class"
value="org.apache.catalina.ha.session.BackupManager"/>
<property name="debug" value="5"/>
<property name="replication-mode" value="pooled"/>
<property name="tcp-listen-host" value="auto"/>
<property name="tcp-listen-port" value="4001"/>
<property name="tcp-sector-timeout" value="100"/>
<property name="tcp-thread-count" value="6"/>
<property name="mcast-bind-addr" value="172.17.197.56"/>
<property name="mcast-addr" value="228.0.0.4"/>
<property name="mcast-port" value="45564"/>
<property name="mcast-freq" value="500"/>
<property name="mcast-drop-time" value="3000"/>
</property>
node 2 (ofbiz instance 2)
<container name="catalina-container"
class="org.ofbiz.catalina.container.CatalinaContainer">
<!-- static configuration for tomcat -->
<property name="delegator-name" value="default"/>
<property name="use-naming" value="false"/>
<property name="debug" value="0"/>
<property name="catalina-runtime-home" value="runtime/catalina"/>
<property name="apps-context-reloadable" value="false"/>
<property name="apps-cross-context" value="true"/>
<property name="apps-distributable" value="true"/>
<!-- one or more tomcat engines (servers); map to this + host -->
<property name="default-server" value="engine">
<property name="default-host" value="0.0.0.0"/>
<property name="jvm-route" value="node2"/>
<property name="access-log-pattern">
<property-value>%h %l %u %t "%r" %s %b "%{Referer}i"
"%{User-Agent}i"</property-value>
</property>
<property name="access-log-resolve" value="true"/>
<property name="access-log-rotate" value="true"/>
<property name="access-log-prefix" value="access_log."/>
<property name="access-log-dir" value="runtime/logs"/>
<property name="enable-request-dump" value="false"/>
<!-- uncomment for cluster support -->
<property name="default-server-cluster" value="cluster">
<property name="rep-valve-filter">
<property-value>.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;</property-value>
</property>
<property name="manager-class"
value="org.apache.catalina.ha.session.BackupManager"/>
<property name="debug" value="5"/>
<property name="replication-mode" value="pooled"/>
<property name="tcp-listen-host" value="auto"/>
<property name="tcp-listen-port" value="4002"/>
<property name="tcp-sector-timeout" value="100"/>
<property name="tcp-thread-count" value="6"/>
<property name="mcast-bind-addr" value="172.17.197.56"/>
<property name="mcast-addr" value="228.0.0.4"/>
<property name="mcast-port" value="45564"/>
<property name="mcast-freq" value="500"/>
<property name="mcast-drop-time" value="3000"/>
</property>
My doubt is ...
do i need to change anything in
framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java
and do i need to build it using ant clean and ant script again after making
changes ??
Alo the change you mentioned for
<property name="replication-mode"
value="org.apache.catalina.tribes.transport.bio.PooledMultiSender"/>
is throwing error as shown below
[LocalDispatcher] : Created Dispatcher for: entity-default
java.lang.IllegalArgumentException: Replication mode has to be
'synchronous', 'pooled', 'asynchronous', 'fastasyncqueue
at
org.apache.catalina.cluster.tcp.ReplicationTransmitter.setReplicationMode(ReplicationTransmitter.java:209)
at
org.ofbiz.catalina.container.CatalinaContainer.createCluster(CatalinaContainer.java:411)
at
org.ofbiz.catalina.container.CatalinaContainer.createEngine(CatalinaContainer.java:287)
at
org.ofbiz.catalina.container.CatalinaContainer.init(CatalinaContainer.java:195)
at
org.ofbiz.base.container.ContainerLoader.loadContainer(ContainerLoader.java:141)
at org.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:65)
at org.ofbiz.base.start.Start.initStartLoaders(Start.java:248)
at org.ofbiz.base.start.Start.init(Start.java:87)
at org.ofbiz.base.start.Start.main(Start.java:403)
Please review the above ....
thanks in advance
bye
vignesh sabapathi
Anil Soni wrote:
>
> Vignesh,
>
> Here is my configuration setting (ofbiz-containers.xml) :
>
> <container name="catalina-container"
> class="org.ofbiz.catalina.container.CatalinaContainer">
> <!-- static configuration for tomcat -->
> <property name="delegator-name" value="default"/>
> <property name="use-naming" value="false"/>
> <property name="debug" value="0"/>
> <property name="catalina-runtime-home" value="runtime/catalina"/>
> <property name="apps-context-reloadable" value="false"/>
> <property name="apps-cross-context" value="true"/>
> <property name="apps-distributable" value="true"/>
> <!-- one or more tomcat engines (servers); map to this + host -->
> <property name="default-server" value="engine">
> <property name="default-host" value="0.0.0.0"/>
> <property name="jvm-route" value="worker2"/>
> <property name="access-log-pattern">
> <property-value>%h %l %u %t "%r" %s %b "%{Referer}i"
> "%{User-Agent}i"</property-value>
> </property>
> <property name="access-log-resolve" value="true"/>
> <property name="access-log-rotate" value="true"/>
> <property name="access-log-prefix" value="access_log."/>
> <property name="access-log-dir" value="runtime/logs"/>
> <property name="enable-request-dump" value="false"/>
> <!-- uncomment for cluster support-->
> <property name="default-server-cluster" value="cluster">
> <property name="rep-valve-filter">
>
> <property-value>.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;</property-value>
> </property>
> <property name="manager-class"
> value="org.apache.catalina.ha.session.BackupManager"/>
> <property name="debug" value="5"/>
> <property name="replication-mode"
> value="org.apache.catalina.tribes.transport.bio.PooledMultiSender"/>
> <property name="tcp-listen-host" value="auto"/>
> <property name="tcp-listen-port" value="4001"/>
> <property name="tcp-sector-timeout" value="100"/>
> <property name="tcp-thread-count" value="6"/>
> <property name="mcast-bind-addr" value="172.17.88.107"/>
> <property name="mcast-addr" value="228.0.0.4"/>
> <property name="mcast-port" value="45564"/>
> <property name="mcast-freq" value="500"/>
> <property name="mcast-drop-time" value="3000"/>
> </property>
>
> Try this.
>
>
>
> Anil Soni
> Anil.Soni@lntinfotech.com
> Mobile : 9930302283
>
> ______________________________________________________________________
>
--
View this message in context: http://n4.nabble.com/Session-replication-not-working-in-OFBiz-embedded-tomcat-clustering-tp622565p623931.html
Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: Session replication not working in OFBiz embedded tomcat clustering
Posted by Anil Soni <an...@lntinfotech.com>.
Vignesh,
Here is my configuration setting (ofbiz-containers.xml) :
<container name="catalina-container"
class="org.ofbiz.catalina.container.CatalinaContainer">
<!-- static configuration for tomcat -->
<property name="delegator-name" value="default"/>
<property name="use-naming" value="false"/>
<property name="debug" value="0"/>
<property name="catalina-runtime-home" value="runtime/catalina"/>
<property name="apps-context-reloadable" value="false"/>
<property name="apps-cross-context" value="true"/>
<property name="apps-distributable" value="true"/>
<!-- one or more tomcat engines (servers); map to this + host -->
<property name="default-server" value="engine">
<property name="default-host" value="0.0.0.0"/>
<property name="jvm-route" value="worker2"/>
<property name="access-log-pattern">
<property-value>%h %l %u %t "%r" %s %b "%{Referer}i"
"%{User-Agent}i"</property-value>
</property>
<property name="access-log-resolve" value="true"/>
<property name="access-log-rotate" value="true"/>
<property name="access-log-prefix" value="access_log."/>
<property name="access-log-dir" value="runtime/logs"/>
<property name="enable-request-dump" value="false"/>
<!-- uncomment for cluster support-->
<property name="default-server-cluster" value="cluster">
<property name="rep-valve-filter">
<property-value>.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;</property-value>
</property>
<property name="manager-class"
value="org.apache.catalina.ha.session.BackupManager"/>
<property name="debug" value="5"/>
<property name="replication-mode"
value="org.apache.catalina.tribes.transport.bio.PooledMultiSender"/>
<property name="tcp-listen-host" value="auto"/>
<property name="tcp-listen-port" value="4001"/>
<property name="tcp-sector-timeout" value="100"/>
<property name="tcp-thread-count" value="6"/>
<property name="mcast-bind-addr" value="172.17.88.107"/>
<property name="mcast-addr" value="228.0.0.4"/>
<property name="mcast-port" value="45564"/>
<property name="mcast-freq" value="500"/>
<property name="mcast-drop-time" value="3000"/>
</property>
Try this.
Anil Soni
Anil.Soni@lntinfotech.com
Mobile : 9930302283
______________________________________________________________________
Re: Session replication not working in OFBiz embedded tomcat
clustering
Posted by vignesh sabapathi <vi...@tcs.com>.
Hi Anil
Thanks for your reply... i tried with both Delta and Backup manager ....
also changed the attributes you mentioned to true but still not successful
in replication... getting the same problem...
do i need to build the project again after making the changes...
do i need to do anything with any .java files
please do help
Thanks
by
vignesh
anil.soni wrote:
>
> Vignesh,
>
> It's a problem of DeltaManager, so I would suggest you to use
> BackupManager
> as manager-class instead of DeltaManager and set the value of
> apps-distributable="true" and apps-cross-context="true". After these
> settings load balancing in replication mode will work.
>
>
> On Tue, Nov 17, 2009 at 11:35 AM, vignesh sabapathi <
> vignesh.sabapathi@tcs.com> wrote:
>
>>
>> Hi
>>
>> I have done ofbiz clustering by deploying ofbiz in external tomcat. but
>> when
>> i try to do clustering (load balancing using Apache) with embedded ofbiz
>> tomcat the session is not replicating
>>
>> Like when i shut down one instances . .... OFbiz goes to login page again
>>
>> here are my configuration files (ofbiz-containers.xml)
>>
>> <container name="catalina-container"
>> class="org.ofbiz.catalina.container.CatalinaContainer">
>> <!-- static configuration for tomcat -->
>> <property name="delegator-name" value="default"/>
>> <property name="use-naming" value="false"/>
>> <property name="debug" value="0"/>
>> <property name="catalina-runtime-home" value="runtime/catalina"/>
>> <property name="apps-context-reloadable" value="false"/>
>> <property name="apps-cross-context" value="false"/>
>> <property name="apps-distributable" value="true"/>
>> <!-- one or more tomcat engines (servers); map to this + host -->
>> <property name="default-server" value="engine">
>> <property name="default-host" value="172.17.197.56"/>
>> <property name="jvm-route" value="node1"/>
>> <property name="access-log-pattern">
>> <property-value>%h %l %u %t "%r" %s %b "%{Referer}i"
>> "%{User-Agent}i"</property-value>
>> </property>
>> <property name="access-log-resolve" value="true"/>
>> <property name="access-log-rotate" value="true"/>
>> <property name="access-log-prefix" value="access_log."/>
>> <property name="access-log-dir" value="runtime/logs"/>
>> <property name="enable-request-dump" value="false"/>
>> <!-- uncomment for cluster support -->
>> <property name="default-server-cluster" value="cluster">
>> <property name="rep-valve-filter">
>>
>>
>> <property-value>.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;</property-value>
>> </property>
>> <property name="manager-class"
>> value="org.apache.catalina.ha.session.DeltaManager"/>
>> <property name="debug" value="5"/>
>> <property name="replication-mode" value="pooled"/>
>> <!-- <property name="tcp-listen-host"
>> value="172.17.197.56"/>
>> -->
>> <property name="tcp-listen-port" value="4001"/>
>> <property name="tcp-sector-timeout" value="100"/>
>> <property name="tcp-thread-count" value="6"/>
>> <property name="mcast-bind-addr" value="172.17.197.56"/>
>> <property name="mcast-addr" value="228.0.0.4"/>
>> <property name="mcast-port" value="45564"/>
>> <property name="mcast-freq" value="500"/>
>> <property name="mcast-drop-time" value="3000"/>
>> </property>
>>
>> In instances 2's ofbiz-containers.xml file i changed tcp-listen-port to
>> 4002
>> and jvm node to node2.
>> And i am using "OFBiz-4.0 release version
>> And my terminal output doesnt show any error about clustering
>> Thanks in advance
>>
>> looking forward your replies
>>
>> bye
>>
>> vignesh sabapathi
>> mailto : vignesh.sabapathi@tcs.com
>>
>>
>> --
>> View this message in context:
>> http://n4.nabble.com/Session-replication-not-working-in-OFBiz-embedded-tomcat-clustering-tp622565p622565.html
>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>
>
>
>
> --
> Anil Soni
> +91-9930302283cell
> Anil.Soni@lntinfotech.com
>
>
--
View this message in context: http://n4.nabble.com/Session-replication-not-working-in-OFBiz-embedded-tomcat-clustering-tp622565p623335.html
Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: Session replication not working in OFBiz embedded tomcat
clustering
Posted by to...@gmail.com.
Vignesh,
It's a problem of DeltaManager, so I would suggest you to use BackupManager
as manager-class instead of DeltaManager and set the value of
apps-distributable="true" and apps-cross-context="true". After these
settings load balancing in replication mode will work.
On Tue, Nov 17, 2009 at 11:35 AM, vignesh sabapathi <
vignesh.sabapathi@tcs.com> wrote:
>
> Hi
>
> I have done ofbiz clustering by deploying ofbiz in external tomcat. but
> when
> i try to do clustering (load balancing using Apache) with embedded ofbiz
> tomcat the session is not replicating
>
> Like when i shut down one instances . .... OFbiz goes to login page again
>
> here are my configuration files (ofbiz-containers.xml)
>
> <container name="catalina-container"
> class="org.ofbiz.catalina.container.CatalinaContainer">
> <!-- static configuration for tomcat -->
> <property name="delegator-name" value="default"/>
> <property name="use-naming" value="false"/>
> <property name="debug" value="0"/>
> <property name="catalina-runtime-home" value="runtime/catalina"/>
> <property name="apps-context-reloadable" value="false"/>
> <property name="apps-cross-context" value="false"/>
> <property name="apps-distributable" value="true"/>
> <!-- one or more tomcat engines (servers); map to this + host -->
> <property name="default-server" value="engine">
> <property name="default-host" value="172.17.197.56"/>
> <property name="jvm-route" value="node1"/>
> <property name="access-log-pattern">
> <property-value>%h %l %u %t "%r" %s %b "%{Referer}i"
> "%{User-Agent}i"</property-value>
> </property>
> <property name="access-log-resolve" value="true"/>
> <property name="access-log-rotate" value="true"/>
> <property name="access-log-prefix" value="access_log."/>
> <property name="access-log-dir" value="runtime/logs"/>
> <property name="enable-request-dump" value="false"/>
> <!-- uncomment for cluster support -->
> <property name="default-server-cluster" value="cluster">
> <property name="rep-valve-filter">
>
>
> <property-value>.*\.gif;.*\.js;.*\.jpg;.*\.htm;.*\.html;.*\.txt;</property-value>
> </property>
> <property name="manager-class"
> value="org.apache.catalina.ha.session.DeltaManager"/>
> <property name="debug" value="5"/>
> <property name="replication-mode" value="pooled"/>
> <!-- <property name="tcp-listen-host" value="172.17.197.56"/>
> -->
> <property name="tcp-listen-port" value="4001"/>
> <property name="tcp-sector-timeout" value="100"/>
> <property name="tcp-thread-count" value="6"/>
> <property name="mcast-bind-addr" value="172.17.197.56"/>
> <property name="mcast-addr" value="228.0.0.4"/>
> <property name="mcast-port" value="45564"/>
> <property name="mcast-freq" value="500"/>
> <property name="mcast-drop-time" value="3000"/>
> </property>
>
> In instances 2's ofbiz-containers.xml file i changed tcp-listen-port to
> 4002
> and jvm node to node2.
> And i am using "OFBiz-4.0 release version
> And my terminal output doesnt show any error about clustering
> Thanks in advance
>
> looking forward your replies
>
> bye
>
> vignesh sabapathi
> mailto : vignesh.sabapathi@tcs.com
>
>
> --
> View this message in context:
> http://n4.nabble.com/Session-replication-not-working-in-OFBiz-embedded-tomcat-clustering-tp622565p622565.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
--
Anil Soni
+91-9930302283cell
Anil.Soni@lntinfotech.com