dhcpcd 9.1.4 - Error dhcp_writefile: /var/db/dhcpcd/eth0.lease: No such file or directory
Stefano Cappa
Tue Aug 04 14:08:21 2020Hi Roy! After many experiments I found only an issue with dhcpcd 9.1.4. If your OS doesn't have the /var/db folder, dhcpcd cannot create its folder and it throws an error (see logs below). The result is that it doesn't assign an ipv6 address to the interface and probably other issues. I fixed this creating /var/db manually, but I saw that you removed from the makefile the command to create this path with this commit https://github.com/rsmarples/dhcpcd/commit/5f275b7bd1ed4d1f830b7a60ba253a98f7ef6127 . In my embedded device, in case of a minimalistic production build, /var/db doesn't exist by default. Should I create this folder while building my OS or is it better that dhcpcd will check the existence of /var/db before trying to create the dhcpcd folder and eventually creating also /var/db path? Log in case of no /var/db folder: root@mydevice:~# dhcpcd -i eth0 main: control_open: Connection refused main: mkdir `/var/db/dhcpcd': No such file or directory dhcpcd-9.1.4 starting duid_get: cannot write duid: No such file or directory DUID 00:03:00:01:XX:XX:XX:1f:f0:05 eth0: IAID XX:1f:f0:05 ipv6_readsecret: cannot write secret: No such file or directory eth0: ipv6_start: No such file or directory eth0: soliciting a DHCP lease eth0: offered 192.168.86.81 from 192.168.86.1 eth0: leased 192.168.86.81 for 86400 seconds dhcp_writefile: /var/db/dhcpcd/eth0.lease: No such file or directory eth0: adding route to 192.168.86.0/24 eth0: adding default route via 192.168.86.1 Log if I create /var/db before starting dhcpcd: root@mydevice:~# dhcpcd -i eth0 dhcpcd-9.1.4 starting DUID 00:01:00:01:26:bc:18:fa:XX:XX:XX:1f:f0:05 eth0: IAID 9e:1f:f0:05 eth0: adding address fe80::37b9:754:ba4e:f95e eth0: soliciting a DHCP lease eth0: soliciting an IPv6 router eth0: offered 192.168.86.65 from 192.168.86.1 eth0: probing address 192.168.86.65/24 eth0: leased 192.168.86.65 for 86400 seconds eth0: adding route to 192.168.86.0/24 eth0: adding default route via 192.168.86.1 Thanks, Stefano
Archive administrator: postmaster@marples.name