[pkg-lighttpd] Bug#877870: lighttpd: "reload" action breaks further actions
Stefan Bühler
stbuehler at lighttpd.net
Fri Oct 6 14:42:25 UTC 2017
Hi,
(upstream) 1.4.46 will contain an updated unit file which includes a
reload action, see
https://git.lighttpd.net/lighttpd/lighttpd1.4.git/commit/?h=0ae6bab4a97f12a0c93200df36ac1741696eeed5
for details.
(Afaics the debian packages installs the upstream unit file).
On 10/06/2017 03:53 PM, Andreas Hasenack wrote:
> Package: lighttpd
> Version: 1.4.45-1
> Severity: normal
>
> Dear Maintainer,
>
> After you issue a "service lighttpd reload" (or call /etc/init.d/lighttpd
> directly with the same action), all further actions stop working.
>
> This happens because the "reload" action is not defined in the systemd
> service file, so the code in /etc/init.d/lighttpd is used. That code in
> turn restarts the service. When you later run status/stop/start/restart,
> these are done via systemd and it thinks the service is dead because the
> PID changed.
>
> For example, starting with a running lighttpd:
> root at sid-lighttpd-reload-1721635:~# ps fxaw
> PID TTY STAT TIME COMMAND
> (...)
> 17184 ? Ss 0:00 /usr/sbin/lighttpd -D -f
> /etc/lighttpd/lighttpd.conf
> root at sid-lighttpd-reload-1721635:~# service lighttpd status
> ● lighttpd.service - Lighttpd Daemon
> Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor
> preset: enabled)
> Active: active (running) since Fri 2017-10-06 13:48:53 UTC; 4s ago
> (...)
>
> Let's reload:
> root at sid-lighttpd-reload-1721635:~# service lighttpd reload
> [ ok ] Reloading web server configuration: lighttpd.
>
> Status now is dead:
> root at sid-lighttpd-reload-1721635:~# service lighttpd status
> ● lighttpd.service - Lighttpd Daemon
> Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor
> preset: enabled)
> Active: inactive (dead) since Fri 2017-10-06 13:49:08 UTC; 2s ago
> Process: 17184 ExecStart=/usr/sbin/lighttpd -D -f
> /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)
> Process: 17177 ExecStartPre=/usr/sbin/lighttpd -tt -f
> /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)
> Main PID: 17184 (code=exited, status=0/SUCCESS)
>
> But it's still running, albeit a new copy:
> root at sid-lighttpd-reload-1721635:~# ps fxaw
> PID TTY STAT TIME COMMAND
> (...)
> 17231 ? S 0:00 /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
>
> "start" will fail now, for example:
> root at sid-lighttpd-reload-1721635:~# service lighttpd status
> ● lighttpd.service - Lighttpd Daemon
> Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor
> preset: enabled)
> Active: failed (Result: exit-code) since Fri 2017-10-06 13:51:25 UTC;
> 836ms ago
> Process: 17391 ExecStart=/usr/sbin/lighttpd -D -f
> /etc/lighttpd/lighttpd.conf (code=exited, status=255)
> Process: 17384 ExecStartPre=/usr/sbin/lighttpd -tt -f
> /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)
> Main PID: 17391 (code=exited, status=255)
>
> Oct 06 13:51:25 sid-lighttpd-reload-1721635 systemd[1]: lighttpd.service:
> Unit entered failed state.
> Oct 06 13:51:25 sid-lighttpd-reload-1721635 systemd[1]: lighttpd.service:
> Failed with result 'exit-code'.
>
> journalctl shows the reason:
> Oct 06 13:51:24 sid-lighttpd-reload-1721635 lighttpd[17377]: 2017-10-06
> 13:51:24: (network.c.464) can't bind to port: 80 Address already in use
>
> Managing this service via systemd or sysv is now effectively broken.
>
More information about the pkg-lighttpd-maintainers
mailing list