loggingdebianrunit

runit: unable to lock supervise error on debian


I'm trying to set up runit and logging on my debian wheezy VM. So far I've managed to get gunicorn service to start by following this setup:

sudo mkdir /etc/sv/gunicorn
sudo vi /etc/sv/gunicorn/run
sudo ln -s /etc/sv/gunicorn/run /etc/service

My log run file has:

LOG_DIR=/home/$USER/logs/gunicorn/

exec svlogd -tt $LOG_DIR

When I run sudo runsvdir /etc/service/gunicorn

runsv supervise: fatal: unable to lock supervise/lock: temporary failure

No idea what I'm doing wrong, any pointers?


Solution

  • Are you sure that the previous process has shut down completely? You may need to find and remove a .lock or .pid file that tells the system that it is in use by another process