[Kea-users] Kea-DHCP4 exiting right after start
Darren Ankney
darren.ankney at gmail.com
Sat Mar 14 13:18:27 UTC 2026
Hi Ale,
If what Doug has said is not possible in your environment, there may
be a solution provided in Kea:
https://kea.readthedocs.io/en/kea-2.6.3/arm/dhcp4-srv.html#interface-configuration
mentions "service-sockets-max-retries" which is 0 by default but can
be set to a positive integer which should make Kea retry for the
specified amount of times with "service-sockets-retry-wait-time"
between tries (default 5000ms).
Thank you,
Darren Ankney
On Fri, Mar 13, 2026 at 6:49 PM Doug Freed <dwfreed at isc.org> wrote:
>
> On 3/13/26 12:47, Alessandro Vesely wrote:
> > Hi,
> >
> > when the server boots, it starts DNS in this order:
> >
> > ...
> > lrwxrwxrwx 1 root root 19 Jun 28 2019 S03mynetwork -> ../init.d/mynetwork
> > lrwxrwxrwx 1 root root 19 Jul 10 2020 S03rmnologin -> ../init.d/rmnologin
> > lrwxrwxrwx 1 root root 26 Oct 18 2021 S03rng-tools-debian -> ../init.d/
> > rng-tools-debian
> > lrwxrwxrwx 1 root root 17 Nov 7 12:59 S04elogind -> ../init.d/elogind
> > lrwxrwxrwx 1 root root 26 Nov 7 12:59 S04kea-dhcp4-server -> ../init.d/
> > kea-dhcp4-server
> > lrwxrwxrwx 1 root root 30 Nov 7 12:59 S04kea-dhcp-ddns-server -> ../
> > init.d/kea-dhcp-ddns-server
> > lrwxrwxrwx 1 root root 15 Nov 7 12:59 S04named -> ../init.d/named
> > ...
> >
> > However, upon login I find no DHCP4. The log says so:
> >
> > Mar 13 17:48:43 INFO DHCP4_CONFIG_COMPLETE DHCPv4 server has completed
> > configuration: added IPv4 subnets: 1; DDNS: enabled
> > Mar 13 17:48:43 INFO DHCPSRV_MEMFILE_DB opening memory file lease
> > database: name=/var/lib/kea/dhcp4.csv persist=true type=memfile universe=4
> > Mar 13 17:48:43 INFO DHCPSRV_MEMFILE_LEASE_FILE_LOAD loading leases
> > from file /var/lib/kea/dhcp4.csv.2
> > Mar 13 17:48:43 INFO DHCPSRV_MEMFILE_LEASE_FILE_LOAD loading leases
> > from file /var/lib/kea/dhcp4.csv
> > Mar 13 17:48:43 INFO DHCPSRV_MEMFILE_EXTRACT_EXTENDED_INFO4 extracting
> > extended info saw 8 leases, extended info sanity checks modified 0 /
> > updated 0 leases and 0 leases have relay or remote id
> > Mar 13 17:48:43 INFO DHCPSRV_MEMFILE_LFC_SETUP setting up the Lease
> > File Cleanup interval to 3600 sec
> > Mar 13 17:48:43 INFO DHCPSRV_DHCP_DDNS_SENDER_STARTED NameChangeRequest
> > sender has been started: enable_updates: yes, server-ip: 127.0.0.1,
> > server-port: 53001, sender-ip: 0.0.0.0, sender-port: 0, max-queue-size:
> > 1024, ncr-protocol: UDP, ncr-format: JSON
> > Mar 13 17:48:43 WARN DHCPSRV_OPEN_SOCKET_FAIL failed to open socket:
> > the interface eth2r is not running
> > Mar 13 17:48:43 INFO DHCP4_OPEN_SOCKETS_FAILED maximum number of open
> > service sockets attempts: 0, has been exhausted without success
> > Mar 13 17:48:43 WARN DHCPSRV_NO_SOCKETS_OPEN no interface configured to
> > listen to DHCP traffic
> > Mar 13 17:48:43 INFO DHCPSRV_CFGMGR_USE_ALLOCATOR using the iterative
> > allocator for V4 leases in subnet 172.25.197.0/24
> > Mar 13 17:48:43 WARN DHCP4_MULTI_THREADING_INFO enabled: yes, number of
> > threads: 8, queue size: 64
> > Mar 13 17:48:43 INFO DHCP4_STARTED Kea DHCPv4 server version 2.6.3 started
> > Mar 13 17:48:43 INFO DHCP4_SHUTDOWN server shutdown
> >
> >
> > S03mynetwork contains a line saying `ip link set eth2r up`. Indeed,
> > when S04named came up, it logged:
> >
> > ...
> > Mar 13 17:48:43 30 north named[2073]: listening on IPv4 interface eth2r,
> > 172.25.197.1#53
> > Mar 13 17:48:43 30 north named[2073]: listening on IPv6 interface eth2r,
> > 2a02:29e1:500:6c22::1#53
> > ...
> >
> > Should I change the init order? Put a pause? What else?
> >
> > TIA for any hint
> > Best
> > Ale
>
> "The interface eth2r is not running" means the interface does not have
> the "RUNNING" flag, which generally indicates whether the interface is
> actually operational and capable of being used for traffic. Your
> network script should wait until /sys/class/net/eth2r/operstate contains
> "up" before finishing to ensure that everything is operational.
> Typically this happens rather quickly, but if something like 802.1x is
> involved, it can be a non-zero amount of time waiting for 802.1x to
> complete. You may want to reorder operations if there are multiple
> interfaces so that 'ip link set eth2r up' is run as early as possible,
> as well any 802.1x auth, so it has time to get the RUNNING flag while
> other operations are being performed before the script completes, so it
> can spend less time waiting for operstate to change.
>
> -Doug
> --
> ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.
>
> To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.
> Kea-users at lists.isc.org
More information about the Kea-users
mailing list