Debian Bookworm (SysV init): ISC dhcpd hangs during boot
0
votes
1
answer
130
views
I have a VM that is acting as a DC for a Windows VM, however, due to some shenanigans that systemd had been playing repeatedly (the boot process would hang inexplicably with the CPU load going straight through the roof, forcing me to kill the DC and restarting it, possibly multiple attempts required), I decided to switch to System V init, however, now I am experiencing a problem with the ISC DHCP server that I'm using to distribute IP addresses to the subnet the Windows VM is attaching to.
The boot sequence is taking place normally until it reaches the start script of the DHCP server, however, in that moment the boot process locks up and refuses to continue. This, of course, causes anything later in the bootup sequence to not get executed, and even any ttys aren't brought up (not even the serial console that I have set up for the VM). Fortunately SSH is started before the DHCP server is launched so I can still SSH to the VM.\
When the server hangs, the following message is appearing:\
Launching IPv4 server only.
\
However, the expected Starting ISC DHCPv4 server: dhcpd.
doesn't even appear.
Now, when doing a ps -ef | grep dhcp
I get the following output:
root 1118 1 0 04:15 ? 00:00:00 dhclient -4 -v -i -pf /run/dhclient.enX0.pid -lf /var/lib/dhcp/dhclient.enX0.leases -I -df /var/lib/dhcp/dhclient6.enX0.leases enX0
root 1444 1272 0 04:15 ? 00:00:00 /bin/sh /etc/init.d/isc-dhcp-server start
root 1453 1444 0 04:15 ? 00:00:00 /usr/sbin/dhcpd -t -4 -q -cf /etc/dhcp/dhcpd.conf
ntp 1531 1 0 04:15 ? 00:00:00 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -c /run/ntp.conf.dhcp -u 109:117
root 1712 1588 0 04:34 pts/0 00:00:00 grep dhcp
Next, when checking any ports opened by the dhcpd, I cannot find anything so I strongly suspect that the process hiccups during its attempt to open its UDP port.
The network interface in question is a Xen PV interface attached to a bridge defined and set up in Domain-0.\
Within the DomU (the domain controller) this is the stanza from /etc/network/interfaces
:
allow-hotplug enX1
iface enX1 inet static
address 192.168.128.1/24
The bridge to which the associated back-end is attached is defined as follows:
auto br1
iface br1 inet manual
bridge_ports none
bridge_stp on
bridge_hello 10
bridge_maxage 40
bridge_bridgeprio 0
bridge_fd 5
The question is, what is causing this hiccup, and how can it be resolved?
Currently my only option is to kill the hanging DHCP server process to get the init script that is invoking it unstuck and so get the boot process to complete, but that is highly suboptimal at best, especially as it makes the SSH that I'm using to intervene unusable (no input possible) so I have to kill it in the process. This at least gets the boot process unstuck so that it can complete.\
Another interesting message that is showing up when killing the DHCP server (in the given example it would be kill -TERM 1453
) is this one:
dhcpd self-test failed. Please fix /etc/dhcp/dhcpd.conf.
The error was:
However, when starting it manually with service isc-dhcp-server start
, everything works normally, and the server becomes fully operational without any further issues.
Asked by Robidu
(103 rep)
Apr 28, 2024, 03:19 AM
Last activity: Apr 28, 2024, 04:00 PM
Last activity: Apr 28, 2024, 04:00 PM