You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Vicente Tarín Font <vt...@csd.com.es> on 2008/06/09 09:17:59 UTC

Problem with FarmWarDeployer

Hi guys!

I have a little problem with the FarmWarDeployer. Im using Tomcat 6.0.16
(win32), and I have 2 instances on the same machine. All is working ok
except when I try to deploy a war file.=20

I have this cluster config(this is for node 2, node 1 only changes ports =
and
dirs):

<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster">

<Manager className="org.apache.catalina.ha.session.BackupManager"
expireSessionsOnShutdown="false"
notifyListenersOnReplication="true"
mapSendOptions="8"/>

<Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer"
tempDir="C:/Archivos de programa/Apache Software
Foundation/Cluster/N2/temp/war-temp/"
deployDir="C:/Archivos de programa/Apache Software
Foundation/Cluster/N2/webapps/"
watchDir="C:/Archivos de programa/Apache Software
Foundation/Cluster/N2/temp/war-listen/"
watchEnabled="true"/>


<Channel className="org.apache.catalina.tribes.group.GroupChannel">
<Sender
className="org.apache.catalina.tribes.transport.ReplicationTransmitter"=
>
<Transport
className="org.apache.catalina.tribes.transport.nio.PooledParallelSende=
r"
timeout="15000"/>						</Sender>
</Channel>
</Cluster>

I drop the war on node 1 dir:
C:/Archivos de programa/Apache Software
Foundation/Cluster/N2/temp/war-listen

The FarmDeployer listener detects the change and deploys the war ok on =
node 1, but I fails deploying on node 2, I get this message:

09-jun-2008 8:38:07 org.apache.catalina.ha.deploy.FarmWarDeployer
messageReceived
GRAVE: Unable to read farm deploy file message.
java.io.IOException: Write error
	at java.io.FileOutputStream.writeBytes(Native Method)
	at java.io.FileOutputStream.write(FileOutputStream.java:260)
	at
org.apache.catalina.ha.deploy.FileMessageFactory.writeMessage(FileMessage=
Fac
tory.java:209)
	at
org.apache.catalina.ha.deploy.FarmWarDeployer.messageReceived(FarmWarDepl=
oye
r.java:233)
	at
org.apache.catalina.ha.tcp.SimpleTcpCluster.messageReceived(SimpleTcpClus=
ter
.java:899)
	at
org.apache.catalina.ha.tcp.SimpleTcpCluster.messageReceived(SimpleTcpClus=
ter
.java:880)
	at
org.apache.catalina.tribes.group.GroupChannel.messageReceived(GroupChanne=
l.j
ava:269)
	at
org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(C=
han
nelInterceptorBase.java:79)
	at
org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(C=
han
nelInterceptorBase.java:79)
	at
org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.messageR=
ece
ived(TcpFailureDetector.java:110)
	at
org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(C=
han
nelInterceptorBase.java:79)
	at
org.apache.catalina.tribes.group.ChannelCoordinator.messageReceived(Chann=
elC
oordinator.java:241)
	at
org.apache.catalina.tribes.transport.ReceiverBase.messageDataReceived(Rec=
eiv
erBase.java:225)
	at
org.apache.catalina.tribes.transport.nio.NioReplicationTask.drainChannel(=
Nio
ReplicationTask.java:188)
	at
org.apache.catalina.tribes.transport.nio.NioReplicationTask.run(NioReplic=
ati
onTask.java:91)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor=
.ja
va:885)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.jav=
a:9
07)
	at java.lang.Thread.run(Thread.java:619)
....
09-jun-2008 8:38:07 org.apache.catalina.startup.HostConfig deployWAR
INFO: Despliegue del archivo prueba1.war de la aplicaci=F3n web
09-jun-2008 8:38:07 org.apache.catalina.startup.ContextConfig init
GRAVE: Exception fixing docBase: {0}=20
java.util.zip.ZipException: invalid END header (bad central directory
offset)
	at java.util.zip.ZipFile.open(Native Method) ...


I think Tomcat is trying to deploy the file when it is still being = written
, but I dont know how to fix that, maybe I can change a timeout attr or
something? Ive tried setting  backgroundProcessorDelay to 60, but it =
doesn=92t solve the problem.

Please help me!

 

__________ Información de ESET NOD32 Antivirus, versión de la base de firmas
de virus 2945 (20080313) __________

ESET NOD32 Antivirus ha comprobado este mensaje.
http://www.eset.com
 


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Problem with FarmWarDeployer

Posted by Filip Hanik - Dev Lists <de...@hanik.com>.
no work has been done on the farm deployer, and I can't say it has been 
working reliably in 5.5 and 6.0
work and patches are welcome

Filip

