I checked FarmWarDeployer's code.
When WAR is updated, FarmWarDeployer sends UndeployMessage and sends
FileMessage after that.
The node which received UndeployMessage undeploys war.
The node which received FileMessage deploys war.

If FileMessage is received while processing UndeployMessage, the
following error messages will be outputted.
"SEVERE: Application /example in used. touch war file example.war again!"

In the case of asynchronous replication (default), FileMessage may be
received while processing UndeployMessage.

I think that it may be better to process updated war by one message.
Although I consider correction of a code, there is one work around.

Workaround is change in synchronous mode.

Please try the following.
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
channelSendOptions="6">


2011/10/21 Marco Betti <m.be...@gmail.com>:
> Tried also on Tomcat 7.0.22
>
> Same behaviour: when i restart node1, FarmWarDeployer undeploy my war both
> from node1 and node2, but re-deploy it only on node1.
> If I touch my war in my watchDir on node1, tomcat redeploys it correctly on
> both nodes...
>
> Is tomcat clustering used?
>
> If so, does anybody use FarmWarDeployer  ?
>
> Many thanks,
> Marco
>
>
>
> On Thu, Oct 20, 2011 at 6:21 PM, Marco Betti <m.be...@gmail.com> wrote:
>
>> Hi all,
>> I'm new to the list.
>> I'm trying to configure tomcat 6.0.33 clustering.
>> Session replication is ok.
>> I've a problem with FarmWarDeployer.
>> I found that:
>>
>> 1. You have to place the <Cluster> node under the <Host> element.
>>
>> Tomcat 6.0.x complains that the element Cluster/Deployer element is not
>> understood at the Engine level.
>>
>> 2. One node needs to have watchEnabled="true", all other nodes
>> watchEnabled="false"
>>
>> 3. deployDir is the same as appBase
>>
>>
>> and after I found this post that confirmed these points to me:
>>
>> http://www.mail-archive.com/users@tomcat.apache.org/msg80374.html
>>
>> The problem is the following:
>> let node1 be the master (watchEnabled="true") and node2 the slave
>> (watchEnabled="false")
>> This is my configuration:
>> <Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer"
>>
>> tempDir="/appserv/tomcat/tomcat60/apache-tomcat-6.0.33/server/clu001node01/temp/"
>>
>> deployDir="/appserv/tomcat/tomcat60/apache-tomcat-6.0.33/server/clu001node01/webapps/"
>>
>> watchDir="/appserv/tomcat/tomcat60/apache-tomcat-6.0.33/server/clu001node01/farm/"
>>                     watchEnabled="true"/>
>>
>>
>> If I copy a war to watchDir of node1 evertything works fine and cluster
>> deploy is achieved.
>>
>> When i restart node1, FarmWarDeployer undeploy my war both from node1 and
>> node2, but re-deploy it only on node1.
>>
>> node1 log:
>>
>> INFO: Cluster wide remove of web app /example
>> Oct 20, 2011 5:50:46 PM org.apache.catalina.startup.HostConfig
>> checkResources
>> INFO: Undeploying context [/example]
>> Oct 20, 2011 5:50:46 PM org.apache.catalina.startup.HostConfig deployWAR
>> INFO: Deploying web application archive example.war
>>
>>
>> node2 log:
>>
>> INFO: Undeploying context [/example]
>> Oct 20, 2011 5:50:47 PM org.apache.catalina.ha.deploy.FarmWarDeployer
>> messageReceived
>> SEVERE: Application /example in used. touch war file example.war again!
>>
>>
>> Obviously, if I touch my war in my watchDir on node1, tomcat redeploys it
>> correctly on both nodes... but this cannot be the solution...
>>
>>
>> Is it a known problem?
>>
>> Could anyone help me?
>>
>> Many thanks,
>> Marco
>>
>



-- 
Keiichi.Fujino

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to