Re: Does anyone have an approach to checking if Tomcat instance is UP?

2007-08-22 Thread Goldstein, Barry A
I have a script that checks to make sure that Tomcat is listening on the appropriate port. #!/bin/bash ... main() { ... chktomcat tomcat1 chktomcat tomcat2 ... } ... chktomcat() { netstat -a | grep $1 > /dev/null 2>&1 RC=$? if (( RC == 0 )

Re: Does anyone have an approach to checking if Tomcat instance is UP?

2007-08-22 Thread Peter Stavrinides
In what context?? over the network?, over the web?, on the server? There is a portion of the shell script used in a Linux implementation for Tomcat 5.5 that checks for the running process: if start-stop-daemon --test --start --pidfile "$CATALINA_PID" \ --user $TOMCAT5_USER --sta

Re: Does anyone have an approach to checking if Tomcat instance is UP?

2007-08-21 Thread Smith Norton
No - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Does anyone have an approach to checking if Tomcat instance is UP?

2007-08-21 Thread Nelson, Tracy M.
| From: Kim Albee [mailto:[EMAIL PROTECTED] | Sent: Tuesday, 21 August, 2007 12:49 | | We use a monitoring tool that has the automated checks for the application | JVM and we can set different threshholds there -- but I've got to be able | to | have the check run by the load balancer know that the

Re: Does anyone have an approach to checking if Tomcat instance is UP?

2007-08-21 Thread Kim Albee
Everyone -- thanks for all the ideas and feedback. We've attempted to take the approach with our health.jsp to check the major functions in our application -- so if we can do a database request, that checks a bunch of things - and returns without error lets us know that our application is functio

Re: Does anyone have an approach to checking if Tomcat instance is UP?

2007-08-21 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Kim, Kim Albee wrote: > The JSP does a call to a method in our app -- which if it runs, that means > the app is up and available -- the method does a simple query against the DB > and then returns a status of OK if the method runs through just fine. >

Re: Does anyone have an approach to checking if Tomcat instance is UP?

2007-08-21 Thread Paul Singleton
Jeff Hoffmann wrote: Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dan, Dan Armbrust wrote: A simple cron job that points to a URL using lynx, and greps the output for what it should see will do the trick... I would use wget instead of Lynx, but that's just me. D

Re: Does anyone have an approach to checking if Tomcat instance is UP?

2007-08-21 Thread Paul Singleton
Kim Do you have reason to believe that the OutOfMemory exception is due to: * some cumulative effect (e.g. memory leak), in which case you need to restart, preferably (just) before it happens * the qty of active sessions, so you need to load-balance when near some threshold (offload to

Re: Does anyone have an approach to checking if Tomcat instance is UP?

2007-08-20 Thread Kim Albee
Tracy, The JSP does a call to a method in our app -- which if it runs, that means the app is up and available -- the method does a simple query against the DB and then returns a status of OK if the method runs through just fine. In our example from this weekend -- the health.jsp (which is the one

Re: Does anyone have an approach to checking if Tomcat instance is UP?

2007-08-20 Thread Kim Albee
Dan, True enough, except then those queries would get held as a user session, and we don't want that -- which is why we have a 'skinny' health.jsp that checks our app -- and 'should' crash if there are any issues with tomcat or the application -- but in this case, the main pages were getting out o

RE: Does anyone have an approach to checking if Tomcat instance is UP?

2007-08-20 Thread Brian.Horblit
nn [mailto:[EMAIL PROTECTED] -->Sent: Monday, August 20, 2007 10:25 AM -->To: Tomcat Users List -->Subject: Re: Does anyone have an approach to checking if -->Tomcat instance is UP? [stuff deleted...] -->If what you're concerned about is an OOME, you can have a -->JSP tha

Re: Does anyone have an approach to checking if Tomcat instance is UP?

2007-08-20 Thread Jeff Hoffmann
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dan, Dan Armbrust wrote: A simple cron job that points to a URL using lynx, and greps the output for what it should see will do the trick... I would use wget instead of Lynx, but that's just me. Don't forget that the O

Re: Does anyone have an approach to checking if Tomcat instance is UP?

2007-08-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dan, Dan Armbrust wrote: > A simple cron job that points to a URL using lynx, and greps the > output for what it should see will do the trick... I would use wget instead of Lynx, but that's just me. Don't forget that the OP said that his JSPs appear

RE: Does anyone have an approach to checking if Tomcat instance is UP?

2007-08-20 Thread Nelson, Tracy M.
How is your JSP checking your application? Are you issuing a request to your app and checking the HTTP status? If so, why isn't it recognizing the 500? Or is the JSP in your application which is failing? | -Original Message- | From: Kim Albee [mailto:[EMAIL PROTECTED] | Sent: Monday, 20

Re: Does anyone have an approach to checking if Tomcat instance is UP?

2007-08-20 Thread Dan Armbrust
A simple cron job that points to a URL using lynx, and greps the output for what it should see will do the trick... Dan On 8/20/07, Kim Albee <[EMAIL PROTECTED]> wrote: > Hello -- > > We have a load balanced situation, and we have a JSP that runs and checks > our application to ensure it's up and

Does anyone have an approach to checking if Tomcat instance is UP?

2007-08-20 Thread Kim Albee
Hello -- We have a load balanced situation, and we have a JSP that runs and checks our application to ensure it's up and returns a string that the monitor app is looking for if all is well. Repeatedly, that JSP will work, but the site is down because Tomcat hit an OutOfMemory exception -- but our