I created a service with runit. Service starts and falls without logging. I need information about STDOUT of service for error detection (service starts without runit properly).

I created a directory /etc/sv/service_name/log, created run executable for logging (setup executable bit too):

exec svlogd -t /var/log/service_name

And create directory /var/log/service_name

However, after service start/restart log directory is empty

I run service as:

$ sv start service_name
ok: run: service_name: (pid 17017) 0s
$ sv status service_name
run: service_name: (pid 17373) 1sfail: service_name: runsv not running

What's wrong in my logging configuration?


Based on your answer, the clue

run: service_name: (pid 17373) 1sfail: service_name: runsv not running

tells me that the issue isn't the log, rather, your service itself is failing. What does ps fax report to you? Do you see a runsv with the logger attached to it? Does runsv have the daemon/process attached to it? Is there an runsv at all?

  • Thanks for the answer. As it turned out, the problem was in permission of service executable – Somewater Apr 29 '15 at 8:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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