9
votes
How to control the rate of automatic restarts of a runit service?
You should be rate-limiting your restarts in the ./finish file for that service, which is run upon abnormal termination. The ./finish script will receive the return code from ./run and from there you ...
6
votes
Accepted
How do you configure runit logging
There are a number of things to address in your question that aren't related to the question (cough pid files cough) but let's tackle the question proper.
First, logging is optional. There is no ...
6
votes
RUNIT - created first service directory, "sv start testrun" does not work
Your service isn't set up correctly. The reason it worked is that you invoked it directly from the service definition and not from the actual service control.
When runit's service management starts, ...
5
votes
Accepted
Trying to log with runit only returns 'unable to open supervise/ok'
Create the run files in /etc/sv/pants/ not /etc/service/pants/.
Then a symlink should be created in /etc/service to /etc/sv/pants to activate the service.
ln -s /etc/sv/pants /etc/service/
While ...
5
votes
Accepted
runit does not kill process on sv stop or sv reload
If you add -P to the chpst command line, chpst will create a new process group for your service. Then in your custom 'd' script you can read pid and kill -TERM -pid to send the TERM signal to the ...
4
votes
How do you configure runit logging
So, after a some trial and error I found a solution.
The following things are important to notice:
Configuration file: note that it's quite counter intuitive. If you have monitored service under /...
4
votes
runit - unable to open supervise/ok: file does not exist
In my case I deleted the lock and pid from the service configuration after stopping the service:
# stops the service
sv down serviceName
# deletes the 'pid' and 'lock' files
find -L /etc/service/...
3
votes
How do I chose between upstart, runit, supervisor, daemontools, ... for restarting a process if it dies? (process supervision / monitoring)
runit is a successor to daemontools (both are written in c)
supervisord uses python.
I've been using runit with socklog by the same author inside Alpine Linux lxc containers for around 10 months to ...
3
votes
runit - unable to open supervise/ok: file does not exist
If you are running ubuntu 18.04 or higher and getting the following error
unable to open supervise/ok: file does not exist
or if the runsvdir is not showing up in "grep" output then please runit-...
3
votes
Accepted
How to control the rate of automatic restarts of a runit service?
I'm not familiar with this facility, however, if it was my task to solve this problem, and a very short man page reading did not offer a simple knob to tune this behaviour, I'd do the following:
...
2
votes
How to control the rate of automatic restarts of a runit service?
I'm really not a fan of init based process management (and runit is basically an init substitute). As yo uare discovering, simple-minded restarting of failed processes as soon as they die is not a ...
2
votes
How to write runit custom stop script
I had to solve this problem myself for docker. I had uwsgi server running, and it was sent the wrong signal by docker (TERM instead of INT) on stopping the container.
The idea of the control/x files ...
2
votes
Trying to log with runit only returns 'unable to open supervise/ok'
If you are running ubuntu 18.04 or higher and getting the following error
unable to open supervise/ok: file does not exist
or if the runsvdir is not showing up in "grep" output then please runit-...
2
votes
Trying to log with runit only returns 'unable to open supervise/ok'
For the Debian installation, there are two directories: /etc/service and /service. For your service to be effectively controlled, they should be more-or-less mirror images of each other. In your ...
2
votes
Java process restarting prematurely under runit
First, install svlog. Using it is fairly painless.
Second, (assuming the service definition lives at /etc/sv) change your /etc/sv/logstash/run to say:
#!/bin/sh
exec 2&>1
SSL_CERT_DIR=/etc/...
2
votes
Accepted
What kind of service is runit's svlogd expecting?
The question is slightly vague, but from the sound of it, I think you are asking if you can use svlogd to send syslog messages to another program besides rsyslogd. The answer is, any program that ...
2
votes
How do I chose between upstart, runit, supervisor, daemontools, ... for restarting a process if it dies? (process supervision / monitoring)
If your distro uses Upstart, go with it. It has very basic support for job restarting, but includes limits that can prevent from restart loop, as mentioned by @EEAA.
If your OS uses another init ...
1
vote
Runit logging not working
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 ...
1
vote
runit - unable to open supervise/ok: file does not exist
sudo runsv /service/run/ &
Then
sudo sv start /service/run/
or
sudo sv up /service/run/
1
vote
What's the point of using runit in combination with monit?
runit is well suited for controlling services and logging and also well sticks to unix-way: easily combine simple parts as you need. It can do some checks and event-processing of service starts/stops ...
1
vote
telling runit to pick up a new service immediately
runsvdir continuously monitors its service directory. The delay is unfortunately arbitrary. From the man page:
At least every five seconds runsvdir checks whether the time of the
last ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
runit × 24logging × 5
linux × 3
daemon × 3
supervisord × 3
daemontools × 3
ubuntu × 2
debian × 2
unix × 2
service × 2
monit × 2
upstart × 2
centos7 × 1
configuration × 1
monitoring × 1
java × 1
ubuntu-12.04 × 1
ubuntu-16.04 × 1
chef × 1
syslog × 1
automation × 1
jenkins × 1
udp × 1
network-monitoring × 1
logstash × 1