monit-general
[Top][All Lists]
Advanced

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

Having some issues with memcached.


From: RDX _
Subject: Having some issues with memcached.
Date: Mon, 14 May 2007 15:54:14 -0700

I'm trying to get memcached to start with monit, however despite my best efforts, i cannot get it to recognize the PIDfile.

- I'm simply running the commandline:
monit -v start memcached

- i have this in my config file for memcached:
    check process memcached
    with pidfile /var/run/memcached.pid
    start program = "/etc/init.d/memcached start"
    stop program =  "/etc/init.d/memcached stop"
    if failed host 10.10.10.107 port 11211 then restart

- my script for memcached looks like this:
start() {
       /usr/local/bin/memcached -u root -d -P /var/run/memcached.pid
}
stop() {
       killall -9 memcached
       if [ $? -eq 0 ]
       then
               rm -f /var/run/memcached.pid
       fi
}
# See how we were called.
case "$1" in
 start)
       start
       ;;
 stop)
       stop
       ;;
 restart)
       stop
       start
       ;;
 *)
       echo $"Usage: $prog {start|stop|restart}"
       exit 1
esac
exit $?


- i'm getting this output:
-------------------------------------------------------------------------------
monit: pidfile '/var/run/memcached.pid' does not exist
monit: pidfile '/var/run/memcached.pid' does not exist
'memcached' start: /etc/init.d/memcached
monit: pidfile '/var/run/memcached.pid' does not exist
monit: pidfile '/var/run/memcached.pid' does not exist
'memcached' failed to start


I've tried numerous ways of configuring it, but none of them allow monit to recognize the PIDfile. The only pseudo-success i've had is when I put the full path, filename and params for memcached, then it at least starts it, however it still gives me the "does no exist" message, even though the process is active and running (and the PID exists!).

Help!

_________________________________________________________________
Upgrade to Windows Live Hotmail for free today! www.newhotmail.ca?icid=WLHMENCA151





reply via email to

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