Daemon dies but upstart thinks it is still running

ubuntu-12.04upstart

If the daemon process dies, I'm unable to restart it manually: start foo results in a message that "start: Job is already running: foo", and stop foo hangs indefinitely.

start on runlevel [2345]
stop on runlevel [016]

kill timeout 90
expect daemon

pre-start script
  rm -f ${HOME}/RUNNING_PID
end script

exec start-stop-daemon \
  --pidfile ${HOME}/RUNNING_PID --chuid $USER:$GROUP \
  --exec ${HOME}/bin/run --start > run.log 2>&1

There's no process owned by $USER and no pidfile, so why does upstart think the daemon is still running, and how can I convince it otherwise?

Best Answer

Workaround: Rename the the foo service to foo2...

See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=582745

Related Topic