Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm trying to figure out why runit will not boot or give me the status for the managed applications. Running on Ubuntu 12.04.

I created /service, /etc/sv/myapp (with a run script, a config file, a log folder and a run script inside of it). I create a symlink from /service/ to /etc/sv/myapp

When I run

sudo sv s /service/*

I get the following error message:

warning: /service/myapp: unable to open supervice/ok: file does not exist

Some of my Googling revealed that supposedly rebooting the svscan service might fix this, but killing it and running svscanboot didn't make a difference.

Any suggestions? Am I missing a step here somewhere?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

The problem was that, at least on Ubuntu 12.04, runit services symlinks should be placed under /etc/service, not /service as per the Arch guide on Runit

share|improve this answer

Runit also has trouble starting when a service is symlinked to a directory that is mounted on a different filesystem via LVM. For example,

$ readlink -f /etc/service/my-service
/opt/my-service

$ mount
...
/dev/mapper/lvm--local-opt on /opt type ext4 (...)

$ sv once my-service
warning: my-service: unable to open supervise/ok: file does not exist

Possible solutions:

  • Unmount the filesystem from LVM
    umount /opt; lvremove /dev/mapper/lvm--local-opt
  • Move the runit service to a better location
    update-service --remove /opt/my-service; mv /opt/my-service /etc/sv; update-service --add /etc/sv/my-service
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.