[Kea-users] DHCP4 Server crashes - Unable to read PID

Francis Dupont fdupont at isc.org
Tue Oct 7 12:47:36 UTC 2025


Uwe Jasper writes:
> I have 3 instances of KEA running in HA on Ubuntu 24.04 LTS, so 6 servers t=
> otal. This is the 2nd time now that I am running into the issue where my DH=
> CP process will crash with this error message: DHCPSRV_MEMFILE_FAILED_TO_OP=
> EN Could not open lease file: Unable to read PID from file '/var/lib/kea/dh=
> cp4.leases.pid'

=> yes, this condition (Unable to read PID from file) is not correctly handled
(there is a ticket which includes a fix for it). Note it is pretty hard to
get even not fully impossible as the file must exist but its content is not
readable as an int (empty for instance, or not a regular file).

> Has anyone else seen this or know how to fix it? The last time I just delet=
> ed the dhcp4.leases.pid file which worked on my standby server

=> yes, removing the file is the best thing to do. BTW the future fix is
supposed to ask the admin to remove the file after understanding what
is the source of the problem (it removes too a race so it will be impossible
to create an empty pid file).

> but shortly after I had the issue on my primary server and deleting
> the file there rendered my server unusable.

=> if you have the problem twice something is wrong on your box. I think
as something as the file system is full (but in this case your should
get 'Unable to write to PID file' messages).

Thanks

Francis Dupont <fdupont at isc.org>

PS: the ticket is #4116 'Make pid file code more robust' and is scheduled
for version 3.4 but we can advance it if you give arguments to do so.
BTW some more critical pid code problems were recently fixed.


More information about the Kea-users mailing list