[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#59515: nginx: Fails to start on boot while upstream service is not y
From: |
Ludovic Courtès |
Subject: |
bug#59515: nginx: Fails to start on boot while upstream service is not yet running |
Date: |
Sun, 27 Nov 2022 22:14:48 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Jonathan Brielmaier <jonathan.brielmaier@web.de> skribis:
> I added `(shepherd-requirement '(radicale))` to my nginx-configuration.
> Sadly the issue is not fixed, the situation is the same as before.
>
> I assume that radicale takes a fracture of a second to start. And nginx
> starts faster up. See this small experiment:
That looks like a bug in the radicale service: there’s no
synchronization upon startup:
--8<---------------cut here---------------start------------->8---
(list (shepherd-service
(provision '(radicale))
(documentation "Run the radicale daemon.")
(requirement '(networking))
(start #~(make-forkexec-constructor
(list #$(file-append package "/bin/radicale")
"-C" #$config-file)
#:user "radicale"
#:group "radicale"))
(stop #~(make-kill-destructor))))
--8<---------------cut here---------------end--------------->8---
It should wait for a PID file or be started as a systemd or inetd
service. That way, we’d be sure that shepherd considers it started once
it’s really listening for input. A quick grep in the source suggests it
creates a PID file somewhere.
HTH!
Ludo’.