Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 63415 invoked from network); 6 Aug 2010 16:03:59 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 Aug 2010 16:03:59 -0000 Received: (qmail 9779 invoked by uid 500); 6 Aug 2010 16:03:55 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 9688 invoked by uid 500); 6 Aug 2010 16:03:55 -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 9679 invoked by uid 99); 6 Aug 2010 16:03:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Aug 2010 16:03:55 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [68.142.237.91] (HELO n6.bullet.re3.yahoo.com) (68.142.237.91) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 06 Aug 2010 16:03:47 +0000 Received: from [68.142.237.90] by n6.bullet.re3.yahoo.com with NNFMP; 06 Aug 2010 16:03:26 -0000 Received: from [66.196.114.74] by t6.bullet.re3.yahoo.com with NNFMP; 06 Aug 2010 16:03:25 -0000 Received: from [127.0.0.1] by omp303.mail.re3.yahoo.com with NNFMP; 06 Aug 2010 16:03:25 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 861732.10510.bm@omp303.mail.re3.yahoo.com Received: (qmail 26207 invoked by uid 60001); 6 Aug 2010 16:03:25 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1281110605; bh=Oo9KpOQ8k/bPk8E6ilP9fNa0FDtFp8Be6uY/ONDqKNk=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=keD+7+pLJ2gw1nxunsCApmTjHYK4/lbg3Zm7LMZKu4nSlhoiTOEPWZNmSZV/dDBkuleRB5PleJ7KxL0KxhB0svfsWWdvJemWth+4WBMvt2alaiNOHePzB7QLy+cRR+96AWADBn7NtE07VNW8+78IFSHBHeohkLgx/x6UvT2L1ng= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=6cv7EgPBbfY2KqhUfIfcDXUFr+QCP96UBiyAwq6m1bjI/0vfjvUuv9ueu4A0gdGAp0Cytv6TepxIH/pUliSz5u9TWJyKV0VIxpaFG5uLzQ25iVUZkdxlpQFFc1kjf5o98HgddgNHLJ8tWzWTgYxHS2QKixFdo155CyZyXz6l1Io=; Message-ID: <709303.25483.qm@web56602.mail.re3.yahoo.com> X-YMail-OSG: fWZBOFsVM1lMZewYOH7hpvV0UW7CFy2Ok_bjlPO2tpBcW1o lTdgj1fZfmXTSPUzU3Dhs3Hju_m2nxZF2zUZs9OnrMnb0DMCd5F1ZkqcDwpy zJAigfAAB3s5wu09Lh74rbC18JpJAeu4atdNMSKtuu.2h16SZTjyXD4u7.Q0 kB61M_rSqyH_G7Ums6UWykJTxfVhY9ab7FgQd78gixlotYDVkfthwRXB6W3k en0OQA1hK.1lE4IHkPEA6ikTS2hHWKZcPIdNRKRjeHT8kKZKQwMtdEmVoRJo Tyldk5pgKPfOUTSuN6c5cmvWU5T.MaRnOKtCnqeO_aZ51HsWunOaIKPvKHQE af5bKtTp1Bwq1wDzNh24- Received: from [71.129.42.244] by web56602.mail.re3.yahoo.com via HTTP; Fri, 06 Aug 2010 09:03:25 PDT X-Mailer: YahooMailRC/459 YahooMailWebService/0.8.105.279950 References: <380-2201085692822886@M2W133.mail2web.com> <4C5C1FC5.1060108@christopherschultz.net> Date: Fri, 6 Aug 2010 09:03:25 -0700 (PDT) From: Mark Eggers Subject: Re: Is FarmWarDeployer is working? To: Tomcat Users List In-Reply-To: <4C5C1FC5.1060108@christopherschultz.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Shammi, I have something working for 3 Tomcat 6.0.29 nodes on Fedora 13 using Sun JRE/JDK 1.6.0_21. I've not tried undeploying a web application yet. Here's what I've found so far on Tomcat 6.0.29. 1. You have to place the node under the element. Tomcat 6.0.29 complains that the element Cluster/Deployer element is not understood at the Engine level. 2. One node needs to have watchEnabled="true", all other nodes watchEnabled="false" 3. deployDir is the same as appBase This last is a guess, but it seemed logical (and works). Based on my reading of the scant documentation, the war file gets deployed there for Tomcat to run (hence the deployDir name). There is some noise in the documentation about deploying ROOT in this fashion, but I've not experimented with that yet. I've not read the javadoc (yet) nor looked through the source code (on my list of things to do). So basically, here's my Deployer configuration for a three node cluster running on one machine (fronted by Apache and load balanced via mod_jk). Deployment node: a. Change the [name] to fit your implementation or leave out the elements. b. Change $CATALINA_BASE/name to be your absolute path to the directory [a-host-name] [another-host-name] Other nodes: a. Same notes apply - change [name] to suit your implementation or leave out b. Replace $CATALINA_BASE with the absolute path to the directory [a-host-name] [another-host-name] I haven't tried this on the subversion trunk, and I've seen some recent commits to the clustering components. Hopefully this will get you started. . . . . just my two cents /mde/ ----- Original Message ---- From: Christopher Schultz To: Tomcat Users List Sent: Fri, August 6, 2010 7:44:21 AM Subject: Re: Is FarmWarDeployer is working? -----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 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org