[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
changing pidfile causes /etc/init.d/monit start/stop to not work
From: |
brian |
Subject: |
changing pidfile causes /etc/init.d/monit start/stop to not work |
Date: |
Sat, 26 Jul 2014 16:30:42 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 |
When I change the pidfile, </etc/init.d/monit stop> does not work. I
can still see the monit process running when I do <ps -ef | grep monit>.
Also </etc/init.d/monit start> does not work. Here is the output:
----------------------------------
address@hidden Desktop]# /etc/init.d/monit start
Starting monit (via systemctl): Job for monit.service failed. See
'systemctl status monit.service' and 'journalctl -xn' for details.
[FAILED]
address@hidden monit-5.8.1]# systemctl -l status monit.service
monit.service - SYSV: Monit is a utility for managing and monitoring
processes,
Loaded: loaded (/etc/rc.d/init.d/monit)
Active: failed (Result: timeout) since Sat 2014-07-26 15:50:53 EDT;
2min 37s ago
Process: 3766 ExecStart=/etc/rc.d/init.d/monit start (code=exited,
status=0/SUCCESS)
Jul 26 15:45:53 localhost.localdomain systemd[1]: Starting SYSV: Monit
is a utility for managing and monitoring processes,...
Jul 26 15:45:53 localhost.localdomain monit[3766]: Starting monit:
Starting monit daemon with http interface at [localhost:2812]
Jul 26 15:45:53 localhost.localdomain monit[3766]: [ OK ]
Jul 26 15:45:53 localhost.localdomain systemd[1]: PID file
/var/run/monit.pid not readable (yet?) after start.
Jul 26 15:50:53 localhost.localdomain systemd[1]: monit.service
operation timed out. Terminating.
Jul 26 15:50:53 localhost.localdomain systemd[1]: Failed to start SYSV:
Monit is a utility for managing and monitoring processes,.
Jul 26 15:50:53 localhost.localdomain systemd[1]: Unit monit.service
entered failed state.
address@hidden Desktop]#
----------------------------------
In monitrc I'm setting the pid file to /usr/local/monit/logs/monit.pid.
The errors shows it is looking in /var/run/monit.pid
If I comment out the pidfile entry in monitrc, everything works as
expected.
I'm using Centos 7 and compiled from source:
tar xf monit-5.8.1.tar.gz
cd monit-5.8.1
./configure --prefix=/usr/local/monit --sysconfdir=/usr/local/monit
make
make install
ln -s /usr/local/monit/bin/monit /usr/bin/monit
mkdir /usr/local/monit/logs
cp /usr/src/monit-5.8.1/monitrc /usr/local/monit
edit /usr/local/monit/monitrc
add: set logfile /usr/local/monit/logs/monit.log
add: set pidfile /usr/local/monit/logs/monit.pid
cp /usr/src/monit-5.8.1/system/startup/rc.monit /etc/init.d/monit
chmod 755 /etc/init.d/monit
chkconfig monit on
Brian
- changing pidfile causes /etc/init.d/monit start/stop to not work,
brian <=