Debian Bug report logs -
#877870
lighttpd: "reload" action breaks further actions
Reply or subscribe to this bug.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, Debian lighttpd maintainers <pkg-lighttpd-maintainers@lists.alioth.debian.org>:
Bug#877870; Package lighttpd.
(Fri, 06 Oct 2017 13:57:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Andreas Hasenack <andreas@canonical.com>:
New Bug report received and forwarded. Copy sent to Debian lighttpd maintainers <pkg-lighttpd-maintainers@lists.alioth.debian.org>.
(Fri, 06 Oct 2017 13:57:04 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
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@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@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@sid-lighttpd-reload-1721635:~# service lighttpd reload
[ ok ] Reloading web server configuration: lighttpd.
Status now is dead:
root@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@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@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.
[Message part 2 (text/html, inline)]
Information forwarded
to debian-bugs-dist@lists.debian.org, Debian lighttpd maintainers <pkg-lighttpd-maintainers@lists.alioth.debian.org>:
Bug#877870; Package lighttpd.
(Fri, 06 Oct 2017 14:54:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Stefan Bühler <stbuehler@lighttpd.net>:
Extra info received and forwarded to list. Copy sent to Debian lighttpd maintainers <pkg-lighttpd-maintainers@lists.alioth.debian.org>.
(Fri, 06 Oct 2017 14:54:03 GMT) (full text, mbox, link).
Message #10 received at 877870@bugs.debian.org (full text, mbox, reply):
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@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@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@sid-lighttpd-reload-1721635:~# service lighttpd reload
> [ ok ] Reloading web server configuration: lighttpd.
>
> Status now is dead:
> root@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@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@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.
>
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Wed Jan 10 01:40:06 2018;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.