Bug 13984

Summary: dhcp-leases.db does not exist
Product: IPFire Reporter: Stefan Schantl <stefan.schantl>
Component: ---Assignee: Assigned to nobody - feel free to grab it and work on it <nobody>
Status: CLOSED FIXED QA Contact:
Severity: - Unknown -    
Priority: - Unknown - CC: adolf.belka, ag, michael.tremer
Version: 2   
Hardware: unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 13972    

Description Stefan Schantl 2026-05-23 13:10:26 UTC
When trying the latest and first knot-resolver ISO image i stumbled across the following issue:

May 23 14:52:00 ipfire supervisord: captured stdio output from kresd1[6841]: leases: Failed to open /var/lib/knot-resolver/dhcp-leases.db
Comment 1 Michael Tremer 2026-05-26 09:24:11 UTC
This is correct, and somewhat intentional.

At the moment, I am not sure when this database should be created. At build time so it is always there?
Comment 3 Adam Gibbons 2026-05-28 14:09:36 UTC
In my test case, /var/lib/knot-resolver/leases.db did exist, but it was owned root:root 0644 while /var/lib/knot-resolver was root:root 0755. Knot Resolver could not use the DB correctly and leases.lua produced sql_fwd/sql_rev nil errors.

After chowning /var/lib/knot-resolver and leases.db to knot-resolver:knot-resolver, DHCP lease A/PTR lookups worked and remained working after reboot.

This may be the same root cause as bug 13983 rather than a pure “file missing” case.
Comment 6 Michael Tremer 2026-07-20 16:14:17 UTC
Core Update 203 has been released:

> https://www.ipfire.org/blog/ipfire-2-29-core-update-203-released