[Dachs-support] [bug] No DaCHS server appears to be running

Markus Demleitner msdemlei at ari.uni-heidelberg.de
Wed Feb 23 14:40:25 CET 2022


Hi, again,

On Wed, Feb 23, 2022 at 12:44:23PM +0100, Carlos Henrique Brandt wrote:
> Foreword: I thought this was an issue in the realms of Docker, since there
> is no init system there. I then deployed DaCHS in a Debian VM but the

No, that's not the reason -- but it's related.

> root at epn-vespa:~# service dachs reload
> Reloading VO server config: dachs*** Error: No DaCHS server appears to be
> running.  Thus, not
> reloading.
>  failed!

PSA: In case you've not encountered it before: dachs reload will
discard cached RDs and try to re-load some configuration from disk.
With modern DaCHS it's not usually terribly useful, as DaCHS now
automatically reloads RDs when they've changed (or tries to; it'll
keep the original RD if the changed one is broken, which sometimes is
a bit confusing).  See also
http://docs.g-vo.org/DaCHS/tutorial.html#dealing-with-rd-changes

Having said that: the behaviour you're seeing clearly sucks, and I
need to see what I do about it.  It's not *all* simple, though, and
that's related to systemd.

You see, a plain dachs serve leaves a conventional PID file saying
"here's where DaCHS is running on this box", and that is what dachs
serve reload looks for.  The message you're seeing is what it says if
it doesn't find it.

However, when DaCHS is started through a systemd unit, it is started
as dachs serve -f, i.e., it does not detach, and since last October
it also no longer manages its pid file, since that results in really
bad behaviour with systemd (I forget the details, but the net result
was that you couldn't restart a DaCHS at all).

But that means that dachs reload has no way of reliably finding the
server process that ought to drop its caches.

In the end, dachs reload just sends a signal (a SIGHUP), and
*probably* making it equivalent to killall -HUP dachs (or so)
wouldn't hurt.  But then the whole thing has become so questionable
that I guess I'll just do away with the whole command and tell people
who *really* want to have this cache dropping to killall -HUP.

Does anyone here do something smart with serve reload?  If yes,
please speak up to save it and make me think harder about how to get
it supported on systemd boxes.

           -- Markus


More information about the Dachs-support mailing list