<div dir="ltr"><div><br></div><div>Package: lighttpd</div><div>Version: 1.4.45-1</div><div>Severity: normal</div><div><br></div><div>Dear Maintainer,</div><div><br></div><div><div>After you issue a "service lighttpd reload" (or call /etc/init.d/lighttpd directly with the same action), all further actions stop working.</div></div><div><br></div><div>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.</div><div><br></div><div>For example, starting with a running lighttpd:</div><div><div>root@sid-lighttpd-reload-1721635:~# ps fxaw</div><div>  PID TTY      STAT   TIME COMMAND</div><div>(...)</div><div>17184 ?        Ss     0:00 /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf</div><div>root@sid-lighttpd-reload-1721635:~# service lighttpd status</div><div>● lighttpd.service - Lighttpd Daemon</div><div>   Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled)</div><div>   Active: active (running) since Fri 2017-10-06 13:48:53 UTC; 4s ago</div></div><div>(...)</div><div><br></div><div>Let's reload:</div><div><div>root@sid-lighttpd-reload-1721635:~# service lighttpd reload</div><div>[ ok ] Reloading web server configuration: lighttpd.</div></div><div><br></div><div>Status now is dead:</div><div><div>root@sid-lighttpd-reload-1721635:~# service lighttpd status</div><div>● lighttpd.service - Lighttpd Daemon</div><div>   Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled)</div><div>   Active: inactive (dead) since Fri 2017-10-06 13:49:08 UTC; 2s ago</div><div>  Process: 17184 ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)</div><div>  Process: 17177 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)</div><div> Main PID: 17184 (code=exited, status=0/SUCCESS)</div></div><div><br></div><div>But it's still running, albeit a new copy:</div><div><div>root@sid-lighttpd-reload-1721635:~# ps fxaw</div><div>  PID TTY      STAT   TIME COMMAND</div><div>(...)</div><div>17231 ?        S      0:00 /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf</div></div><div><br></div><div>"start" will fail now, for example:</div><div><div>root@sid-lighttpd-reload-1721635:~# service lighttpd status</div><div>● lighttpd.service - Lighttpd Daemon</div><div>   Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled)</div><div>   Active: failed (Result: exit-code) since Fri 2017-10-06 13:51:25 UTC; 836ms ago</div><div>  Process: 17391 ExecStart=/usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf (code=exited, status=255)</div><div>  Process: 17384 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)</div><div> Main PID: 17391 (code=exited, status=255)</div><div><br></div><div>Oct 06 13:51:25 sid-lighttpd-reload-1721635 systemd[1]: lighttpd.service: Unit entered failed state.</div><div>Oct 06 13:51:25 sid-lighttpd-reload-1721635 systemd[1]: lighttpd.service: Failed with result 'exit-code'.</div></div><div><br></div><div>journalctl shows the reason:</div><div><div>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</div></div><div><br></div><div>Managing this service via systemd or sysv is now effectively broken.</div></div>