Questions tagged [runit]

runit is a cross-platform Unix init scheme with service supervision, a replacement for sysvinit, and other init schemes.

runit is is an init replacement that runs on GNU/Linux, *BSD, MacOSX, Solaris, and can be ported to other Unix operating systems.

Its primary advantages over traditional init is service supervision (the ability to automatically restart daemons that have died), and reliable logging via pipes. In this regard it is similar to the utilities.

More information can be found at the runit homepage.

24 questions
13
votes
2 answers

How do I chose between upstart, runit, supervisor, daemontools, ... for restarting a process if it dies? (process supervision / monitoring)

I have a Nginx web proxy, gunicorn web server, and a python/flask web app. The Gunicorn process apparently died, and I want to ameliorate that in the future by looking into a utility that can monitor and restart the gunicorn process in the event it…
Matthew Moisen
  • 341
  • 2
  • 5
  • 12
12
votes
3 answers

How to write runit custom stop script

I want to have a custom "stop" script runit (runsv) to execute when having to stop/restart the process. Currently it simply kills the process, then runs the "finish" script. But in my case, my process spawns dynamically child processes, so instead…
ddinchev
  • 433
  • 1
  • 7
  • 18
10
votes
5 answers

runit - unable to open supervise/ok: file does not exist

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…
Alexandr Kurilin
  • 546
  • 1
  • 8
  • 20
9
votes
3 answers

How do you configure runit logging

I am having trouble setting a service with logging using runit. Here is a brief overview of files and scripts I created according to runit's documentation and other resources I found on the internet: I am using runit under debian,…
oz123
  • 1,198
  • 5
  • 16
  • 32
8
votes
3 answers

How to control the rate of automatic restarts of a runit service?

I have this runit service with run and log/run scripts properly working. As it happens, the service itself can crash for external reasons and might not be able to start for many minutes. The default way that runit handles this situation is by…
jpbochi
  • 153
  • 8
8
votes
2 answers

What's the point of using runit in combination with monit?

I see a lot of people using monit in combination with runit. Isn't that redundant? What is the point of using runit as well? Is it because it's more reliable when dealing with services (as it doesn't rely on pidfiles)? Thanks!
Milan Novota
  • 181
  • 4
7
votes
2 answers

RUNIT - created first service directory, "sv start testrun" does not work

I'm pretty new to runit. I installed it on a Ubuntu host. What I did: 1) created a dir testrun in /etc/sv 2) created a script run in /etc/sv/testrun/run, the script content: #! /bin/bash exec /root/FP/annotate-output python /root/FP/test.py | logger…
ddinchev
  • 433
  • 1
  • 7
  • 18
6
votes
1 answer

runit does not kill process on sv stop or sv reload

i am running a headless selenium process along a jenkins server on an AMI linux box, all managed by runit. the problem is that issuing "sv stop selenium" or "sv reload selenium" do not term or kill the old instance along its child processes, but…
Andreas Wagner
  • 133
  • 1
  • 7
2
votes
1 answer

Can runit be used to launch multiple instances of a single service?

My software runs on a single phusion-baseimage -based docker image. It consists of a couple of processes that are controlled by runit. For one of these processes/services (rqworker), I need to launch multiple instances based on a deployment-specific…
2
votes
1 answer

warning: couchdb: unable to open supervise/ok: file does not exist - Runit

I was trying to run couchdb with runit, and I encountered the error above. Even this, this and many others didn't help me in knowing what the problem is. Here was what I did to produce the problem. Runit and couchdb were installed fresh. I am…
user3622260
  • 131
  • 5
2
votes
0 answers

Chef Server 12 on Debian Jessy fails with "unable to change to service directory"

While not being officially supported, I want to run Chef Server 12 (12.3.0) on Debian Jessie. After fixing Debian's systemd ego trip as described in chef-cookbooks/chef-server#86, it is installing and running successfully. However, the runit setup…
StephenKing
  • 932
  • 1
  • 8
  • 18
2
votes
3 answers

Trying to log with runit only returns 'unable to open supervise/ok'

Installed runit in Debian 7.4 in a Vagrant. My run script is working, but the moment I create a service/pants/log/ directory I start getting the following error: unable to open supervise/ok. My service continues to run but nothing gets logged. I've…
Rudolf Vavruch
  • 1,215
  • 2
  • 11
  • 16
2
votes
2 answers

Using runit and monit to run / monitor services

I am configuring some services to run on Ubuntu server. I was going through the link below where they use runit to run the services and monit to monitor the services…
murtaza52
  • 151
  • 9
2
votes
1 answer

telling runit to pick up a new service immediately

As a happy user of runit - I am curious if it is possible to send a signal to the main process (or similar) telling it to look now at the service directory? the current behaviour is < 5 seconds (seems much faster most of the time) between scans for…
Michael Neale
  • 3,654
  • 5
  • 27
  • 26
1
vote
0 answers

How to add environment variable for runit service?

For traditional init environment we had "/etc/initscript" for setting environment for services. How we can set environment for runit services (Ubuntu 14.04)? TIA, Vitaly
1
2