Unbound host_entries.conf warnings on console during boot
-
APU with SD card on nanoBSD
2.2-BETA (amd64)
built on Wed Nov 26 15:27:11 CST 2014
FreeBSD 10.1-RELEASEDuring boot the console displays:
Warning: file_put_contents(/var/unbound/host_entries.conf): failed to open stream: No such file or directory in /etc/inc/unbound.inc on line 507
After boot is finished /var/unbound/host_entries.conf is there and has good data.
I guess this is another timing issue while the system is getting going. Again, no idea if these messages have been around for a while - have not looked too hard at console output since I enabled DNS Resolver (unbound).Sample console output of the pfSense bit of a boot:
Trying to mount root from ufs:/dev/ufs/pfsense0 [ro,sync,noatime]... Configuring crash dumps... Mounting filesystems... Setting up memory disks... done. ___ ___/ f \ / p \___/ Sense \___/ \ \___/ Welcome to pfSense 2.2-BETA ... Creating symlinks......ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib 32-bit compatibility ldconfig path: /usr/lib32 done. External config loader 1.0 is now starting... Launching the init system... done. Initializing............................. done. Starting device manager (devd)...done. Loading configuration......done. Updating configuration...done. Cleaning backup cache........done. Setting up extended sysctls...done. Setting timezone...done. Warning: file_put_contents(/var/unbound/host_entries.conf): failed to open stream: No such file or directory in /etc/inc/unbound.inc on line 507 Configuring loopback interface...done. Starting syslog...done. Starting Secure Shell Services...done. Setting up polling defaults...done. Setting up interfaces microcode...done. Configuring loopback interface...done. Creating wireless clone interfaces...done. Configuring LAGG interfaces...done. Configuring VLAN interfaces...done. Configuring QinQ interfaces...done. Configuring WAN interface...done. Configuring LAN interface...done. Configuring OPT1 interface...done. Configuring CARP settings...done. Warning: file_put_contents(/var/unbound/host_entries.conf): failed to open stream: No such file or directory in /etc/inc/unbound.inc on line 507 Syncing OpenVPN settings...done. Configuring firewall......done. Starting PFLOG...done. Setting up gateway monitors...done. Synchronizing user settings...done. Starting webConfigurator...done. Configuring CRON...done. Starting DNS Resolver... Warning: file_put_contents(/var/unbound/host_entries.conf): failed to open stream: No such file or directory in /etc/inc/unbound.inc on line 507 done. Starting NTP time client...done. Starting DHCP service...done. Configuring firewall......done. Generating RRD graphs...done. Starting syslog...done. Starting CRON... done. pfSense (nanobsd) 2.2-BETA amd64 Wed Nov 26 15:27:11 CST 2014 Bootup complete FreeBSD/amd64 (apu22.localdomain) (ttyu0) *** Welcome to pfSense 2.2-BETA-nanobsd (amd64) on apu22 *** WAN (wan) -> re1 -> v4/DHCP4: 10.49.80.255/22 LAN (lan) -> re2 -> v4: 10.52.0.1/24 OPT1 (opt1) -> re0 -> v4: 10.52.1.1/24 0) Logout (SSH only) 9) pfTop 1) Assign Interfaces 10) Filter Logs 2) Set interface(s) IP address 11) Restart webConfigurator 3) Reset webConfigurator password 12) pfSense Developer Shell 4) Reset to factory defaults 13) Upgrade from console 5) Reboot system 14) Disable Secure Shell (sshd) 6) Halt system 15) Restore recent configuration 7) Ping host 16) Restart PHP-FPM 8) Shell Enter an option:
-
It was another startup sequence thing - /var/unbound dir was not being created until late in the boot when the full unbound was configured and started.
Fixed for me by:
https://github.com/pfsense/pfsense/pull/1350
Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.