Upgraded to 25.7.1 from 25.1.12 and now unbound won't start. Unbound logs
29>1 2025-08-05T05:38:45-05:00 firewall unbound 79276 - [meta sequenceId="1"] [79276:0] notice: init module 0: python
<27>1 2025-08-05T05:38:45-05:00 firewall unbound 79276 - [meta sequenceId="2"] [79276:0] error: python exception in Py_InitializeFromConfig: init_fs_encoding: failed to get the Python codec of the filesystem encoding
<27>1 2025-08-05T05:38:45-05:00 firewall unbound 79276 - [meta sequenceId="3"] [79276:0] error: module init for module python failed
<26>1 2025-08-05T05:38:45-05:00 firewall unbound 79276 - [meta sequenceId="4"] [79276:0] fatal error: failed to init modules
<165>1 2025-08-05T05:38:46-05:00 firewall unbound 80536 - [meta sequenceId="5"] Backgrounding unbound logging backend.
<163>1 2025-08-05T05:38:56-05:00 firewall unbound 80536 - [meta sequenceId="6"] Unable to open pipe. This is likely because Unbound isn't running.
<29>1 2025-08-05T05:38:57-05:00 firewall unbound 21068 - [meta sequenceId="7"] [21068:0] notice: init module 0: python
<27>1 2025-08-05T05:38:57-05:00 firewall unbound 21068 - [meta sequenceId="8"] [21068:0] error: python exception in Py_InitializeFromConfig: init_fs_encoding: failed to get the Python codec of the filesystem encoding
<27>1 2025-08-05T05:38:57-05:00 firewall unbound 21068 - [meta sequenceId="9"] [21068:0] error: module init for module python failed
<26>1 2025-08-05T05:38:57-05:00 firewall unbound 21068 - [meta sequenceId="10"] [21068:0] fatal error: failed to init modules
<165>1 2025-08-05T05:38:58-05:00 firewall unbound 22528 - [meta sequenceId="11"] Backgrounding unbound logging backend.
<163>1 2025-08-05T05:39:08-05:00 firewall unbound 22528 - [meta sequenceId="12"] Unable to open pipe. This is likely because Unbound isn't running.
<29>1 2025-08-05T05:39:11-05:00 firewall unbound 65213 - [meta sequenceId="1"] [65213:0] notice: init module 0: python
<27>1 2025-08-05T05:39:11-05:00 firewall unbound 65213 - [meta sequenceId="2"] [65213:0] error: python exception in Py_InitializeFromConfig: init_fs_encoding: failed to get the Python codec of the filesystem encoding
<27>1 2025-08-05T05:39:11-05:00 firewall unbound 65213 - [meta sequenceId="3"] [65213:0] error: module init for module python failed
<26>1 2025-08-05T05:39:11-05:00 firewall unbound 65213 - [meta sequenceId="4"] [65213:0] fatal error: failed to init modules
<165>1 2025-08-05T05:39:12-05:00 firewall unbound 66644 - [meta sequenceId="5"] Backgrounding unbound logging backend.
<163>1 2025-08-05T05:39:22-05:00 firewall unbound 66644 - [meta sequenceId="6"] Unable to open pipe. This is likely because Unbound isn't running.
<29>1 2025-08-05T05:41:00-05:00 firewall unbound 54540 - [meta sequenceId="1"] [54540:0] notice: init module 0: python
<27>1 2025-08-05T05:41:00-05:00 firewall unbound 54540 - [meta sequenceId="2"] [54540:0] error: python exception in Py_InitializeFromConfig: init_fs_encoding: failed to get the Python codec of the filesystem encoding
<27>1 2025-08-05T05:41:00-05:00 firewall unbound 54540 - [meta sequenceId="3"] [54540:0] error: module init for module python failed
<26>1 2025-08-05T05:41:00-05:00 firewall unbound 54540 - [meta sequenceId="4"] [54540:0] fatal error: failed to init modules
<165>1 2025-08-05T05:41:00-05:00 firewall unbound 56288 - [meta sequenceId="5"] Backgrounding unbound logging backend.
<165>1 2025-08-05T05:41:04-05:00 firewall unbound 56288 - [meta sequenceId="6"] Closing logger
<29>1 2025-08-05T05:41:05-05:00 firewall unbound 91858 - [meta sequenceId="7"] [91858:0] notice: init module 0: python
<27>1 2025-08-05T05:41:05-05:00 firewall unbound 91858 - [meta sequenceId="8"] [91858:0] error: python exception in Py_InitializeFromConfig: init_fs_encoding: failed to get the Python codec of the filesystem encoding
<27>1 2025-08-05T05:41:05-05:00 firewall unbound 91858 - [meta sequenceId="9"] [91858:0] error: module init for module python failed
<26>1 2025-08-05T05:41:05-05:00 firewall unbound 91858 - [meta sequenceId="10"] [91858:0] fatal error: failed to init modules
If I try and start unbound by hand I get this error:
root@firewall:/var/log/resolver # /usr/local/sbin/unbound -dc /var/unbound/unbound.conf
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Python path configuration:
PYTHONHOME = (not set)
PYTHONPATH = (not set)
program name = 'unbound'
isolated = 0
environment = 1
user site = 1
safe_path = 0
import site = 0
is in build tree = 0
stdlib dir = '/usr/local/lib/python3.11'
sys._base_executable = ''
sys.base_prefix = '/usr/local'
sys.base_exec_prefix = '/usr/local'
sys.platlibdir = 'lib'
sys.executable = ''
sys.prefix = '/usr/local'
sys.exec_prefix = '/usr/local'
sys.path = [
'/usr/local/lib/python311.zip',
'/usr/local/lib/python3.11',
'/usr/local/lib/python3.11/lib-dynload',
]
root@firewall:/var/log/resolver #
Any help or pointers is greatly appreciated.
Run a health audit and reinstall damaged packages it is reporting (looks to be in the Python area).
Cheers,
Franco
Health audit came back clean, not sure what else to look at
***GOT REQUEST TO AUDIT HEALTH***
Currently running OPNsense 25.7.1_1 (amd64) at Tue Aug 5 06:56:44 CDT 2025
>>> Root file system: zroot/ROOT/default
>>> Check installed kernel version
Version 25.7 is correct.
>>> Check for missing or altered kernel files
No problems detected.
>>> Check installed base version
Version 25.7 is correct.
>>> Check for missing or altered base files
No problems detected.
>>> Check installed repositories
OPNsense (Priority: 11)
>>> Check installed plugins
os-ddclient 1.27_4
os-nut 1.9
os-smart 2.3_1
os-theme-cicada 1.40
>>> Check locked packages
No locks found.
>>> Check for missing package dependencies
Checking all packages: .......... done
>>> Check for missing or altered package files
Checking all packages: .......... done
>>> Check for core packages consistency
Core package "opnsense" at 25.7.1_1 has 68 dependencies to check.
Checking packages: ..................................................................... done
***DONE***
Diving into this more it looks like the Wireguard interface didn't come up as well, so I tried to reboot into a snapshot but it won't boot into it. When I get into the boot menu screen it says it is 25.1 and doesn't have option 8, then it continues to boot and it loads 25.7.1 and it says it failed to load if_wg.ko because it is not available or version mismatch.
A bit mysterious as if_wg.ko is in the kernel mtree which is checked by the heath audit
# grep -A1 if_wg /usr/local/opnsense/version/kernel.mtree
if_wg.ko size=123680 \
sha256digest=a45d0e58c9bfeea76b903ad5d700448a876a7b81e7bd43f99e0353d9e8061450
Cheers,
Franco
I think I am starting to understand this problem more. I originally installed 25.1 on a internal mmcsd0 drive, then I installed a internal nda0 drive and installed OPNsense on that. However looking at efibootmgr -v the UEFI boot order is still booting off of the mmcsd0 drive which I think caused some things to be updated on the mmc disk and some things to be updated on the nvme disk leading to a entire mess.
Currently it is booting off of mmcsd0
# efibootmgr -v
Boot to FW : false
BootCurrent: 0004
Timeout : 5 seconds
BootOrder : 0004, 0003
+Boot0004* UEFI OS HD(1,GPT,8aa2d5db-721c-11f0-9374-6462662f3ea6,0x28,0x82000)/File(\EFI\BOOT\BOOTX64.EFI)
gpt/efiboot0:/EFI/BOOT/BOOTX64.EFI /boot/efi//EFI/BOOT/BOOTX64.EFI
# gpart list
1. Name: mmcsd0p1
Mediasize: 272629760 (260M)
Sectorsize: 512
Stripesize: 512
Stripeoffset: 0
Mode: r1w1e2
efimedia: HD(1,GPT,8aa2d5db-721c-11f0-9374-6462662f3ea6,0x28,0x82000)
rawuuid: 8aa2d5db-721c-11f0-9374-6462662f3ea6
rawtype: c12a7328-f81f-11d2-ba4b-00a0c93ec93b
label: efiboot0
length: 272629760
offset: 20480
type: efi
index: 1
end: 532519
start: 40
When it should be booting off of
1. Name: nda0p1
Mediasize: 272629760 (260M)
Sectorsize: 512
Stripesize: 0
Stripeoffset: 20480
Mode: r0w0e0
efimedia: HD(1,GPT,bfe40c7a-721a-11f0-bd70-6462662f3ea6,0x28,0x82000)
rawuuid: bfe40c7a-721a-11f0-bd70-6462662f3ea6
rawtype: c12a7328-f81f-11d2-ba4b-00a0c93ec93b
label: efiboot0
length: 272629760
offset: 20480
type: efi
index: 1
end: 532519
start: 40