#912767 isc-dhcp-server: dhcp starts too early, named/session.key for ddns not available

Package:
isc-dhcp-server
Source:
isc-dhcp
Description:
ISC DHCP server for automatic IP address assignment
Submitter:
David Fries
Date:
2026-08-05 17:34:19 UTC
Severity:
normal
#912767#5
Date:
2018-11-03 18:19:47 UTC
From:
To:
Dear Maintainer,

After a reboot I found isc-dhcp-server wasn't running because dhcpd
was started before named wrote out session.key (included for ddns).

I have ddns enabled with the following included in
/etc/dhcp/dhcpd.conf
include "/var/run/named/session.key";

I see /etc/init.d/isc-dhcp-server has $named listed in Should-Start,
but apparently that's not sufficient with systemd, I expect dhcpd
takes less time to start compared with the multiple domains named is
serving on the system.
# Should-Start:      $local_fs slapd $named

I added the following loop to the default file, I'm not sure the best
way to properly handle this.
/etc/default/isc-dhcp-server

# delay watching for the session.key file to appear from named for ddns
include="/var/run/named/session.key"
i=0
while [ "$1" = "start" -a  $i -lt 30 -a ! -e "$include" ] ; do
        echo "waiting on $include"
        i=$(($i+1))
        sleep 1
done
unset include i


Here are the relevant parts of the system log file showing dhcpd
not finding session.key, then a second later named starts.

Oct 31 08:17:24 localhost dhcpd[1933]: Internet Systems Consortium DHCP Server 4.3.5
Oct 31 08:17:24 localhost dhcpd[1933]: Can't open /var/run/named/session.key: No such file or directory
Oct 31 08:17:24 localhost dhcpd[1933]: exiting.
Oct 31 08:17:24 localhost systemd[1]: isc-dhcp-server.service: Control process exited, code=exited status=1
Oct 31 08:17:24 localhost systemd[1]: Failed to start LSB: DHCP server.
Oct 31 08:17:24 localhost systemd[1]: isc-dhcp-server.service: Unit entered failed state.
Oct 31 08:17:24 localhost sh[1883]: Restarting isc-dhcp-server (via systemctl): isc-dhcp-server.serviceJob for isc-dhcp-server.service failed because the control process exited with error code.
Oct 31 08:17:24 localhost sh[1883]: See "systemctl status isc-dhcp-server.service" and "journalctl -xe" for details.
Oct 31 08:17:24 localhost systemd[1]: isc-dhcp-server.service: Failed with result 'exit-code'.
Oct 31 08:17:25 localhost named[2048]: starting BIND 9.10.3-P4-Debian <id:ebd72b3> -f -u bind
Oct 31 08:17:25 localhost named[2048]: loading configuration from '/etc/bind/named.conf'
Oct 31 08:17:26 localhost named[2048]: running

#912767#10
Date:
2026-08-05 17:31:09 UTC
From:
To:
Dear submitter,

as the package isc-dhcp has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/1143544

The version of this package that was in Debian prior to this removal
can still be found using https://snapshot.debian.org/.

Please note that the changes have been done on the master archive and
will not propagate to any mirrors until the next dinstall run at the
earliest.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
ftpmaster@ftp-master.debian.org.

Debian distribution maintenance software
pp.
Thorsten Alteholz (the ftpmaster behind the curtain)