Re: Restart-On-Failure for Tomcat?

2005-02-10 Thread Robert McIntosh
Hi Paul,

I hope you don't mind the direct e-mail.  Would you mind sharing your
wget script?

Thanks,
Robert


On Sat, 05 Feb 2005 23:02:50 -0600, Paul [EMAIL PROTECTED] wrote:
 I would suggest either a process monitor or using cron to run script
 every minute or so that would use wget to get a test page and if it
 fails, restart tomcat.  I've been using the latter of the two with good
 success for a while.
 
 Of course, I'm assuming your using Linux or the like, but if you're on
 Win then you can set the recovery options under services.
 
 I'm not aware of anything inherent in Tomcat.
 
 Regards,
 -Paul
 
 
 Robert McIntosh wrote:
 
 Hi,
 
 I'm supporting a web application running on Apache (2.0x)
 /Tomcat(5.0.x) w/ mod-jk.  The web application seems to cause Tomcat
 (5.0.28) to fail on average once a week.  Restarting tomcat tends to
 do the trick, however this is in a production enviornment.
 
 I've been looking for a restart-on-failure script or inherent
 feature in Tomcat that can perform this.   Please forward me
 information on how to monitor Tomcat for error conditions and restart
 the application.
 
 Thanks!
 Robert
 [EMAIL PROTECTED]
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Restart-On-Failure for Tomcat?

2005-02-10 Thread Martin Grotzke
hello,

i also have the problem that my tomcat stops does not respond,
and this more than once a day.

i'm currently looking for the cause of the problem, so i wrote
a monitoring script that collects the top-output, does
a thread-dump on the tomcat-process and performs a `netstat -p -n`,
and finally sends this information via email.
configuration is hold by a configuration file, whereas these days
i put more and more configuration into the script itself, so
separation of concerns is broken :)

you can place the script in /etc/init.d/ and register it via chkconfig,
configurations are placed in the conf-file and in the top of
the monitoring-script, you should adapt all to your needs.

as i don't know if attachments are handled properly by this list, i
put the script on my website, so you can find it here too:
http://www.javakaffee.de/jspwiki/Wiki.jsp?page=ServerSideDevelopment

i hope it's helpful,
cheers,
martin
 


On Thu, 2005-02-10 at 12:12 -0800, Robert McIntosh wrote:
 Hi Paul,
 
 I hope you don't mind the direct e-mail.  Would you mind sharing your
 wget script?
 
 Thanks,
 Robert
 
 
 On Sat, 05 Feb 2005 23:02:50 -0600, Paul [EMAIL PROTECTED] wrote:
  I would suggest either a process monitor or using cron to run script
  every minute or so that would use wget to get a test page and if it
  fails, restart tomcat.  I've been using the latter of the two with good
  success for a while.
  
  Of course, I'm assuming your using Linux or the like, but if you're on
  Win then you can set the recovery options under services.
  
  I'm not aware of anything inherent in Tomcat.
  
  Regards,
  -Paul
  
  
  Robert McIntosh wrote:
  
  Hi,
  
  I'm supporting a web application running on Apache (2.0x)
  /Tomcat(5.0.x) w/ mod-jk.  The web application seems to cause Tomcat
  (5.0.28) to fail on average once a week.  Restarting tomcat tends to
  do the trick, however this is in a production enviornment.
  
  I've been looking for a restart-on-failure script or inherent
  feature in Tomcat that can perform this.   Please forward me
  information on how to monitor Tomcat for error conditions and restart
  the application.
  
  Thanks!
  Robert
  [EMAIL PROTECTED]
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
-- 
Martin Grotzke
Hohenesch 38, 22765 Hamburg
Tel.  +49 (0) 40.39905668
Mobil +49 (0) 170.9365656
E-Mail[EMAIL PROTECTED]
Onlinehttp://www.javakaffee.de


watchtomcat
Description: application/shellscript
#
# The configuration file for watchtomcat
# 
# $Id: watchtomcat.conf.baseserver.com 94 2004-03-18 21:15:38Z grotzke $
#

# for curl checking
#CHECK_URL=http://www.javakaffee.de/jspwiki/Wiki.jsp?page=Main;
CHECK_URL=http://tomcat.baseserver.net;
SEARCH_WORD=wordtosearchfor  # for which word shall be searched in the 
CHECK_URL-document?
EXPECTED_WC_L=3# how many lines are expected to be found with 
the given SEARCH_WORD?

[EMAIL PROTECTED]# where to send notifications


signature.asc
Description: This is a digitally signed message part


Re: Restart-On-Failure for Tomcat?

2005-02-10 Thread Martin Grotzke
On Thu, 2005-02-10 at 23:30 +0100, Martin Grotzke wrote:
 hello,
 
 i also have the problem that my tomcat stops does not respond,
 and this more than once a day.
 
 i'm currently looking for the cause of the problem, so i wrote
 a monitoring script that collects the top-output, does
 a thread-dump on the tomcat-process and performs a `netstat -p -n`,
 and finally sends this information via email.
ha, i forgot to mention that it restarts tomcat, too  ;)

