You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Cédric SAMSON <ce...@adeuxi.com> on 2011/12/26 14:50:18 UTC
Tomcat 6.0.35 : Cluster and new node
Hi all,
Context :
I have a cluster with 2 nodes (both on linux).
* The master node is configured as below : *
<Engine name="Catalina" defaultHost="localhost" jvmRoute="Tomcat-1">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
channelSendOptions="8">
<Manager className="org.apache.catalina.ha.session.DeltaManager"
expireSessionsOnShutdown="false"
notifyContainerListenersOnReplication="true"
notifySessionListenersOnReplication="true"
notifyListenersOnReplication="true"/>
<Channel className="org.apache.catalina.tribes.group.GroupChannel">
<Membership className="org.apache.catalina.tribes.membership.McastService"
address="228.0.0.3"
port="45566"
frequency="500"
dropTime="3000"/>
<Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
address="192.168.30.51"
port="3100"
autoBind="100"
selectorTimeout="5000"
maxThreads="6"/>
<Sender
className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
<Transport
className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>
</Sender>
<Interceptor
className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
<Interceptor
className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/>
<Interceptor
className="org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor"/>
</Channel>
<Valve className="org.apache.catalina.ha.tcp.ReplicationValve" filter=""
statistics="true"/>
<Valve className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>
<Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer"
tempDir="/usr/local/tomcat/webapps/tempdir"
deployDir="/usr/local/tomcat/webapps/"
watchDir="/usr/local/tomcat/watchdir/"
watchEnabled="true"/>
<ClusterListener
className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"/>
<ClusterListener
className="org.apache.catalina.ha.session.ClusterSessionListener"/>
</Cluster>
</Host>
</Engine>
* The slave node is configured as below : *
<Engine name="Catalina" defaultHost="localhost" jvmRoute="Tomcat-1">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
channelSendOptions="8">
<Manager className="org.apache.catalina.ha.session.DeltaManager"
expireSessionsOnShutdown="false"
notifyContainerListenersOnReplication="true"
notifySessionListenersOnReplication="true"
notifyListenersOnReplication="true"/>
<Channel className="org.apache.catalina.tribes.group.GroupChannel">
<Membership className="org.apache.catalina.tribes.membership.McastService"
address="228.0.0.3"
port="45566"
frequency="500"
dropTime="3000"/>
<Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
address="192.168.30.54"
port="3100"
autoBind="100"
selectorTimeout="5000"
maxThreads="6"/>
<Sender
className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
<Transport
className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>
</Sender>
<Interceptor
className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
<Interceptor
className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/>
<Interceptor
className="org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor"/>
</Channel>
<Valve className="org.apache.catalina.ha.tcp.ReplicationValve" filter=""
statistics="true"/>
<Valve className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>
<Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer"
tempDir="/usr/local/tomcat/webapps/tempdir"
deployDir="/usr/local/tomcat/webapps/"
watchDir="/usr/local/tomcat/watchdir/"
watchEnabled="false"/>
<ClusterListener
className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"/>
<ClusterListener
className="org.apache.catalina.ha.session.ClusterSessionListener"/>
</Cluster>
</Host>
</Engine>
All works fine.
I try to add a new war file in the master node folder
"/usr/local/tomcat/watchdir/", after few seconds, the war is correctly
deployed on both nodes.
Now i try to add a third node configured exactily as the slave (i just
change the IP address of receiver to match with the one of the machine).
In the master node log, i can see a new member is added, with the
correct IP, but the war already deployed on the cluster aren't deployed
on the new node.
* Question : *
What's the way to be able to auto deploy on new node without
restart the master node ? (when i restart the master node, all the nodes
of the cluster are OK).
Best regards
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 6.0.35 : Cluster and new node
Posted by Cédric SAMSON <ce...@adeuxi.com>.
Yes I tried and it works fine, but I just want all is automatic.
I mean, a machine crash, we have to change it.
The new machine has :
1. the same IP
2. the same name
3. the same tomcat configuration (but without the war files already
deployed)
as the previous machine (in order to not restart the load balancer and
not interrupt the service).
The best for me is that all the war in the watchdir of the master node
(the one with watchEnabled="true" ) are deployed in this new machine
because the contexts don't yet exist on this node.
It's only for machine replacement purpose.
For a "real" new node, we are force to reboot the cluster after
declaring the new node in the balancer.
Thanks for helping
Le 27/12/2011 12:09, Pid * a écrit :
> On 26 Dec 2011, at 14:33, "Cédric SAMSON"<ce...@adeuxi.com> wrote:
>
>> Hi all,
>>
>>
>> Context :
>> I have a cluster with 2 nodes (both on linux).
>>
>> * The master node is configured as below : *
>>
>> <Engine name="Catalina" defaultHost="localhost" jvmRoute="Tomcat-1">
>> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
>>
>> <Host name="localhost" appBase="webapps"
>> unpackWARs="true" autoDeploy="true"
>> xmlValidation="false" xmlNamespaceAware="false">
>>
>> <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster" channelSendOptions="8">
>>
>> <Manager className="org.apache.catalina.ha.session.DeltaManager"
>> expireSessionsOnShutdown="false"
>> notifyContainerListenersOnReplication="true"
>> notifySessionListenersOnReplication="true"
>> notifyListenersOnReplication="true"/>
>>
>> <Channel className="org.apache.catalina.tribes.group.GroupChannel">
>>
>> <Membership className="org.apache.catalina.tribes.membership.McastService"
>> address="228.0.0.3"
>> port="45566"
>> frequency="500"
>> dropTime="3000"/>
>> <Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
>> address="192.168.30.51"
>> port="3100"
>> autoBind="100"
>> selectorTimeout="5000"
>> maxThreads="6"/>
>>
>> <Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
>> <Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>
>> </Sender>
>> <Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
>> <Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/>
>> <Interceptor className="org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor"/>
>> </Channel>
>> <Valve className="org.apache.catalina.ha.tcp.ReplicationValve" filter="" statistics="true"/>
>> <Valve className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>
>>
>> <Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer"
>> tempDir="/usr/local/tomcat/webapps/tempdir"
>> deployDir="/usr/local/tomcat/webapps/"
>> watchDir="/usr/local/tomcat/watchdir/"
>> watchEnabled="true"/>
>>
>> <ClusterListener className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"/>
>> <ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener"/>
>>
>> </Cluster>
>>
>> </Host>
>> </Engine>
>>
>> * The slave node is configured as below : *
> The term 'slave' is an odd one to use here.
>
>
>> <Engine name="Catalina" defaultHost="localhost" jvmRoute="Tomcat-1">
>> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
>>
>> <Host name="localhost" appBase="webapps"
>> unpackWARs="true" autoDeploy="true"
>> xmlValidation="false" xmlNamespaceAware="false">
>>
>> <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster" channelSendOptions="8">
>>
>> <Manager className="org.apache.catalina.ha.session.DeltaManager"
>> expireSessionsOnShutdown="false"
>> notifyContainerListenersOnReplication="true"
>> notifySessionListenersOnReplication="true"
>> notifyListenersOnReplication="true"/>
>>
>> <Channel className="org.apache.catalina.tribes.group.GroupChannel">
>>
>> <Membership className="org.apache.catalina.tribes.membership.McastService"
>> address="228.0.0.3"
>> port="45566"
>> frequency="500"
>> dropTime="3000"/>
>> <Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
>> address="192.168.30.54"
>> port="3100"
>> autoBind="100"
>> selectorTimeout="5000"
>> maxThreads="6"/>
>>
>> <Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
>> <Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>
>> </Sender>
>> <Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
>> <Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/>
>> <Interceptor className="org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor"/>
>> </Channel>
>> <Valve className="org.apache.catalina.ha.tcp.ReplicationValve" filter="" statistics="true"/>
>> <Valve className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>
>>
>> <Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer"
>> tempDir="/usr/local/tomcat/webapps/tempdir"
>> deployDir="/usr/local/tomcat/webapps/"
>> watchDir="/usr/local/tomcat/watchdir/"
>> watchEnabled="false"/>
>>
>> <ClusterListener className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"/>
>> <ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener"/>
>>
>> </Cluster>
>>
>> </Host>
>> </Engine>
>>
>> All works fine.
>>
>> I try to add a new war file in the master node folder "/usr/local/tomcat/watchdir/", after few seconds, the war is correctly deployed on both nodes.
>> Now i try to add a third node configured exactily as the slave (i just change the IP address of receiver to match with the one of the machine). In the master node log, i can see a new member is added, with the correct IP, but the war already deployed on the cluster aren't deployed on the new node.
>>
>> * Question : *
>> What's the way to be able to auto deploy on new node without restart the master node ? (when i restart the master node, all the nodes of the cluster are OK).
> Did you try to deploy the app again after the new node has joined?
>
>
> p
>
>
>> Best regards
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
Re: Tomcat 6.0.35 : Cluster and new node
Posted by Cédric SAMSON <ce...@adeuxi.com>.
Ok thanks for the informations :D
Le 27/12/2011 14:39, Pid * a écrit :
> On 27 Dec 2011, at 12:07, "Cédric SAMSON"<ce...@adeuxi.com> wrote:
>
>> Yes I tried and it works fine, but I just want all is automatic.
> FarmWarDeployer doesn't do that.
> It is a push mechanism rather than a repository of applications queued
> for deployment.
>
>
> p
>
>
>> I mean, a machine crash, we have to change it.
>> The new machine has :
>>
>> 1. the same IP
>> 2. the same name
>> 3. the same tomcat configuration (but without the war files already
>> deployed)
>>
>> as the previous machine (in order to not restart the load balancer and
>> not interrupt the service).
>>
>> The best for me is that all the war in the watchdir of the master node
>> (the one with watchEnabled="true" ) are deployed in this new machine
>> because the contexts don't yet exist on this node.
>> It's only for machine replacement purpose.
>>
>> For a "real" new node, we are force to reboot the cluster after
>> declaring the new node in the balancer.
>>
>> Thanks for helping
>>
>> Le 27/12/2011 12:09, Pid * a écrit :
>>> On 26 Dec 2011, at 14:33, "Cédric SAMSON"<ce...@adeuxi.com> wrote:
>>>
>>>> Hi all,
>>>>
>>>>
>>>> Context :
>>>> I have a cluster with 2 nodes (both on linux).
>>>>
>>>> * The master node is configured as below : *
>>>>
>>>> <Engine name="Catalina" defaultHost="localhost" jvmRoute="Tomcat-1">
>>>> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
>>>>
>>>> <Host name="localhost" appBase="webapps"
>>>> unpackWARs="true" autoDeploy="true"
>>>> xmlValidation="false" xmlNamespaceAware="false">
>>>>
>>>> <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster" channelSendOptions="8">
>>>>
>>>> <Manager className="org.apache.catalina.ha.session.DeltaManager"
>>>> expireSessionsOnShutdown="false"
>>>> notifyContainerListenersOnReplication="true"
>>>> notifySessionListenersOnReplication="true"
>>>> notifyListenersOnReplication="true"/>
>>>>
>>>> <Channel className="org.apache.catalina.tribes.group.GroupChannel">
>>>>
>>>> <Membership className="org.apache.catalina.tribes.membership.McastService"
>>>> address="228.0.0.3"
>>>> port="45566"
>>>> frequency="500"
>>>> dropTime="3000"/>
>>>> <Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
>>>> address="192.168.30.51"
>>>> port="3100"
>>>> autoBind="100"
>>>> selectorTimeout="5000"
>>>> maxThreads="6"/>
>>>>
>>>> <Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
>>>> <Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>
>>>> </Sender>
>>>> <Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
>>>> <Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/>
>>>> <Interceptor className="org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor"/>
>>>> </Channel>
>>>> <Valve className="org.apache.catalina.ha.tcp.ReplicationValve" filter="" statistics="true"/>
>>>> <Valve className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>
>>>>
>>>> <Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer"
>>>> tempDir="/usr/local/tomcat/webapps/tempdir"
>>>> deployDir="/usr/local/tomcat/webapps/"
>>>> watchDir="/usr/local/tomcat/watchdir/"
>>>> watchEnabled="true"/>
>>>>
>>>> <ClusterListener className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"/>
>>>> <ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener"/>
>>>>
>>>> </Cluster>
>>>>
>>>> </Host>
>>>> </Engine>
>>>>
>>>> * The slave node is configured as below : *
>>> The term 'slave' is an odd one to use here.
>>>
>>>
>>>> <Engine name="Catalina" defaultHost="localhost" jvmRoute="Tomcat-1">
>>>> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
>>>>
>>>> <Host name="localhost" appBase="webapps"
>>>> unpackWARs="true" autoDeploy="true"
>>>> xmlValidation="false" xmlNamespaceAware="false">
>>>>
>>>> <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster" channelSendOptions="8">
>>>>
>>>> <Manager className="org.apache.catalina.ha.session.DeltaManager"
>>>> expireSessionsOnShutdown="false"
>>>> notifyContainerListenersOnReplication="true"
>>>> notifySessionListenersOnReplication="true"
>>>> notifyListenersOnReplication="true"/>
>>>>
>>>> <Channel className="org.apache.catalina.tribes.group.GroupChannel">
>>>>
>>>> <Membership className="org.apache.catalina.tribes.membership.McastService"
>>>> address="228.0.0.3"
>>>> port="45566"
>>>> frequency="500"
>>>> dropTime="3000"/>
>>>> <Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
>>>> address="192.168.30.54"
>>>> port="3100"
>>>> autoBind="100"
>>>> selectorTimeout="5000"
>>>> maxThreads="6"/>
>>>>
>>>> <Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
>>>> <Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>
>>>> </Sender>
>>>> <Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
>>>> <Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/>
>>>> <Interceptor className="org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor"/>
>>>> </Channel>
>>>> <Valve className="org.apache.catalina.ha.tcp.ReplicationValve" filter="" statistics="true"/>
>>>> <Valve className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>
>>>>
>>>> <Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer"
>>>> tempDir="/usr/local/tomcat/webapps/tempdir"
>>>> deployDir="/usr/local/tomcat/webapps/"
>>>> watchDir="/usr/local/tomcat/watchdir/"
>>>> watchEnabled="false"/>
>>>>
>>>> <ClusterListener className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"/>
>>>> <ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener"/>
>>>>
>>>> </Cluster>
>>>>
>>>> </Host>
>>>> </Engine>
>>>>
>>>> All works fine.
>>>>
>>>> I try to add a new war file in the master node folder "/usr/local/tomcat/watchdir/", after few seconds, the war is correctly deployed on both nodes.
>>>> Now i try to add a third node configured exactily as the slave (i just change the IP address of receiver to match with the one of the machine). In the master node log, i can see a new member is added, with the correct IP, but the war already deployed on the cluster aren't deployed on the new node.
>>>>
>>>> * Question : *
>>>> What's the way to be able to auto deploy on new node without restart the master node ? (when i restart the master node, all the nodes of the cluster are OK).
>>> Did you try to deploy the app again after the new node has joined?
>>>
>>>
>>> p
>>>
>>>
>>>> Best regards
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>>
>>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 6.0.35 : Cluster and new node
Posted by Pid * <pi...@pidster.com>.
On 27 Dec 2011, at 12:07, "Cédric SAMSON" <ce...@adeuxi.com> wrote:
> Yes I tried and it works fine, but I just want all is automatic.
FarmWarDeployer doesn't do that.
It is a push mechanism rather than a repository of applications queued
for deployment.
p
> I mean, a machine crash, we have to change it.
> The new machine has :
>
> 1. the same IP
> 2. the same name
> 3. the same tomcat configuration (but without the war files already
> deployed)
>
> as the previous machine (in order to not restart the load balancer and
> not interrupt the service).
>
> The best for me is that all the war in the watchdir of the master node
> (the one with watchEnabled="true" ) are deployed in this new machine
> because the contexts don't yet exist on this node.
> It's only for machine replacement purpose.
>
> For a "real" new node, we are force to reboot the cluster after
> declaring the new node in the balancer.
>
> Thanks for helping
>
> Le 27/12/2011 12:09, Pid * a écrit :
>> On 26 Dec 2011, at 14:33, "Cédric SAMSON"<ce...@adeuxi.com> wrote:
>>
>>> Hi all,
>>>
>>>
>>> Context :
>>> I have a cluster with 2 nodes (both on linux).
>>>
>>> * The master node is configured as below : *
>>>
>>> <Engine name="Catalina" defaultHost="localhost" jvmRoute="Tomcat-1">
>>> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
>>>
>>> <Host name="localhost" appBase="webapps"
>>> unpackWARs="true" autoDeploy="true"
>>> xmlValidation="false" xmlNamespaceAware="false">
>>>
>>> <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster" channelSendOptions="8">
>>>
>>> <Manager className="org.apache.catalina.ha.session.DeltaManager"
>>> expireSessionsOnShutdown="false"
>>> notifyContainerListenersOnReplication="true"
>>> notifySessionListenersOnReplication="true"
>>> notifyListenersOnReplication="true"/>
>>>
>>> <Channel className="org.apache.catalina.tribes.group.GroupChannel">
>>>
>>> <Membership className="org.apache.catalina.tribes.membership.McastService"
>>> address="228.0.0.3"
>>> port="45566"
>>> frequency="500"
>>> dropTime="3000"/>
>>> <Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
>>> address="192.168.30.51"
>>> port="3100"
>>> autoBind="100"
>>> selectorTimeout="5000"
>>> maxThreads="6"/>
>>>
>>> <Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
>>> <Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>
>>> </Sender>
>>> <Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
>>> <Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/>
>>> <Interceptor className="org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor"/>
>>> </Channel>
>>> <Valve className="org.apache.catalina.ha.tcp.ReplicationValve" filter="" statistics="true"/>
>>> <Valve className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>
>>>
>>> <Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer"
>>> tempDir="/usr/local/tomcat/webapps/tempdir"
>>> deployDir="/usr/local/tomcat/webapps/"
>>> watchDir="/usr/local/tomcat/watchdir/"
>>> watchEnabled="true"/>
>>>
>>> <ClusterListener className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"/>
>>> <ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener"/>
>>>
>>> </Cluster>
>>>
>>> </Host>
>>> </Engine>
>>>
>>> * The slave node is configured as below : *
>> The term 'slave' is an odd one to use here.
>>
>>
>>> <Engine name="Catalina" defaultHost="localhost" jvmRoute="Tomcat-1">
>>> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
>>>
>>> <Host name="localhost" appBase="webapps"
>>> unpackWARs="true" autoDeploy="true"
>>> xmlValidation="false" xmlNamespaceAware="false">
>>>
>>> <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster" channelSendOptions="8">
>>>
>>> <Manager className="org.apache.catalina.ha.session.DeltaManager"
>>> expireSessionsOnShutdown="false"
>>> notifyContainerListenersOnReplication="true"
>>> notifySessionListenersOnReplication="true"
>>> notifyListenersOnReplication="true"/>
>>>
>>> <Channel className="org.apache.catalina.tribes.group.GroupChannel">
>>>
>>> <Membership className="org.apache.catalina.tribes.membership.McastService"
>>> address="228.0.0.3"
>>> port="45566"
>>> frequency="500"
>>> dropTime="3000"/>
>>> <Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
>>> address="192.168.30.54"
>>> port="3100"
>>> autoBind="100"
>>> selectorTimeout="5000"
>>> maxThreads="6"/>
>>>
>>> <Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
>>> <Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>
>>> </Sender>
>>> <Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
>>> <Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/>
>>> <Interceptor className="org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor"/>
>>> </Channel>
>>> <Valve className="org.apache.catalina.ha.tcp.ReplicationValve" filter="" statistics="true"/>
>>> <Valve className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>
>>>
>>> <Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer"
>>> tempDir="/usr/local/tomcat/webapps/tempdir"
>>> deployDir="/usr/local/tomcat/webapps/"
>>> watchDir="/usr/local/tomcat/watchdir/"
>>> watchEnabled="false"/>
>>>
>>> <ClusterListener className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"/>
>>> <ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener"/>
>>>
>>> </Cluster>
>>>
>>> </Host>
>>> </Engine>
>>>
>>> All works fine.
>>>
>>> I try to add a new war file in the master node folder "/usr/local/tomcat/watchdir/", after few seconds, the war is correctly deployed on both nodes.
>>> Now i try to add a third node configured exactily as the slave (i just change the IP address of receiver to match with the one of the machine). In the master node log, i can see a new member is added, with the correct IP, but the war already deployed on the cluster aren't deployed on the new node.
>>>
>>> * Question : *
>>> What's the way to be able to auto deploy on new node without restart the master node ? (when i restart the master node, all the nodes of the cluster are OK).
>> Did you try to deploy the app again after the new node has joined?
>>
>>
>> p
>>
>>
>>> Best regards
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 6.0.35 : Cluster and new node
Posted by Pid * <pi...@pidster.com>.
On 26 Dec 2011, at 14:33, "Cédric SAMSON" <ce...@adeuxi.com> wrote:
> Hi all,
>
>
> Context :
> I have a cluster with 2 nodes (both on linux).
>
> * The master node is configured as below : *
>
> <Engine name="Catalina" defaultHost="localhost" jvmRoute="Tomcat-1">
> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
>
> <Host name="localhost" appBase="webapps"
> unpackWARs="true" autoDeploy="true"
> xmlValidation="false" xmlNamespaceAware="false">
>
> <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster" channelSendOptions="8">
>
> <Manager className="org.apache.catalina.ha.session.DeltaManager"
> expireSessionsOnShutdown="false"
> notifyContainerListenersOnReplication="true"
> notifySessionListenersOnReplication="true"
> notifyListenersOnReplication="true"/>
>
> <Channel className="org.apache.catalina.tribes.group.GroupChannel">
>
> <Membership className="org.apache.catalina.tribes.membership.McastService"
> address="228.0.0.3"
> port="45566"
> frequency="500"
> dropTime="3000"/>
> <Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
> address="192.168.30.51"
> port="3100"
> autoBind="100"
> selectorTimeout="5000"
> maxThreads="6"/>
>
> <Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
> <Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>
> </Sender>
> <Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
> <Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/>
> <Interceptor className="org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor"/>
> </Channel>
> <Valve className="org.apache.catalina.ha.tcp.ReplicationValve" filter="" statistics="true"/>
> <Valve className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>
>
> <Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer"
> tempDir="/usr/local/tomcat/webapps/tempdir"
> deployDir="/usr/local/tomcat/webapps/"
> watchDir="/usr/local/tomcat/watchdir/"
> watchEnabled="true"/>
>
> <ClusterListener className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"/>
> <ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener"/>
>
> </Cluster>
>
> </Host>
> </Engine>
>
> * The slave node is configured as below : *
The term 'slave' is an odd one to use here.
> <Engine name="Catalina" defaultHost="localhost" jvmRoute="Tomcat-1">
> <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>
>
> <Host name="localhost" appBase="webapps"
> unpackWARs="true" autoDeploy="true"
> xmlValidation="false" xmlNamespaceAware="false">
>
> <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster" channelSendOptions="8">
>
> <Manager className="org.apache.catalina.ha.session.DeltaManager"
> expireSessionsOnShutdown="false"
> notifyContainerListenersOnReplication="true"
> notifySessionListenersOnReplication="true"
> notifyListenersOnReplication="true"/>
>
> <Channel className="org.apache.catalina.tribes.group.GroupChannel">
>
> <Membership className="org.apache.catalina.tribes.membership.McastService"
> address="228.0.0.3"
> port="45566"
> frequency="500"
> dropTime="3000"/>
> <Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
> address="192.168.30.54"
> port="3100"
> autoBind="100"
> selectorTimeout="5000"
> maxThreads="6"/>
>
> <Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
> <Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>
> </Sender>
> <Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
> <Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/>
> <Interceptor className="org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor"/>
> </Channel>
> <Valve className="org.apache.catalina.ha.tcp.ReplicationValve" filter="" statistics="true"/>
> <Valve className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>
>
> <Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer"
> tempDir="/usr/local/tomcat/webapps/tempdir"
> deployDir="/usr/local/tomcat/webapps/"
> watchDir="/usr/local/tomcat/watchdir/"
> watchEnabled="false"/>
>
> <ClusterListener className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"/>
> <ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener"/>
>
> </Cluster>
>
> </Host>
> </Engine>
>
> All works fine.
>
> I try to add a new war file in the master node folder "/usr/local/tomcat/watchdir/", after few seconds, the war is correctly deployed on both nodes.
> Now i try to add a third node configured exactily as the slave (i just change the IP address of receiver to match with the one of the machine). In the master node log, i can see a new member is added, with the correct IP, but the war already deployed on the cluster aren't deployed on the new node.
>
> * Question : *
> What's the way to be able to auto deploy on new node without restart the master node ? (when i restart the master node, all the nodes of the cluster are OK).
Did you try to deploy the app again after the new node has joined?
p
> Best regards
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org