isc-dhcp-server fails to start after update
name: Bug report
about: DHCP Server fails to control subservices after upgrade
Describe the bug
log from apt upgrade:
Setting up isc-dhcp-server (4.3.5-3+deb9u2) ...
Job for isc-dhcp-server.service failed because the control process exited with error code.
See "systemctl status isc-dhcp-server.service" and "journalctl -xe" for details.
invoke-rc.d: initscript isc-dhcp-server, action "start" failed.
* isc-dhcp-server.service - LSB: DHCP server
Loaded: loaded (/etc/init.d/isc-dhcp-server; generated; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2021-06-06 10:34:25 CEST; 82ms ago
Docs: man:systemd-sysv-generator(8)
Process: 20278 ExecStart=/etc/init.d/isc-dhcp-server start (code=exited, status=1/FAILURE)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/isc-dhcp-server.service
`-1457 /usr/sbin/dhcpd -4 -q -cf /etc/dhcp/dhcpd.conf
Jun 06 10:34:24 derdapp003 systemd[1]: Starting LSB: DHCP server...
Jun 06 10:34:24 derdapp003 isc-dhcp-server[20278]: Launching both IPv4 and IPv6 servers (please configure INTERFACES in /etc/default/isc-dhcp-serve…he other).
Jun 06 10:34:25 derdapp003 isc-dhcp-server[20278]: Starting ISC DHCPv4 server: dhcpddhcpd service already running (pid file /var/run/dhcpd.pid curr….. failed!
Jun 06 10:34:25 derdapp003 systemd[1]: isc-dhcp-server.service: Control process exited, code=exited status=1
Jun 06 10:34:25 derdapp003 systemd[1]: Failed to start LSB: DHCP server.
Jun 06 10:34:25 derdapp003 systemd[1]: isc-dhcp-server.service: Unit entered failed state.
Jun 06 10:34:25 derdapp003 systemd[1]: isc-dhcp-server.service: Failed with result 'exit-code'.
root@derdapp003:~# ps -ef|grep dhcp
root 1457 1 0 Apr20 ? 00:03:24 /usr/sbin/dhcpd -4 -q -cf /etc/dhcp/dhcpd.conf
root 20508 19428 0 10:37 pts/0 00:00:00 grep dhcp
Cause: I have only IPv4 configured and up and running. On the upgrade isc seems to want IPv6 to be configured and fails with unspecific reason "exit-code". First issue: the subprocess for dhcpd ipv4 is not stopped or not stopped in a correct manner. Killing it manualy results in a pid file remaining, that also needs to be removed:
Jun 6 10:45:50 localhost isc-dhcp-server[20975]: Starting ISC DHCPv4 server: dhcpddhcpd service already running (pid file /var/run/dhcpd.pid currenty exists) ... failed!
Jun 6 10:45:50 localhost systemd[1]: isc-dhcp-server.service: Control process exited, code=exited status=1
Jun 6 10:45:50 localhost systemd[1]: Failed to start LSB: DHCP server.
Even doing so, the ics-dhcp-server fails on the next start with the same error in sequence.
After configuring nano /etc/default/isc-dhcp-server
with
# On what interfaces should the DHCP server (dhcpd) serve DHCP requests?
# Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACESv4="eth0.200 eth0.300 eth0.400"
INTERFACESv6=""
the server starts w/o any errors.
claims:
- if no ipv6 interface is configured, the server should not fail to start, but just drop the ipv6 sequence
- if the ics-dhcp-server fails to start for any reason, it should take care about subprocesses to be stopped in a correct way not leaving ghosts or pidfiles.
Systeminformation:
Linux derdapp003 4.19.59-sunxi #5.91 SMP Mon Jul 15 14:09:32 CEST 2019 armv7l GNU/Linux
description: ARMv7 Processor rev 4 (v7l)
product: LeMaker Banana Pro
~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.13 (stretch)
Release: 9.13
Codename: stretch
~# dpkg -l|grep dhcp
ii isc-dhcp-client 4.3.5-3+deb9u2 armhf DHCP client for automatically obtaining an IP address
ii isc-dhcp-common 4.3.5-3+deb9u2 armhf common manpages relevant to all of the isc-dhcp packages
ii isc-dhcp-server 4.3.5-3+deb9u2 armhf ISC DHCP server for automatic IP address assignment