monit-general
[Top][All Lists]
Advanced

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

Re: PID file being removed


From: Martin Pala
Subject: Re: PID file being removed
Date: Thu, 28 Aug 2003 13:12:41 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030711

Hi,

the problem is probably caused in your mysql startup script, which probably removes it. Monit is not able to remove the monitored service's pidfile (until instructed to do so via exec statement which is not this case).

Please:

1.) attach your mysql rc script - we can figure out where and why it removed the pidfile.

2.) optionaly trace the process as described in FAQ.txt distributed with monit, it could help to see the actions/environment which preceded to start method execution and the cause why monit decided to start mysql though it was running before monit started (which is not normal - there must be some reason for it - it works in 3.2 well).

3.) run monit in verbose mode ('-v' command line option)


If it is problem for you to do any of above hints, please send kindly just some of these informations.


Thanks for feedback :)
Martin


Shannon E. Reall wrote:

I recently upgraded to 3.2 and am now having a problem monitoring mysqld. Here is that portion of the conf file:

check mysql with pidfile /usr/local/mysql/var/sun07.pid
timeout(3,3)
start program = "/etc/init.d/mysql start"
stop program = "/etc/init.d/mysql stop"
alert address@hidden on { timeout }
alert address@hidden on { restart }

The pid file exists before I start monit but then it disappears. Here is what I did for testing:

address@hidden:/# ps -ef |grep mysql
mysql 455 1 0 18:05:55 ? 0:01 /usr/local/mysql/libexec/mysqld
   root 23227 19786  0 07:47:11 pts/3    0:00 grep mysql

address@hidden:/# echo 455 > /usr/local/mysql/var/sun07.pid

address@hidden:/# ls -l /usr/local/mysql/var/sun07.pid
-rw-r--r-- 1 root other 4 Aug 22 07:47 /usr/local/mysql/var/sun07.pid

address@hidden:/# /usr/local/bin/monit -d 60
Starting monit daemon

address@hidden:/# tail /var/log/monit
[EDT Aug 22 07:37:20] Starting monit daemon
[EDT Aug 22 07:39:44] Stopping monit HTTP server
[EDT Aug 22 07:39:44] monit daemon with pid [22123] killed
[EDT Aug 22 07:43:28] Starting monit daemon
[EDT Aug 22 07:43:28] start: (mysql) /etc/init.d/mysql
[EDT Aug 22 07:44:28] monit: Warning process 'mysql' was not started
[EDT Aug 22 07:44:29] Stopping monit HTTP server
[EDT Aug 22 07:44:29] monit daemon with pid [23002] killed
[EDT Aug 22 07:47:47] Starting monit daemon
[EDT Aug 22 07:47:47] start: (mysql) /etc/init.d/mysql
[EDT Aug 22 07:48:47] monit: Warning process 'mysql' was not started

address@hidden:/# ls -l /usr/local/mysql/var/sun07.pid
/usr/local/mysql/var/sun07.pid: No such file or directory

Am I missing something?  Thanks for any help you can provide.







reply via email to

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