cheers,
martin


 configuration is hold by a configuration file, whereas these days
 i put more and more configuration into the script itself, so
 separation of concerns is broken :)
 
 you can place the script in /etc/init.d/ and register it via chkconfig,
 configurations are placed in the conf-file and in the top of
 the monitoring-script, you should adapt all to your needs.
 
 as i don't know if attachments are handled properly by this list, i
 put the script on my website, so you can find it here too:
 http://www.javakaffee.de/jspwiki/Wiki.jsp?page=ServerSideDevelopment
 
 i hope it's helpful,
 cheers,
 martin
  
 
 
 On Thu, 2005-02-10 at 12:12 -0800, Robert McIntosh wrote:
  Hi Paul,
  
  I hope you don't mind the direct e-mail.  Would you mind sharing your
  wget script?
  
  Thanks,
  Robert
  
  
  On Sat, 05 Feb 2005 23:02:50 -0600, Paul [EMAIL PROTECTED] wrote:
   I would suggest either a process monitor or using cron to run script
   every minute or so that would use wget to get a test page and if it
   fails, restart tomcat.  I've been using the latter of the two with good
   success for a while.
   
   Of course, I'm assuming your using Linux or the like, but if you're on
   Win then you can set the recovery options under services.
   
   I'm not aware of anything inherent in Tomcat.
   
   Regards,
   -Paul
   
   
   Robert McIntosh wrote:
   
   Hi,
   
   I'm supporting a web application running on Apache (2.0x)
   /Tomcat(5.0.x) w/ mod-jk.  The web application seems to cause Tomcat
   (5.0.28) to fail on average once a week.  Restarting tomcat tends to
   do the trick, however this is in a production enviornment.
   
   I've been looking for a restart-on-failure script or inherent
   feature in Tomcat that can perform this.   Please forward me
   information on how to monitor Tomcat for error conditions and restart
   the application.
   
   Thanks!
   Robert
   [EMAIL PROTECTED]
   
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   
   
   
   
   
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   
  
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
-- 
Martin Grotzke
Hohenesch 38, 22765 Hamburg
Tel.  +49 (0) 40.39905668
Mobil +49 (0) 170.9365656
E-Mail[EMAIL PROTECTED]
Onlinehttp://www.javakaffee.de


signature.asc
Description: This is a digitally signed message part


RE: Restart-On-Failure for Tomcat?

2005-02-07 Thread James Richardson



 -Original Message-
 From: Trond G. Ziarkowski [mailto:[EMAIL PROTECTED]
 Sent: 07 February 2005 07:57
 To: tomcat-user@jakarta.apache.org
 Subject: Re: Restart-On-Failure for Tomcat?
 
 Hi!
 
 Someone mentioned on this list a while ago that Java Service Wrapper is
 capable of doing this. Haven't tested it myself but you can check it out
 at http://wrapper.tanukisoftware.org/
 
 Trond
 

Alternatively, you might consider writing a persistent jini wrapper around
tomcat.

This would also allow you to autodiscover tomcat instances, and be alerted
on state changes etc.

It would be a bit of coding though

James
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Restart-On-Failure for Tomcat?

2005-02-06 Thread Trond G. Ziarkowski
Hi!
Someone mentioned on this list a while ago that Java Service Wrapper is 
capable of doing this. Haven't tested it myself but you can check it out 
at http://wrapper.tanukisoftware.org/

Trond
Robert McIntosh wrote:
Hi,
I'm supporting a web application running on Apache (2.0x)
/Tomcat(5.0.x) w/ mod-jk.  The web application seems to cause Tomcat
(5.0.28) to fail on average once a week.  Restarting tomcat tends to
do the trick, however this is in a production enviornment.
I've been looking for a restart-on-failure script or inherent
feature in Tomcat that can perform this.   Please forward me
information on how to monitor Tomcat for error conditions and restart
the application.
Thanks!
Robert
[EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Restart-On-Failure for Tomcat?

2005-02-05 Thread Robert McIntosh
Hi,

I'm supporting a web application running on Apache (2.0x)
/Tomcat(5.0.x) w/ mod-jk.  The web application seems to cause Tomcat
(5.0.28) to fail on average once a week.  Restarting tomcat tends to
do the trick, however this is in a production enviornment.

I've been looking for a restart-on-failure script or inherent
feature in Tomcat that can perform this.   Please forward me
information on how to monitor Tomcat for error conditions and restart
the application.

Thanks!
Robert
[EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Restart-On-Failure for Tomcat?

2005-02-05 Thread Paul
I would suggest either a process monitor or using cron to run script 
every minute or so that would use wget to get a test page and if it 
fails, restart tomcat.  I've been using the latter of the two with good 
success for a while.

Of course, I'm assuming your using Linux or the like, but if you're on 
Win then you can set the recovery options under services.

I'm not aware of anything inherent in Tomcat.
Regards,
-Paul
Robert McIntosh wrote:
Hi,
I'm supporting a web application running on Apache (2.0x)
/Tomcat(5.0.x) w/ mod-jk.  The web application seems to cause Tomcat
(5.0.28) to fail on average once a week.  Restarting tomcat tends to
do the trick, however this is in a production enviornment.
I've been looking for a restart-on-failure script or inherent
feature in Tomcat that can perform this.   Please forward me
information on how to monitor Tomcat for error conditions and restart
the application.
Thanks!
Robert
[EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]