Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm currently working on a Tomcat Cluster for Q&A, but unfortunatly, it seems that the auto deploy of a war across this cluster is not working at all.

I know the cluster is working perfectly because each server are receiving correctly the multicast communications and are aware of any missing host instantly.

The problem here is coming from the FarmWarDeployer function which seems to not working.

Indeed, when I upload a war, using the tomcat manager, or a simple SFTPd push, on the node1 of my cluster, the war is unpacked and used by the node1, but, it's not sent to my node 2. Instead, my node1 is saying:

WARNING: Manager [localhost#/APPTest##1.0.0]: No context manager send at 9/14/12 5:21 PM received in 103 ms.

and my node2 is claiming:

WARNING: Context manager doesn't exist:localhost#/APPTest##1.0.0

well, my APPTest is correctly set with the tag and the cluster is correctly receiving session if I manually push the application on the node2.

So, about me, the problem is coming from my FarmWarDeployer Settings which are:

103     <Engine name="Catalina" defaultHost="localhost">
107         <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
108                  channelSendOptions="8">
110           <Manager className="org.apache.catalina.ha.session.DeltaManager"
111                    expireSessionsOnShutdown="false"
112                    notifyListenersOnReplication="true"/>
114           <Channel className="">
115             <Membership className="org.apache.catalina.tribes.membership.McastService"
116                         address=""
117                         port="45564"
118                         frequency="500"
119                         dropTime="3000"/>
120             <Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
121                       address="auto"
122                       port="4000"
123                       autoBind="100"
124                       selectorTimeout="5000"
125                       maxThreads="6"/>
127             <Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
128               <Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>
129             </Sender>
130             <Interceptor className=""/>
131             <Interceptor className=""/>
132           </Channel>
134           <Valve className="org.apache.catalina.ha.tcp.ReplicationValve"
135                  filter=""/>
136           <Valve className="org.apache.catalina.ha.session.JvmRouteBinderValve"/>
138           <Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer"
139                     tempDir="/opt/tomcat/temp/"
140                     deployDir="/opt/tomcat/webapps/"
141                     watchDir="/opt/tomcat/webapps/"
142                     watchEnabled="enable"/>
144           <ClusterListener className="org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener"/>
145           <ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener"/>
146         </Cluster>
148       <Realm className="org.apache.catalina.realm.LockOutRealm">
149         <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
150                resourceName="UserDatabase"/>
151       </Realm>
153       <Host name="localhost"  appBase="webapps"
154             unpackWARs="true" autoDeploy="true">
155       </Host>
156     </Engine>

About me there is nothing too strange for a testing cluster, but I'm definitly not a tomcat expert.

So, if something is wrong or missing, let me know ;-)

share|improve this question
Ok, so I repair the FarmWarDeployer, indeed, the cluster tag was not correctly put into the Host tag, so, now, I've a fully working cluster, I mean, it's correctly communicating, and FarmWarDeployer seems to be OK now because when I upload a War, the cluster try to distribute it. BUT, it's not working, when I push my Webapp on node1, it's not starting and just sending a bunch of stack claiming that the War is corrupt. I've just test to send my war to a standalone server and everything is running fine. So, I don't know where my problem is coming from. FYI the distributable tag is well insert – Dr I Sep 18 '12 at 8:47
up vote 1 down vote accepted

FarmWarDeployer can be configured at host level cluster only. Cluster settings move into the <Host>...</Host>. It work for me.

share|improve this answer
Yeah, I noticed that a while ago as I said it on my previous answer below my question. But thanks for your answer which is well explain for any other people which are looking for something similar. – Dr I Mar 31 '15 at 8:36

Your watchDir and deployDir should not be the same location. When tomcat sees a change it will attempt to download this and will have an incomplete stream since nothing is instant. This will cause the errors you are seeing in war deployment. The same scenario could be replicated if you try to scp a war straight to the deploy directory. You first need to stage on the server and than deploy.

Try adding another directory for the watchDir param and than attempt to deploy to that directory and all nodes should pick that up.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.