Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 22897 invoked from network); 6 Aug 2010 14:45:07 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 Aug 2010 14:45:07 -0000 Received: (qmail 52233 invoked by uid 500); 6 Aug 2010 14:45:03 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 51688 invoked by uid 500); 6 Aug 2010 14:45:00 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 51669 invoked by uid 99); 6 Aug 2010 14:45:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Aug 2010 14:45:00 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [76.96.59.228] (HELO qmta15.westchester.pa.mail.comcast.net) (76.96.59.228) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Aug 2010 14:44:52 +0000 Received: from omta02.westchester.pa.mail.comcast.net ([76.96.62.19]) by qmta15.westchester.pa.mail.comcast.net with comcast id r0kJ1e0020QuhwU5F2kXDW; Fri, 06 Aug 2010 14:44:31 +0000 Received: from [192.168.1.6] ([96.231.238.70]) by omta02.westchester.pa.mail.comcast.net with comcast id r2kP1e0011XpYlL3N2kRND; Fri, 06 Aug 2010 14:44:29 +0000 Message-ID: <4C5C1FC5.1060108@christopherschultz.net> Date: Fri, 06 Aug 2010 10:44:21 -0400 From: Christopher Schultz User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.7) Gecko/20100713 Thunderbird/3.1.1 MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Is FarmWarDeployer is working? References: <380-2201085692822886@M2W133.mail2web.com> In-Reply-To: <380-2201085692822886@M2W133.mail2web.com> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Shammi, On 8/6/2010 5:28 AM, shammi@arosys.com wrote: > I have created two instances of tomcat7 in the same machine. First > time I am using FarmWarDeployer. I only knows that using this we can > deploy our application in one node in the tomcat cluster rather than > deploying in all the nodes. Unfortunately, there isn't much documentation on the FarmWarDeployer. Here's what I've been able to find: http://tomcat.apache.org/tomcat-7.0-doc/cluster-howto.html ...which gives a configuration example: It also says: " The default tomcat cluster supports farmed deployment, ie, the cluster can deploy and undeploy applications on the other nodes. The state of this component is currently in flux but will be addressed soon. There was a change in the deployment algorithm between Tomcat 5.0 and 5.5 and at that point, the logic of this component changed to where the deploy dir has to match the webapps directory. For more info, Please visit the reference documentation " I suspect the phrase "the cluster" in the first sentence really means "one particular node in the cluster". The "reference documentation" mention at the end is currently blank :( There is also, of course, the javadoc: http://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/ha/deploy/FarmWarDeployer.html The documentation seems all messed-up: The javadoc says "deployDir - the directory where we watch for changes" and "applicationDir - the directory where we install applications" but it's clear that the former is where the apps are installed, the latter is fictional, and the real "watch directory" is called "watchDir". > Then after some reading what I did is : > I created /tmp/war-deploy , /tmp/war-app , /tmp/war-listen and /war-temp > directories. Good. What is /tmp/war-app for? What does your element look like? I suspect something like this: > I started the tomcat. Here is the portion of the catalina.out file. > > 6 Aug, 2010 12:46:37 PM org.apache.catalina.ha.deploy.FarmWarDeployer start > INFO: Cluster deployment is watching /tmp/war-listen/ for changes. > 6 Aug, 2010 12:46:37 PM org.apache.catalina.ha.deploy.FarmWarDeployer start > INFO: Cluster FarmWarDeployer started. > I understood that FarmWarDeployer started to work. Looks good. > Now the following message is in the catalina.out in every 20 sec. > > INFO: check cluster wars at /tmp/war-listen > 6 Aug, 2010 12:53:23 PM org.apache.catalina.ha.deploy.WarWatcher check Sounds like it's polling that directory, which would appear to be normal operation (though that IMO should probably be a DEBUG message, and not INFO). > Now when I copy my webapplication in the /war-deploy , /tmp/war-app , then > there is no changes in the catalina.out log file. Don't do that: the only place you should put your file is in /tmp/war-listen. > But when I copy my > application in /tmp/war-listen/ directory following message appears in the > log file : > > 6 Aug, 2010 1:01:56 PM org.apache.catalina.ha.deploy.WarWatcher check > INFO: check cluster wars at /tmp/war-listen > 6 Aug, 2010 1:01:56 PM org.apache.catalina.ha.deploy.FarmWarDeployer > fileModified > INFO: Installing webapp[/sessionReplication2] from > /tmp/war-deploy/sessionReplication2.war > 6 Aug, 2010 1:01:56 PM org.apache.catalina.ha.deploy.FarmWarDeployer remove > INFO: Cluster wide remove of web app /sessionReplication2 This is probably because it's undeploying the webapp you deployed improperly by copying it into the /tmp/war-deploy directory. > 6 Aug, 2010 1:02:16 PM org.apache.catalina.ha.deploy.WarWatcher check > INFO: check cluster wars at /tmp/war-listen Try stopping all instances of Tomcat, removing all files from /tmp/war-*, deleting all of Tomcat's "work" directories, and then starting all Tomcat instances. Then, copy your WAR file into /tmp/war-listen and see what happens. It's unclear to me whether the configuration on all of the nodes in the cluster should be the same. For instance, if you have two Tomcat instances on the same server with watchDir=/tmp/war-listen, then both instances will be watching the same directory and trying to deploy to the cluster. They are likely to interfere with each other. Consider using /tmp/war-listen_1 and /tmp/war_listen_2, and /tmp/war-deploy_1 and /tmp/war_deploy_2, etc. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxcH8UACgkQ9CaO5/Lv0PCJXQCePplQfy3bdJy5uhJ7PzKPcdOa 6ZIAoL4NE5NvJM4FG+4Hl46RN5LbX1yE =KfyE -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org