monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: monit and tomcat


From: Roedel, Mark
Subject: RE: monit and tomcat
Date: Tue, 12 Jun 2007 17:29:42 -0500

When starting Tomcat using monit – does the /var/run/tomcat.pid file get updated?  Is there anything interesting or useful in Tomcat’s logs?  (One possibility that occurs to me – is JAVA_HOME set appropriately in monit’s environment?)

 

(For the record, monit does monitor and occasionally successfully restart tomcat instances on our network.)

 

--

Mark Roedel

Senior Programmer / Analyst

LeTourneau University

Longview, Texas 

 


From: address@hidden [mailto:address@hidden On Behalf Of Chris Salem
Sent: Tuesday, June 12, 2007 9:22 AM
To: address@hidden
Subject: monit and tomcat

 

Hello,

 

I'm new to monit and I'm trying to monitor tomcat, I just want to restart tomcat if it crashes.  When I start the monit daemon and run 'monit start tomcat' sometimes it says tomcat starts and sometimes it says tomcat failed to start, but in either case tomcat does not start.  Same thing with doing it from the web interface.  Here's my monitrc file:

 

 set daemon  120
 set httpd port 2812 and
     use address localhost  # only accept connection from localhost
     allow localhost        # allow localhost to connect to the server and

  check process tomcat with pidfile "/var/run/tomcat.pid"
    start program = "/etc/init.d/tomcat start"
    stop program  = "/etc/init.d/tomcat stop"
    if failed port 8080 protocol http then restart
    if 3 restarts within 5 cycles then timeout
    group server

 

I also attached the log file that it produces.  I confirmed that starting tomcat does create a pid file when calling the command "/etc/init.d/tomcat start" and it does remove the pid file when calling stop.  Also I'm using the latest version of CentOS and monit 4.9.1 64 bit. 

Any ideas?

Thanks

size=2 width="100%" align=center>


Spam
Not spam
Forget previous vote


reply via email to

[Prev in Thread] Current Thread [Next in Thread]