[Top][All Lists]

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

Help restarting tomcat

From: John Bertrand
Subject: Help restarting tomcat
Date: Tue, 15 Jan 2013 12:00:06 -0800
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130107 Thunderbird/17.0.2

Hi, monit noob here.  I'd like to know if it's possible to have monit pause
for a few moments after it runs the start command, allowing tomcat to fully boot before it continues with health checks. Right now after is invoked, monit immediately trys to check the service and gets an error. I'd like it to wait for the service to fully start before continuing the

Here is a trace from the logs
[PST Jan 15 11:48:05] error : 'tomcat' failed, cannot open a connection to INET[tomcat:80/sample/test.html] via TCP [PST Jan 15 11:48:05] info : 'tomcat' start: /data/apache-tomcat/bin/ [PST Jan 15 11:48:05] error : 'tomcat' failed, cannot open a connection to INET[tomcat:80] via TCP [PST Jan 15 11:49:05] info : 'tomcat' connection succeeded to INET[tomcat:80/sample/test.html] via TCP

Here is my logic. I'm trying to start tomcat if it's not running, and if it is running, I'll poll a status page which I can use for checksum.

   check host tomcat with address
    start program = "/data/apache-tomcat/bin/"
    stop  program = "/data/apache-tomcat/bin/"
if failed host tomcat port 80 and protocol http with timeout 60 seconds 3 cycles
       then start
    if failed host tomcat  port 80
        protocol HTTP request "/sample/test.html"
           with timeout 60 seconds retry 3
            then start

reply via email to

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