Hi, Darryl.
I understood that Tomcat cannot output specific words when tomcat terminated
abnormally.
I will write a servlet that outputs specific words. I will write a script to call it periodically. The script outputs error log
when specific words are not output.
Thank you very much.
----- Original Message -----
From: "Darryl Lewis" <darryl.le...@unsw.edu.au>
To: "Tomcat Users List" <users@tomcat.apache.org>; "Tomcat Users List"
<users@tomcat.apache.org>
Sent: Sunday, March 20, 2011 8:20 PM
Subject: Re: How to detect down of tomcat.
The other problem will be that tomcat is running, but the application is not responding. There may be nothing in the logs for
this, and this is one of my most common issues.
In this case, I use some custom scripts to simulate a log in and check for an
expected string in the return.
On 20/03/11 10:11 PM, "André Warnier" <a...@ice-sa.com> wrote:
The basic problem with "abnormal termination", is that whatever you may think
of, may not
be called, if the termination is really abnormal.
And also : define "abnormal".
Hide wrote:
Hi, Darryl.
Thanks for your advice.
My explanation seems to have been bad.
I explain it a little more.
It is a method to output the information of the abnormal termination in
"catalina.log" that I want to know.
Would you teach it if you know some method?
Thank you.
----- Original Message ----- From: "Darryl Lewis"
<darryl.le...@unsw.edu.au>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Sunday, March 20, 2011 12:17 PM
Subject: Re: How to detect down of tomcat.
You could write something similar using windows powershell. Do you have
that installed on your server?
On 20/03/11 2:14 PM, "Hide" <hide3...@ob4.aitai.ne.jp> wrote:
Hi, Darryl.
Thanks for your advice.
Your script looks like very useful.
But in my case, tomcat is running on Microsoft Windows.
I am looking for a method to detect the down of tomcat by log file.
----- Original Message -----
From: "Darryl Lewis" <darryl.le...@unsw.edu.au>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Sunday, March 20, 2011 12:00 PM
Subject: Re: How to detect down of tomcat.
Put this in a cronjob to fire every minute
#!/bin/sh
if [ `ps -ef|grep tomcat|grep -v grep|wc -l` -lt 1 ]
then
subject=`tomcat down; date`
address="m...@domain.com"
ps -ef>att.txt
mail -s "$subject" "$addr" -- -fno-reply@yourdomain< att.txt
fi
Fill in the address with your email address, and you can also pipe an
attachment
For myself, I have scripts that detects when the service is down, sends
me an email, then tries to restart it, then will email
if it has managed to recover it. If it can't restart it after 5 minutes,
then I get an SMS.
In the morning, I can quickly see if it failed overnight, and my beauty
rest only gets disturbed in the really bad cases.
On 20/03/11 1:38 PM, "Hide" <hide3...@ob4.aitai.ne.jp> wrote:
How to detect down of tomcat.
Helo.
My environment is tomcat7, java1.6, windows.
When process of tomcat terminated abnormally,
is there any method or setting that output the abnormal termination to a
log file?
If there is it, please let me know.
tomcat is the premise that is not service of windows, but even service
is good.
The motive that wants to know such a thing is because I want to detect
down of tomcat in automatically without human operation.
I set a file and keyword in a log monitor tool, and it detects down of
tomcat automatically.
Thanks for your advice.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org