-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Konstantin,
On 1/20/15 12:06 PM, Konstantin Kolinko wrote: > 2015-01-13 21:38 GMT+03:00 Théo Chamley <theo...@mley.fr>: >> Hello, >> >> I have setup a Tomcat cluster and I am now trying to get the >> FarmWarDeployer to work. However, it seems that the Deployer >> never checks my watchDir and therefore never finds my new wars to >> deploy. >> >> When starting Tomcat, the logs indicate that the Deployer is >> started: 13-Jan-2015 19:21:43.942 INFO [Catalina-startStop-1] >> org.apache.catalina.ha.deploy.FarmWarDeployer.start Cluster >> deployment is watching [/my/watch/dir/] for changes. 13-Jan-2015 >> 19:21:43.942 INFO [Catalina-startStop-1] >> org.apache.catalina.ha.deploy.FarmWarDeployer.start Cluster >> FarmWarDeployer started. >> >> But nothing more, even for extended periods of time after putting >> my ROOT.war inside my watchDir. >> >> I checked the source code >> (https://github.com/apache/tomcat80/blob/trunk/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java), >> >> and it seems that the check must be done once every two "backgroundProcess" >> calls, but I don't understand when this function is supposed to >> be called or if there is a way to force the check. >> >> I feel like I am missing something obvious... >> >> >> Here is my config: Oracle JDK 1.8.0_25 Tomcat 8.0.15 server.xml: >> <Host name="www.exemple.com" appBase="/my/app/base" >> unpackWARs="true" autoDeploy="true" >>> >> <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster" >> channelSendOptions="6"> <Manager >> className="org.apache.catalina.ha.session.BackupManager" >> expireSessionsOnShutdown="false" >> notifyListenersOnReplication="true" mapSendOptions="6"/> >> <Channel >> className="org.apache.catalina.tribes.group.GroupChannel"> >> <Membership >> className="org.apache.catalina.tribes.membership.McastService" >> address="228.0.0.4" port="45564" frequency="500" dropTime="3000" >> bind="10.0.0.1"/> <Receiver >> className="org.apache.catalina.tribes.transport.nio.NioReceiver" >> address="10.0.0.1" port="5000" selectorTimeout="100" >> 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=".*.gif|.*.js|.*.jpeg|.*.jpg|.*.png|.*.css|.*.txt"/> > > Note "." before file name extension has to be escaped to mean a > literal '.' instead of "any-character" pattern, ".*\.gif" etc. Fortunately, regex . any-character also includes ".". So this configuration is merely misleading, not incorrect. >> <Deployer >> className="org.apache.catalina.ha.deploy.FarmWarDeployer" >> tempDir="/my/temp/dir/" deployDir="/my/app/base/" >> watchDir="/my/listen/dir/" watchEnabled="true"/> > > I wonder why there are two getter methods for watchEnabled property > in FarmWarDeployer, > > [[[ public boolean isWatchEnabled() { return watchEnabled; } > > public boolean getWatchEnabled() { return watchEnabled; } > > public void setWatchEnabled(boolean watchEnabled) { > this.watchEnabled = watchEnabled; } ]]] Because humans often want getBooleanProperty, but Java Beans usually have isBooleanProperty. >> <ClusterListener >> className="org.apache.catalina.ha.session.ClusterSessionListener"/> >> >> </Cluster> >> </Host> >> > >> The logs now show that the listen dir is checked, but nothing >> more, even if I repeatedly "touch" the ROOT.war file. And > from >> the source code, I won't have more information from the logs… >> Could the mount options of the file system influence the result? >> My partition is mounted with >> rw,nosuid,nodev,noexec,noatime,nodiratime,data=ordered. > >> 19-Jan-2015 12:04:27.956 FINE [ContainerBackgroundProcessor[ > StandardEngine[Catalina]]] > org.apache.catalina.ha.deploy.WarWatcher.check check cluster wars > at /my/watch/dir > > > Note that message says "/my/watch/dir", but the configuration > above uses "/my/listen/dir/". Good catch. Something isn't right, here. > What are access permissions for the directory and for the file. > Is there search permission on the directory, is the file readable? > > E.g. if the directory is not readable File.listFiles() returns > null, but the code interprets it as an empty list, silently > proceeding further. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJUvswUAAoJEBzwKT+lPKRYfSIP/A9+QxLtLnh30eDXGTk586ci yCOVBo/EzLZADItNzIVhaHWj9lwq8rQHlsjNHEumqlEPK/9esxbbaJ4SMRfCiCty K3/rwWJC3DgHJmv6sA8GWqlUIM8Cie4mBKV00Tv5aekNLfa8stzzCNjTkQ4bSg8y iQgYu1K4JoYkEcp9WmrZpk/95SA57UQLs1D5s1ftYsu6Y8lFTMq30IMrnvCu8aLy dJS4SmGc3NbvPt7dVdEo41+WvM0o/m+H+QScrE8kgXVGGbsNPb2kwG943xD29vxu L1LG1hYwh6pT0hson9B6fd7ZAwjL9rbSZJ28g3TeVpahYH9I6kOPRadt6T186ndn zLhkkU2xDvqh8ePzgfqAJCkyc0W7eVnlA5Ju7JIPeh/oAq6Yf+MzGdY8c33JcMN0 s38oTxRbL+24MaOrIbkhTDdepeYPVut8PiVj8gg5qrM9X2Zvxfinr2qZ9s8Ptvpl FHcwdOacXMtxs76dMgIAdpGOoxnCCq7IgekUXtVilp2TE4wzv3dHo/n5TnZEKsJH qVTFiW5J+jtIdAhpqkzs86CyX7VTwZdUA4bmS7CPT69OSFaK034GKDEfmB3AFUlu 6OWB8+08t6DE7yGjYNYL6VcOi+weTtvxIUbNi6yB/u5TVkUD4dDx8AkdgNIVlbC/ RM1OzgA6i7bibv6ioMhU =EMe2 -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org