On Oct 11, 2016 4:07 PM, "Steve Litt" <slitt_at_troubleshooters.com> wrote:
>
> On Wed, 12 Oct 2016 00:09:02 +0200
> Andy Mender <andymenderunix_at_gmail.com> wrote:
>
> > Hello again,
> >
> > I'm rewriting some of the standard sysvinit and openrc scripts
> > to ./run scripts
> > and I have some problems with dbus. I took the ./run script from Void
> > Linux as the original runit documentation doesn't have an exemplary
> > dbus script. Whenever I check the status of dbus via "sv status
> > dbus", I get the following
> > error: "warning: dbus: unable to open supervise/ok: file does not
> > exist". This
> > makes no sense, as both /etc/sv/dbus/supervise/ and
> > /var/service/dbus/supervise/
> > contain the "ok" file. Below the run script from Void Linux:
> > #!/bin/sh
> > [ ! -d /run/dbus ] && install -m755 -g 22 -o 22 -d /run/dbus
> > exec dbus-daemon --system --nofork --nopidfile
>
> The idiomatic way to troubleshoot this is to get to a command prompt,
> as root, and run /etc/sv/dbus/run
>
> Watch the messages as they scroll up, and fix any problems.
No.
>
> If running it from the command prompt works, from the command prompt
> try:
>
> sv start dbus
Fine.
>
> See what happens. Also see what happens when you run:
>
> runsv dbus
Also no.
>
> If some ways to run it work and others don't, continue to exploit the
> differences.
The idiomatic way to troubleshoot things in supervision land is to read
your logs, add debug logging if needed, lsof processes, and maybe strace
something. It is not to run things as root and see what happens. One of the
major tenants of supervision is to run with a consistent environment and
"just call a run script as root and see what happens" is completely
antithetical to that.
Supervision isn't a license to be sloppy. You already have all the tools
needed to debug this, use them without running things in an altered context.
Cheers!
Received on Wed Oct 12 2016 - 01:41:12 UTC
This archive was generated by hypermail 2.3.0
: Sun May 09 2021 - 19:44:19 UTC