Vicente Tarín Font wrote:
> Hi guys!
>
> I have a little problem with the FarmWarDeployer. Im using Tomcat 6.0.16
> (win32), and I have 2 instances on the same machine. All is working ok
> except when I try to deploy a war file.=20
>
> I have this cluster config(this is for node 2, node 1 only changes ports =
> and
> dirs):
>
> <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster">
>
> <Manager className="org.apache.catalina.ha.session.BackupManager"
> expireSessionsOnShutdown="false"
> notifyListenersOnReplication="true"
> mapSendOptions="8"/>
>
> <Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer"
> tempDir="C:/Archivos de programa/Apache Software
> Foundation/Cluster/N2/temp/war-temp/"
> deployDir="C:/Archivos de programa/Apache Software
> Foundation/Cluster/N2/webapps/"
> watchDir="C:/Archivos de programa/Apache Software
> Foundation/Cluster/N2/temp/war-listen/"
> watchEnabled="true"/>
>
>
> <Channel className="org.apache.catalina.tribes.group.GroupChannel">
> <Sender
> className="org.apache.catalina.tribes.transport.ReplicationTransmitter"=
>   
> <Transport
> className="org.apache.catalina.tribes.transport.nio.PooledParallelSende=
> r"
> timeout="15000"/>						</Sender>
> </Channel>
> </Cluster>
>
> I drop the war on node 1 dir:
> C:/Archivos de programa/Apache Software
> Foundation/Cluster/N2/temp/war-listen
>
> The FarmDeployer listener detects the change and deploys the war ok on =
> node 1, but I fails deploying on node 2, I get this message:
>
> 09-jun-2008 8:38:07 org.apache.catalina.ha.deploy.FarmWarDeployer
> messageReceived
> GRAVE: Unable to read farm deploy file message.
> java.io.IOException: Write error
> 	at java.io.FileOutputStream.writeBytes(Native Method)
> 	at java.io.FileOutputStream.write(FileOutputStream.java:260)
> 	at
> org.apache.catalina.ha.deploy.FileMessageFactory.writeMessage(FileMessage=
> Fac
> tory.java:209)
> 	at
> org.apache.catalina.ha.deploy.FarmWarDeployer.messageReceived(FarmWarDepl=
> oye
> r.java:233)
> 	at
> org.apache.catalina.ha.tcp.SimpleTcpCluster.messageReceived(SimpleTcpClus=
> ter
> .java:899)
> 	at
> org.apache.catalina.ha.tcp.SimpleTcpCluster.messageReceived(SimpleTcpClus=
> ter
> .java:880)
> 	at
> org.apache.catalina.tribes.group.GroupChannel.messageReceived(GroupChanne=
> l.j
> ava:269)
> 	at
> org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(C=
> han
> nelInterceptorBase.java:79)
> 	at
> org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(C=
> han
> nelInterceptorBase.java:79)
> 	at
> org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.messageR=
> ece
> ived(TcpFailureDetector.java:110)
> 	at
> org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(C=
> han
> nelInterceptorBase.java:79)
> 	at
> org.apache.catalina.tribes.group.ChannelCoordinator.messageReceived(Chann=
> elC
> oordinator.java:241)
> 	at
> org.apache.catalina.tribes.transport.ReceiverBase.messageDataReceived(Rec=
> eiv
> erBase.java:225)
> 	at
> org.apache.catalina.tribes.transport.nio.NioReplicationTask.drainChannel(=
> Nio
> ReplicationTask.java:188)
> 	at
> org.apache.catalina.tribes.transport.nio.NioReplicationTask.run(NioReplic=
> ati
> onTask.java:91)
> 	at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor=
> .ja
> va:885)
> 	at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.jav=
> a:9
> 07)
> 	at java.lang.Thread.run(Thread.java:619)
> ....
> 09-jun-2008 8:38:07 org.apache.catalina.startup.HostConfig deployWAR
> INFO: Despliegue del archivo prueba1.war de la aplicaci=F3n web
> 09-jun-2008 8:38:07 org.apache.catalina.startup.ContextConfig init
> GRAVE: Exception fixing docBase: {0}=20
> java.util.zip.ZipException: invalid END header (bad central directory
> offset)
> 	at java.util.zip.ZipFile.open(Native Method) ...
>
>
> I think Tomcat is trying to deploy the file when it is still being = written
> , but I dont know how to fix that, maybe I can change a timeout attr or
> something? Ive tried setting  backgroundProcessorDelay to 60, but it =
> doesn=92t solve the problem.
>
> Please help me!
>
>  
>
> __________ Información de ESET NOD32 Antivirus, versión de la base de firmas
> de virus 2945 (20080313) __________
>
> ESET NOD32 Antivirus ha comprobado este mensaje.
> http://www.eset.com
>  
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
>   


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org