[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Application fails to start.
From: |
jbelant |
Subject: |
Re: Application fails to start. |
Date: |
Tue, 29 Mar 2005 10:54:52 -0600 |
User-agent: |
Mozilla Thunderbird 1.0 (X11/20041206) |
Martin Pala wrote:
Hello,
can you try following steps?
1.) start your application manualy using your script
I've modified the script based on Jan-Henrik's recommendation. Here is
the modified script.
case $1 in
start)
cd /home/eminer/cA3Server
echo $$ > /var/run/cA3Server.pid;
exec /home/eminer/cA3Server/cA3Server > /dev/tty6
;;
stop)
kill `cat /var/run/cA3Server.pid`
rm /var/run/cA3Server.pid
;;
*)
echo "usage: rc.a3server {start|stop}" ;;
esac
2.) provide 'ps -ef | grep A3Server'
address@hidden:/home/eminer/cA3Server# ps -ef|grep cA3Server
root 10181 9992 0 10:47 pts/3 00:00:00
/home/eminer/cA3Server/cA3Server
root 10183 9933 0 10:47 pts/2 00:00:00 grep cA3Server
3.) provide 'cat /var/run/cA3Server.pid' output
address@hidden:/home/eminer/cA3Server# cat /var/run/cA3Server.pid
10181
4.) start monit in debug mode ... using '-v' option
address@hidden:/home/eminer/bin# monit -v
monit: Debug: Adding net allow '9.8.7.6'.
monit: Debug: Adding net allow '1.2.3.4'.
monit: Debug: Adding host allow 'localhost' (127.0.0.1).
Runtime constants:
Control file = /etc/monitrc
Log file = /tmp/monitlog
Pid file = /var/run/monit.pid
Debug = True
Log = True
Use syslog = False
Is Daemon = True
Use process engine = True
Poll time = 120 seconds
Mail server(s) = localhost
Mail from = (not defined)
Mail subject = (not defined)
Mail message = (not defined)
Start monit httpd = True
httpd bind address = Any/All
httpd portnumber = 443
httpd signature = True
Use ssl encryption = False
httpd auth. style = Host/Net allow list
Alert mail to = address@hidden
Alert on = All events
The service list contains the following entries:
Process Name = mail
Group = (not defined)
Pid file = /var/run/sendmail.pid
Monitoring mode = active
Start program = /etc/rc.d/rc.sendmail start
Stop program = /etc/rc.d/rc.sendmail stop
Pid = if changed then alert
Ppid = if changed then alert
Timeout = If 2 restart within 3 cycles then unmonitor
else if recovered then alert
Process Name = apache
Group = (not defined)
Pid file = /var/run/httpd.pid
Monitoring mode = active
Start program = /etc/rc.d/rc.httpd start
Stop program = /etc/rc.d/rc.httpd stop
Pid = if changed then alert
Ppid = if changed then alert
Timeout = If 2 restart within 3 cycles then unmonitor
else if recovered then alert
Process Name = ssh
Group = (not defined)
Pid file = /var/run/sshd.pid
Monitoring mode = active
Start program = /etc/rc.d/rc.sshd start
Stop program = /etc/rc.d/rc.sshd stop
Pid = if changed then alert
Ppid = if changed then alert
Timeout = If 2 restart within 3 cycles then unmonitor
else if recovered then alert
Process Name = A3Server
Group = (not defined)
Pid file = /var/run/cA3Server.pid
Monitoring mode = active
Start program = /home/eminer/bin/rc.a3server start
Stop program = /home/eminer/bin/rc.a3server stop
Pid = if changed then alert
Ppid = if changed then alert
Timeout = If 2 restart within 3 cycles then unmonitor
else if recovered then alert
-------------------------------------------------------------------------------
Starting monit daemon with http interface at [*:443]
I'm not sure yet where the problem is, but i think it may be either:
- race condition between you startup script pidfile creation section and
monit process start watching thread
- or inconsistency in pidfile and real process pid
My modified script works fine from a command prompt. Monit doesn't like it.
Thanks for your help so far,
Jim