Getting it to the master watch directory is done via samba.  The master
prematurely begins copying it around to the rest of the nodes.  1 or more of
them often ends up with an incomplete .war file.

Build: Windows XP / W2K3
Ant: deploy via copy via samba

This fails some non-zero % of the time as described previously.  I would
guess that if the copy happens entirely within the window tomcat is waiting
(6 seconds?) then it will work correctly, but if tomcat wakes up part way
through the transfer then I think it will fail.

And while I think the copy / move suggestion is a fine one, I haven't tried
it, but I guess I can.  Probably even can be done from ant (I know copy
works.)

I wish I could give more specifics, but I can't.  If I have a chance, I will
try and figure out exactly what happens when.  I can say with 100% certainty
that copying from the Linux side (pull) has never failed.

Can you (Filip) tell me if you expect that a copy / overwrite of an existing
.war should re-deploy?  I can't find a statement which indicates what the
behavior should be, so I always rm the old file and copy the new one over
some time later (to insure the web app is GC'd and the connection pools are
shut down.)

Tim

-----Original Message-----
From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED] 
Sent: Sunday, May 21, 2006 9:42 PM
To: Tomcat Users List
Subject: Re: Ant deploy task and cluster-wide (farm) deployment

but you don't need to use samba, Tomcat will transfer the file for you.
all you need to do is to copy it to the "watch" directory on the master 
(watch enabled).
Then tomcat will copy it to the other tomcat's. without using samba, and 
without corrupting the file

Filip


Tim Lucia wrote:
> Push or pull, when it gets there, it gets there correctly (md5sum-s
match).
> The problem, I think, is that the file appears in the file system before
it
> is received in its entirety.  I don't know why -- maybe the nature of
samba
> is to write, close, open-for-append, ... ?  If I copy FROM Linux ("pull")
> then I do not have this problem, it's only when pushing to the linux file
> system mounted via samba from Windows.  I've tried this numerous times,
> because I have a strong desire to automate the build and deploy process as
> much as possible -- saves me from having to do it myself ;-)  I haven't
100%
> isolated the exact circumstances. 
>
> Even if the push model worked (i.e., ant copy tasks) how can I know for
> certain when the old is undeployed and when the new is deployed?  And
> speaking of that, should I simply be able to overwrite and have it
redeploy?
> I've not seen that work -- sometimes it does, sometimes it doesn't, and
> because it is a push, it suffers from the sample problem as above.
>
> For the record, the source is a Windows XP and/or W2K3 NTFS and the target
> is RHEL V.4.  Tomcat 5.5.12, JDK 1.5_05.
>
> Tim
>
> -----Original Message-----
> From: Martin Gainty [mailto:[EMAIL PROTECTED] 
> Sent: Sunday, May 21, 2006 8:09 PM
> To: Tomcat Users List
> Subject: Re: Ant deploy task and cluster-wide (farm) deployment
>
> Tim-
>
> I found the majority of transfer programs transfer text not binary..this
is 
> especially problematic when transferring from Windows to Nix
> As a war is a binary I would make sure that the transferring program is
not 
> interjecting LF with CR and or treating the transferred war unit as text
>
> Martin -
>
> This email message and any files transmitted with it contain confidential
> information intended only for the person(s) to whom this email message is
> addressed.  If you have received this email message in error, please
notify
> the sender immediately by telephone or email and destroy the original
> message without making a copy.  Thank you.
>
> ----- Original Message ----- 
> From: "Tim Lucia" <[EMAIL PROTECTED]>
> To: "'Tomcat Users List'" <users@tomcat.apache.org>
> Sent: Sunday, May 21, 2006 5:06 PM
> Subject: RE: Ant deploy task and cluster-wide (farm) deployment
>
>
>   
>> I have observed that if I build on windows, and copy FROM windows to
Linux,
>> Tomcat will prematurely begin transferring the war file to the rest of
the
>> cluster.  The master tomcat will end up with a correct war file, and the
>> other will get a corrupt or truncated one.
>>
>> Also, there is no synchronous way to remove the old war, know that it is
>> undeployed from all tomcats in the cluster, and then you know you can 
>> deploy
>> the new war.  I guess I could have it sleep for 30 seconds or so, but
even
>> that is no guarantee.  I haven't found that copy with overwrite 
>> consistently
>> triggers the copy.
>>
>> I'm guessing this is a samba issue, but due to circumstances beyond my
>> control, our build machine is running windows and I can't change it.  At
>> least with the manager application, when control returns to ant, the app 
>> is
>> definitely (and reliably) undeployed.
>>
>> Tim
>>
>>
>> -----Original Message-----
>> From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
>> Sent: Sunday, May 21, 2006 7:55 AM
>> To: Tomcat Users List
>> Subject: Re: Ant deploy task and cluster-wide (farm) deployment
>>
>> yes, farm deployment is triggered by simplying copying a WAR into the
>> "watch" directory, with ant that would be using the copy task
>> Filip
>>
>>
>> Tim Lucia wrote:
>>     
>>> Is it possible to deploy to a cluster using the deploy task?  (i.e., can
>>>       
>> it
>>     
>>> be done using /manager/html?)  I think not (I can't find any way to do
>>>       
>> it.)
>>     
>>> If no, are there any plans to support this in the future?
>>>
>>> I ask because I have found that production re-deployment is an
unreliable
>>> process when you have to rely on deleting and copying war files across a
>>> network share.  I'd like to avoid having to keep a list of cluster 
>>> members
>>> around in order to undeploy and deploy to each one.
>>>
>>> Thanks,
>>> Tim
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to