Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 7422 invoked from network); 25 Feb 2003 14:30:36 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 25 Feb 2003 14:30:36 -0000 Received: (qmail 29416 invoked by uid 97); 25 Feb 2003 14:32:12 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@nagoya.betaversion.org Received: (qmail 29409 invoked from network); 25 Feb 2003 14:32:12 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 25 Feb 2003 14:32:12 -0000 Received: (qmail 3752 invoked by uid 500); 25 Feb 2003 14:29:23 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 3708 invoked from network); 25 Feb 2003 14:29:23 -0000 Received: from mail.pmh.com (HELO pmh-mail.fh.pmh.com) (209.119.86.10) by daedalus.apache.org with SMTP; 25 Feb 2003 14:29:23 -0000 Received: by mail.pmh.com with Internet Mail Service (5.5.2653.19) id <17XAACNW>; Tue, 25 Feb 2003 09:29:26 -0500 Message-ID: <83F0258A9996D311B14200A0C98F173602F22F54@aas-internet.aas.com> From: "Turner, John" To: 'Tomcat Users List' Subject: RE: crontab problems Date: Tue, 25 Feb 2003 09:29:15 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Yes, Tomcat is generally very stable. But: Trust, but verify. ;) John > -----Original Message----- > From: Hannes Schmidt [mailto:mail@schmidt-net.via.t-online.de] > Sent: Tuesday, February 25, 2003 9:23 AM > To: Tomcat Users List > Subject: Re: crontab problems > > > Yes, using wget is probably the second best solution. The > best one is to > find the reason why Tomcat crashes at all, since it generally > is a stable > and reliable product. > > Cron doesn't execute more than once a minute (at least mine > doesn't) which > still is quite often. 5 or 10 minutes would be ok too. But > that's a matter > of taste, really. > > ----- Original Message ----- > From: "Turner, John" > To: "'Tomcat Users List'" > Sent: Tuesday, February 25, 2003 3:00 PM > Subject: RE: crontab problems > > > > > > Agreed...using a Java program to watch Tomcat seems a > little circular. > > Plus, I don't see any sort of delay or "sleep" in the poster's JAva > > code...it looks like it just keeps hammering at Tomcat, as > the cron job is > > "* * * * *". Creating all those Runtime objects over and > over can't be > > helping performance any. > > > > A simple shell script using wget would be fine...sure, you > can watch the > > output of "ps -ef", but that doesn't tell you if Tomcat is accepting > > requests or not. There could be an entry for Tomcat in the > process table, > > but Tomcat could be refusing requests. > > > > I just write a simple JSP page that outputs the contents of > a variable, > like > > "***SUCCESS***" or something like that, then use wget to > grab that page > > every so often and check for the string in the output...if > it's there, > > things should be OK (there are no guarantees). If it's > not, you have a > > problem. This way, the JSP page is compiled and cached by > Tomcat, it uses > > very little memory, and doesn't bog down the server. > > > > There are plenty of other alternatives much more robust > than a simple > shell > > script...you could use Netsaint/Nagios, Big Brother, and a > whole bunch of > > others. > > > > John > > > > > -----Original Message----- > > > From: Hannes Schmidt [mailto:mail@schmidt-net.via.t-online.de] > > > Sent: Tuesday, February 25, 2003 6:29 AM > > > To: Tomcat Users List > > > Subject: Re: crontab problems > > > > > > > > > Right, you might also just put > > > > > > JAVA_HOME=... > > > > > > at the beginning of your crontab. > > > > > > I assume you have good reasons to use a Java program to > watch Tomcat. > > > Personally, I would have written a shell script. If you > > > really want to use > > > Java, you might want to use a different, more reliable > > > approach to detect > > > (un)availability of Tomcat, something like > > > > > > import java.net.*; > > > URL url = new URL( "http://localhost:8080/examples" ); > > > URLConnection con = url.openConnection(); > > > con.setUseCaches( false ); > > > con.connect(); > > > if( con.getContentLength() > 0 ) { > > > // restart tomcat > > > } > > > > > > But I just wrote this out of my head ... > > > > > > ----- Original Message ----- > > > From: "Ralph Einfeldt" > > > To: "Tomcat Users List" > > > Sent: Tuesday, February 25, 2003 10:43 AM > > > Subject: RE: crontab problems > > > > > > > > > You have to make shure that your script retstart_tomcat > > > sets and exports all needed environment variables before > > > calling ./startup.sh: > > > > > > JAVA_HOME=/usr/local/java/jdk1.3.1 > > > CATALINA_HOME= > > > CATALINA_BASE= or $CATALINA_HOME > > > # JAVA_OPTS='-client -v' > > > > > > export JAVA_HOME CATALINA_HOME CATALINA_BASE JAVA_OPTS > > > ./startup.sh > > > > > > > -----Original Message----- > > > > From: Ayhan Peker [mailto:ayhan@image-data.com] > > > > Sent: Tuesday, February 25, 2003 10:30 AM > > > > To: tomcat-user@jakarta.apache.org > > > > Subject: crontab problems > > > > > > > > but the last two lines returns > > > > ///////////////////////// > > > > The JAVA_HOME environment variable is not defined > > > > message.. > > > > ///////////////////////// > > > > my retstart_tomcat scrip is > > > > #!/bin/sh > > > > cd /usr/local/tomcat/bin > > > > ./startup.sh > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > > > For additional commands, e-mail: > tomcat-user-help@jakarta.apache.org > > > > > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > > > For additional commands, e-mail: > tomcat-user-help@jakarta.apache.org > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org