OPNsense Forum

English Forums => 25.7, 25.10 Series => Topic started by: jonm on October 23, 2025, 05:18:07 PM

Title: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: jonm on October 23, 2025, 05:18:07 PM
I just got this rather scary message during the update to 25.7.6. The update appeared to stop.

I couldn't log in at the console, I got this error:

Password:
sh: /usr/local/libexec/opnsense-auth: not found
Login incorrect

The GUI then gave a 404 error.

After a couple of minutes it sprang back into life.

I've never seen this behaviour before - is it expected?

The update appears to have now completed successfully, as far as I can tell.
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: franco on October 23, 2025, 05:24:43 PM
We're investigating these reports which seem to be more than usual... which are likely due to the new package manager update behaviour.

It looks like the core package was deinstalled, some packages updated but ultimately failed and the core package not put back. I can't say more for lack of evidence, but if that's the case I know what to fix.

In your case the system is probably not in a recoverable state, but a config import from install media and reinstall will bring you back.


Cheers,
Franco
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: jonm on October 23, 2025, 05:56:27 PM
Thanks Franco. I can provide logs if they might be of help. The system seems to be ok now.
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: franco on October 23, 2025, 10:40:06 PM
Can you check if

# opnsense-update -g

yields anything useful anymore? This is where the last update log is stored for debugging, but it's only the last and overwritten on the next update attempt.


Thanks,
Franco
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: jonm on October 24, 2025, 08:22:21 AM
Here's the output of that command.

Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: franco on October 24, 2025, 09:26:29 AM
Well, it spreads out the deinstall/install of the core package, but it has all the relevant bits:

[8/136] Deinstalling opnsense-25.7.3_7...
Stopping configd...done
Resetting root shell
Updating /etc/shells
Unhooking from /etc/rc
Unhooking from /etc/rc.shutdown
[8/136] Deleting files for opnsense-25.7.3_7: .......... done

[...]

[136/136] Installing opnsense-25.7.6...
[136/136] Extracting opnsense-25.7.6: .......... done
Updating /etc/shells
Registering root shell
Hooking into /etc/rc
Hooking into /etc/rc.shutdown
Starting configd.
>>> Invoking update script 'refresh.sh'
Migrated OPNsense\IDS\IDS from 1.1.0 to 1.1.1
Migrated OPNsense\Wireguard\Server from 1.0.0 to 1.0.1
Flushing all caches...done.
Writing firmware settings: FreeBSD OPNsense
Writing trust files...done.
Scanning /usr/share/certs/untrusted for certificates...
Scanning /usr/share/certs/trusted for certificates...
Scanning /usr/local/share/certs for certificates...
certctl: No changes to trust store were made.
Writing trust bundles...done.
Configuring login behaviour...done.
Configuring cron...done.
Configuring system logging...done.

You can see it installed the core files and did its maintenance tasks but after reboot the core files (or at least some) were gone from the file system?

We can use an additional explicit sync before reboot but it feels fishy.


Cheers,
Franco
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: RutgerDiehard on October 24, 2025, 10:25:37 AM
Quote from: jonm on October 23, 2025, 05:18:07 PMI just got this rather scary message during the update to 25.7.6. The update appeared to stop.

I couldn't log in at the console, I got this error:

Password:
sh: /usr/local/libexec/opnsense-auth: not found
Login incorrect

The GUI then gave a 404 error.

After a couple of minutes it sprang back into life.

I've never seen this behaviour before - is it expected?

The update appears to have now completed successfully, as far as I can tell.

I had the same "Danger. Unexpected error, check log for details" error but when I refreshed the OPNsense main dashboard page, version updated to 25.7.6 and a check for updates came back with "There are no updates available on the selected mirror".

I am reluctant to reboot in case I'm left with a broken OPNsense.

Is there anything I can check to ensure a reboot will succeed?
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: franco on October 24, 2025, 10:28:57 AM
Reading this again:

QuoteI couldn't log in at the console, I got this error:

Password:
sh: /usr/local/libexec/opnsense-auth: not found
Login incorrect

The GUI then gave a 404 error.

After a couple of minutes it sprang back into life.

So it started working again when the update finished like it said? In that case it's not really fatal but expected as long as opnsense core package is not physically installed. It's an annoying situation, but certainly not an issue like a reboot not working.


Cheers,
Franco
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: SeeJayEmm on October 24, 2025, 01:47:19 PM
I've also experienced this error updating today updating from 25.7.4.  Error log linked below.

https://pastebin.com/HvPkPHLj

In my case opnsense is running as a VM and I rolled back to a pre-update snapshot.  If you need me to attempt the update again and perform any diagnostics before rolling back let me know.

Edit: I tried again from a clean reboot and exact same issue.
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: franco on October 24, 2025, 01:57:47 PM
The log stops but nothing that would indicate the issue.

Can you clarify:

> Edit: I tried again from a clean reboot and exact same issue.

?
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: SeeJayEmm on October 24, 2025, 02:21:57 PM
The system had been online for a while prior to the update so I rebooted and attempted the update again. Same problem, logs ended at the same place. I can run the update again and provide any additional logs if you tell me which ones to pull.
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: SeeJayEmm on October 24, 2025, 02:37:15 PM
Tried again because I'm stubborn and I was hoping to pull the contents of /var/log after the update. Once the update fails I am no longer able to login via ssh or the console:

> sh: /usr/local/libexec/opnsense-auth: not found
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: SeeJayEmm on October 24, 2025, 02:47:35 PM
root@fw:/var/log/pkg # cat pkg_20251024.log
<13>1 2025-10-24T08:35:18-04:00 fw.lan pkg-static 81937 - [meta sequenceId="1"] libcbor upgraded: 0.12.0_2 -> 0.13.0
<13>1 2025-10-24T08:35:20-04:00 fw.lan pkg-static 81937 - [meta sequenceId="2"] libunistring upgraded: 1.3 -> 1.4.1
<13>1 2025-10-24T08:35:26-04:00 fw.lan pkg-static 81937 - [meta sequenceId="3"] crowdsec-1.7.0 deinstalled
<13>1 2025-10-24T08:35:31-04:00 fw.lan pkg-static 81937 - [meta sequenceId="4"] crowdsec-firewall-bouncer upgraded: 0.0.32_5 -> 0.0.32_7
<13>1 2025-10-24T08:35:43-04:00 fw.lan pkg-static 81937 - [meta sequenceId="5"] crowdsec-1.7.0_2 installed
<13>1 2025-10-24T08:35:44-04:00 fw.lan pkg-static 81937 - [meta sequenceId="6"] git-2.51.0 deinstalled
<13>1 2025-10-24T08:35:47-04:00 fw.lan pkg-static 81937 - [meta sequenceId="7"] opnsense-25.7.4 deinstalled
<13>1 2025-10-24T08:35:49-04:00 fw.lan pkg-static 81937 - [meta sequenceId="8"] dnsmasq reinstalled: 2.91_1,1 -> 2.91_1,1
<13>1 2025-10-24T08:36:15-04:00 fw.lan pkg-static 81937 - [meta sequenceId="9"] php83-phpseclib upgraded: 3.0.46 -> 3.0.47
<13>1 2025-10-24T08:36:17-04:00 fw.lan pkg-static 81937 - [meta sequenceId="10"] kea-3.0.1_1 deinstalled
<13>1 2025-10-24T08:36:18-04:00 fw.lan pkg-static 81937 - [meta sequenceId="11"] ntp-4.2.8p18_4 deinstalled
<13>1 2025-10-24T08:36:18-04:00 fw.lan pkg-static 81937 - [meta sequenceId="12"] openssh-portable-10.0.p1_2,1 deinstalled
<13>1 2025-10-24T08:36:19-04:00 fw.lan pkg-static 81937 - [meta sequenceId="13"] openvpn-2.6.15 deinstalled
<13>1 2025-10-24T08:36:19-04:00 fw.lan pkg-static 81937 - [meta sequenceId="14"] opnsense-update-25.7.3 deinstalled
<13>1 2025-10-24T08:36:20-04:00 fw.lan pkg-static 81937 - [meta sequenceId="15"] os-ddclient-1.27_4 deinstalled
<13>1 2025-10-24T08:36:20-04:00 fw.lan pkg-static 81937 - [meta sequenceId="16"] php83-ldap-8.3.26 deinstalled
<13>1 2025-10-24T08:36:26-04:00 fw.lan pkg-static 81937 - [meta sequenceId="17"] openldap26-client-2.6.10 deinstalled
<13>1 2025-10-24T08:36:27-04:00 fw.lan pkg-static 81937 - [meta sequenceId="18"] cyrus-sasl-gssapi-2.1.28 deinstalled
<13>1 2025-10-24T08:36:27-04:00 fw.lan pkg-static 81937 - [meta sequenceId="19"] cyrus-sasl-2.1.28_5 deinstalled
<13>1 2025-10-24T08:36:29-04:00 fw.lan pkg-static 81937 - [meta sequenceId="20"] krb5-1.22.1 deinstalled
<13>1 2025-10-24T08:36:30-04:00 fw.lan pkg-static 81937 - [meta sequenceId="21"] py311-anyio-4.10.0 deinstalled
<13>1 2025-10-24T08:36:31-04:00 fw.lan pkg-static 81937 - [meta sequenceId="22"] py311-boto3-1.40.21 deinstalled
<13>1 2025-10-24T08:36:31-04:00 fw.lan pkg-static 81937 - [meta sequenceId="23"] py311-cryptography-44.0.3_3,1 deinstalled
<13>1 2025-10-24T08:36:32-04:00 fw.lan pkg-static 81937 - [meta sequenceId="24"] py311-markupsafe-3.0.2 deinstalled
<13>1 2025-10-24T08:36:32-04:00 fw.lan pkg-static 81937 - [meta sequenceId="25"] py311-numexpr-2.11.0 deinstalled
<13>1 2025-10-24T08:36:32-04:00 fw.lan pkg-static 81937 - [meta sequenceId="26"] py311-pycparser-2.22 deinstalled
<13>1 2025-10-24T08:36:33-04:00 fw.lan pkg-static 81937 - [meta sequenceId="27"] py311-s3transfer-0.13.1 deinstalled
<13>1 2025-10-24T08:36:37-04:00 fw.lan pkg-static 81937 - [meta sequenceId="28"] py311-botocore-1.40.21 deinstalled
<13>1 2025-10-24T08:36:38-04:00 fw.lan pkg-static 81937 - [meta sequenceId="29"] py311-sqlite3-3.11.13_11 deinstalled
<13>1 2025-10-24T08:36:38-04:00 fw.lan pkg-static 81937 - [meta sequenceId="30"] py311-urllib3-1.26.20,1 deinstalled
<13>1 2025-10-24T08:36:38-04:00 fw.lan pkg-static 81937 - [meta sequenceId="31"] qemu-guest-agent-10.1.0 deinstalled
<13>1 2025-10-24T08:36:39-04:00 fw.lan pkg-static 81937 - [meta sequenceId="32"] rrdtool-1.9.0_1 deinstalled
<13>1 2025-10-24T08:36:39-04:00 fw.lan pkg-static 81937 - [meta sequenceId="33"] rubygem-rexml-3.4.2 deinstalled
<13>1 2025-10-24T08:36:41-04:00 fw.lan pkg-static 81937 - [meta sequenceId="34"] ruby33-gems-3.7.1 deinstalled
<13>1 2025-10-24T08:36:47-04:00 fw.lan pkg-static 81937 - [meta sequenceId="35"] ruby-3.3.9,1 deinstalled
<13>1 2025-10-24T08:36:50-04:00 fw.lan pkg-static 81937 - [meta sequenceId="36"] strongswan-6.0.1 deinstalled
<13>1 2025-10-24T08:36:51-04:00 fw.lan pkg-static 81937 - [meta sequenceId="37"] sudo-1.9.17p2 deinstalled
<13>1 2025-10-24T08:36:52-04:00 fw.lan pkg-static 81937 - [meta sequenceId="38"] suricata-7.0.12 deinstalled
<13>1 2025-10-24T08:36:58-04:00 fw.lan pkg-static 81937 - [meta sequenceId="39"] nss upgraded: 3.116 -> 3.117
<13>1 2025-10-24T08:36:58-04:00 fw.lan pkg-static 81937 - [meta sequenceId="40"] py311-pyyaml-6.0.1_1 deinstalled
<13>1 2025-10-24T08:36:59-04:00 fw.lan pkg-static 81937 - [meta sequenceId="41"] syslog-ng-4.8.2_4 deinstalled
<13>1 2025-10-24T08:37:00-04:00 fw.lan pkg-static 81937 - [meta sequenceId="42"] curl-8.15.0 deinstalled
<13>1 2025-10-24T08:37:00-04:00 fw.lan pkg-static 81937 - [meta sequenceId="43"] glib-2.84.1_3,2 deinstalled
<13>1 2025-10-24T08:37:13-04:00 fw.lan pkg-static 81937 - [meta sequenceId="44"] pcre2 upgraded: 10.45_1 -> 10.46
<13>1 2025-10-24T08:37:13-04:00 fw.lan pkg-static 81937 - [meta sequenceId="45"] tailscale-1.88.1 deinstalled
<13>1 2025-10-24T08:37:14-04:00 fw.lan pkg-static 81937 - [meta sequenceId="46"] ca_root_nss upgraded: 3.115_2 -> 3.115_3
<13>1 2025-10-24T08:37:15-04:00 fw.lan pkg-static 81937 - [meta sequenceId="47"] tailscale-1.88.3_2 installed
<13>1 2025-10-24T08:37:15-04:00 fw.lan pkg-static 81937 - [meta sequenceId="48"] unbound-1.24.0 deinstalled
<13>1 2025-10-24T08:37:16-04:00 fw.lan pkg-static 81937 - [meta sequenceId="49"] expat upgraded: 2.7.1 -> 2.7.3
<13>1 2025-10-24T08:37:17-04:00 fw.lan pkg-static 81937 - [meta sequenceId="50"] libnghttp2 upgraded: 1.67.0 -> 1.67.1
<13>1 2025-10-24T08:37:19-04:00 fw.lan pkg-static 81937 - [meta sequenceId="51"] python311-3.11.13_1 deinstalled
<13>1 2025-10-24T08:37:19-04:00 fw.lan pkg-static 81937 - [meta sequenceId="52"] wpa_supplicant-2.11_5 deinstalled
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: turipriv on October 24, 2025, 05:40:53 PM
Quote from: RutgerDiehard on October 24, 2025, 10:25:37 AM
Quote from: jonm on October 23, 2025, 05:18:07 PMI just got this rather scary message during the update to 25.7.6. The update appeared to stop.

I couldn't log in at the console, I got this error:

Password:
sh: /usr/local/libexec/opnsense-auth: not found
Login incorrect

The GUI then gave a 404 error.

After a couple of minutes it sprang back into life.

I've never seen this behaviour before - is it expected?

The update appears to have now completed successfully, as far as I can tell.

I had the same "Danger. Unexpected error, check log for details" error but when I refreshed the OPNsense main dashboard page, version updated to 25.7.6 and a check for updates came back with "There are no updates available on the selected mirror".

I am reluctant to reboot in case I'm left with a broken OPNsense.

Is there anything I can check to ensure a reboot will succeed?


Same here. I received the error message, but after refreshing, everything is running fine.

Have not rebooted yet, due to the same concern.
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: OIT Ad Mins Of The Day on October 24, 2025, 06:10:09 PM
Unfortunately, I can chime in here...

I guess that's not a good sign?

(https://nextcloud.ohrner-it.com/apps/files_sharing/publicpreview/Kn4i2gKJBHic9FE?file=/&fileId=2154894&x=2560&y=1440&a=true&etag=f30c6b2362f7eda4dfdf5644bebb3502)

Update: After reloading the web page, the web frontend shows again - though not sure how to proceed best...

Not sure if I even have ssh access to the box... Looks like management through the UI worked just too well for too long so far...

Also have not rebooted so far, fearing the box won't boot up again...

Maybe pull this update until the cause for the issues has been found?
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: drosophila on October 24, 2025, 11:11:16 PM
The 403 is expected, that always happens when the webgui is restarted: you're forcefully logged out, all access is rightly denied. Just go back to the index page, log in and done, like you did, nothing to be concerned about. You could run an audit. If this finds any missing or corrupt files, it should correct or at least report them, unless they're config files which probably aren't being checked (but a check would be possible for presence and syntax at least; semantics would also be possible, like if everything required is there and nothing extraneous, and even if the contents make sense, like if you have DHCP and a static IP configured for the same interface (unless that's a supported feature of course)).
So, everyone for whom the box came back from a 404, did you perchance look at the CPU usage? I had waited 30 minutes and the CPU was 100% idle before I killed it. The problem is that I'm using a thumbdrive so I have no indication of disk activity, and also it is very slow. The previous update took 2 hours to complete, and the CPU was mostly idle but not entirely (between 85% and 96% idle), but never 100% so I knew it hadn't died. I may try the update again and just leave it sit overnight in case it actually is just having a coffee break or something. ;)

I am on the -nano image, maybe there's a connection between working and failing and partially failing updates there?
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: Wyzard on October 25, 2025, 12:50:45 AM
I had what seems to be the same problem while upgrading from 25.7.5: error popup on the update screen while installing the upgrade, 404 when I reloaded the update page, 403 from the root URL (which should've given me either the dashboard or the login page).  But it came back after a few minutes.

Since earlier posts here have expressed concern about whether the core package might be broken by this upgrade, I downloaded a config backup and the latest installer as a precaution, then rebooted my router as a test.  It started up successfully and seems to be working as usual.
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: razamatan on October 25, 2025, 04:33:38 AM
i'm having this issue.  how do i recover?
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: drosophila on October 25, 2025, 04:42:27 AM
You simply wait, as I've found out:
it seems like the upgrade indeed was just taking a coffee break. I've restored and then re-run the update. The GUI stopped responding at the exact same spot, but since this time I had opened a root shell, I was able to see that it indeed was and still is doing stuff. It's literally crawling around at about 0.1MB/s, mostly stuck waiting on block I/O. In /var/log/pkg/pkg<xxxxxxx>.log I can see that it still is making progress, so even though the GUI still is 404, it's doing its thing. Obviously, disk speed is the abcolutely determining factor here, on fast drives you might not even notice the outage when half the root fs isn't there, while on slower drives it'll be more likely to hit the window of opportunity. Having seen all that I'm pretty confident that even my snail will come back to life eventually. I'll need another storage device since I can't have day-long outages every couple weeks once I actually deploy it (well, I can if the core function stays active). But this trickle-writes probably are going to kill the thumbdrive sooner rather than later, even with /var and /tmp mounted as tmpfs as they are in -nano.
Reveal: I'm used to XigmaNAS (embedded), which does its updates as one large file in a couple of minutes at most, and otherwise runs completely in memory, so I sort of expected the same from -nano, especially given that bad actors might somehow manage to write to the filesystem. With a memory-only fs, it'll just be one reboot away from a clean system. OPNsense seems to be more hdd-centric with its package system, I'll need to adjust to this.
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: razamatan on October 25, 2025, 05:21:35 AM
i have a fast nvme drive, and i think my update was broken for other reasons.  i followed https://forum.opnsense.org/index.php?topic=49437.15 to fully recover.
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: drosophila on October 25, 2025, 06:01:49 AM
By chance I checked my still open shell and saw "pkg-static 92615 - [meta sequenceId="1"] opnsense-25.7.6 installed". Reloading the also still open browser window indeed brought back the dashboard like nothing ever happened. It's still not done yet but probably will end up finishing in due time. Apparently I wasn't patient enough last time.

BTW: it's a bit bothersome that one doesn't seem to be able to install missing plugins when an update is pending, at least it said I need to update first. Since I had recovered using a vanilla download, my reloaded config made it miss the plugins (it's working though). I'd have preferred to install them before retrying the update, though they're not essential.

Edit: it's indeed gone through and now is fully updated. However, during my restoring, I found that console settings aren't restored: nano has primary console set to "serial" and secondary to "VGA" by default, which I had changed around to "VGA" primary and "serial" secondary. The restore seemed to restore everything but not this. It's readily reproducible, just store the config, change the setting, apply, restore and reboot: the stored setting will not be restored.
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: WM54 on October 26, 2025, 02:33:33 PM
Hey guys, thank you so much for your posts here - you really saved hours of my lifetime!
Yesterday evening, I started the update and was presented the scaring "danger" message followed by a "403" on the GUI and a "sh: /usr/local/libexec/opnsense-auth not found" on the console.
Luckily, I was able to do a failover to a standby image, so I only had to wait for some time until failover was done and had a working OPNsense again..

Today, I tried again the update, with same results. But having read your posts, I decided to simply go for a coffee and practise patience ...
After a while OPNsense rebooted, was updated and recoverd to working mode.

This was the first time the otherwise reliable update process made me sweat! But thanks to your help, everything turned out well in the end! Thank you so much!
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: rkoskee on October 28, 2025, 06:32:11 AM
So, I've been waiting for about 2 days now.. and the UI still hasn't come back. Worse, none of my root and user passwords are working over SSH. Tailscale SSH refuses to connect. It seems all credentials on the machine have changed or been corrupted. I can connect and get to the login prompt, but haven't been able to find a working user/password combination that will let me in. Not even when I open a shell on my server via tailscale and then try to log into the firewall from the LAN interface. This is a remote machine and now I'll have to drive 2.5hrs each direction and spend about $100 in gas, just to go default/reinstall the machine.

Any other ideas how to get the firewall back up?
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: Quin on October 29, 2025, 08:44:29 AM
Same problem here. I upgraded my secondary cluster node to 25.7.6 and the update broke everything.
I had to recover the node as described in the other thread, but now a lot of things seem to be broken. For example, Firmware > Plugins does no longer list available plugins and pkg segfaults every single run. I assume the node is lost and needs to be reinstalled.

For testing I upgraded a different vm based on an older snapshot and it also broke with the same issue. I wonder why a obviously broken update is not reverted and still available for download.
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: franco on October 29, 2025, 08:50:34 AM
To be frank, the issue has been reported a number of times, but it's not large scale issue and there is not enough data to make a decision.

The package manager update is also pretty much irreversible from a release and build perspective -- and eventually unavoidable. Going back and forth is not going to solve anything other than adding a lot of unnecessary work.

I'm going to dig through the changes from version 1.9 to 2.3 to find the change that causes the package deinstall/install reordering. I can't believe pkg-base in FreeBSD 15.0 won't suffer from the same type of reordering removing vital packages for a number of minutes which makes recovery pretty hard.


Cheers,
Franco
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: Patrick M. Hausen on October 29, 2025, 09:00:44 AM
I had the "Danger" message on one system of half a dozen during my update cycle, but no ill came from it. Just reload, check for updates again, reboot - all good.

Sorry I cannot collect any evidence, now.
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: franco on October 29, 2025, 09:07:40 AM
Well, the issue is pretty simple: pkg now removes the OPNsense core package with all its web server related files... goes on to update other packages.. and eventually circles back to installing the core package back.

That's dangerous for at least three reasons:

1. The core package is a "vital" package as per pkg's own design. Removing it for a prolonged amount of time is just not a good idea. Deleting all files for an immediate reinstall wasn't ideal either, but this is a new level that probably has implications on pkg-base use as well.

2. If pkg should fail for any benign reason during other package's updates it will stop and not put the core package back. In that case it will also not be able to reference the OPNsense repository because it was also deinstalled (see point 1).

3. Typical failsafe mechanisms in UNIX commands are the users. If a tool screws up the user is expected to recover, but being fully automated we can only recover from a scenario where recovery files are still in place and recovery is pre-scripted.

It may require substantial core changes in the near future, but double-checking pkg's changes seems like a quicker route to success.

If not, we will probably start working on an alternative to pkg-based upgrades for what we believe should be critically safe upgrades.


Cheers,
Franco
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: Quin on October 29, 2025, 10:10:34 AM
I think the main issue is not the re-install of the package, but the segfaults created by pkg.
When I manually install the package after the update, pkg segfaults during the post-install steps. Here is a picture of my current pkg status.

I think what's happening is pkg gets upgraded, breaks and is unable to continue with the remaining steps.
My firewall-01 without update has pkg version 1.19.2
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: thebraz on October 29, 2025, 10:21:36 AM
Hello everybody,
I had the message on 2 of my 3 OPNSense sysyems.
The only difference between them is that the two with the danger message had running:
- one OpenVPN Legacy server
- one OpenVPN Instance

while the one without the danger message has only the new OpenVPN Instance running.

All three systems upgraded succesfully and are working without problems as far a s I can see.

Don't know if it's related but hope this can help.

Best Wishes
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: franco on October 29, 2025, 10:29:15 AM
Our pkg 2.3.1 doesn't segfault but FreeBSD's version will, see https://github.com/opnsense/pkg/commit/b93bfd925b7

So I'm looking at https://github.com/freebsd/pkg/commit/523caa97c9 which was only committed last week upstream.

The preliminary results:

[4/136] Deinstalling opnsense-25.7...
[4/136] Deleting files for opnsense-25.7: .......... done
[...]
[136/136] Installing opnsense-25.7.6...
[136/136] Extracting opnsense-25.7.6: .......... done

vs.

[77/77] Upgrading opnsense from 25.7 to 25.7.6...
[77/77] Extracting opnsense-25.7.6: .......... done

A bit of a difference and if this pans out easy to hotfix, but needs more QA obviously.

It's also much faster now. It actually has 77 new updates, in the first one it splits it into 136 steps with the long deinstalled gap in between. Having the core package at position 77/77 seems consistent with the old pkg 1.9 behaviour we've come to love over the years.


Cheers,
Franco
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: wstemb on October 29, 2025, 11:10:24 AM
Seen the same error message on both machines in the cluster, no Web error, the upgrade continued and  finished. One server rebooted, because of the bigger jump between upgrades, the on other (slave/backup) not. 
After the upgrade all services went up (except frr on slave, which is expected). I  made the health check, everything OK.

Only bad news is that some pages, mostly pages that lists something (activity, logs) are now slow and unresponsive, with the browser message that the page is slowing down the browser (seen very seldom before).

Worst of them was the firewall live log, applied the first correction as instructed in another thread and now is working better, or the "System/Diagnostics/Activity" screen, which blocks the page for some seconds (with the upper browser message), but finishes at the end.   
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: franco on October 30, 2025, 11:26:20 AM
It's been about 24 hours since the hotfix went live and I haven't heard the issue is still happening. Incidentally, FreeBSD released pkg 2.4.0 which also includes this particular fix. So all of this went as expected.


Cheers,
Franco
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: SeeJayEmm on October 30, 2025, 01:48:23 PM
Confirming I was able to successfully upgrade to 25.7.6 this morning.
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: rkoskee on October 31, 2025, 05:26:51 AM
Well, I've still got nothing but "403 Forbidden" in place of my webUI, and I am unable to actually log into the firewall whatsoever. It just doesn't accept my credentials/ssh keys anymore. Until I spend 5 hrs driving out to reload the box, about the only thing I can actually do is ping it. The good news is that it is still passing traffic, and I am able to remote in to the network behind it, so that removes a lot of the urgency from the task. Might have some time next weekend, I guess.
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: Kg6hbh on October 31, 2025, 05:42:29 AM
I am not getting a Dange notice.  But after updating to 25.7 I went to update to the latest an get this.
***GOT REQUEST TO UPDATE***
Currently running OPNsense 25.7 (amd64) at Fri Oct 31 04:30:14 UTC 2025
Updating OPNsense repository catalogue...
OPNsense repository is up to date.
All repositories are up to date.
Updating OPNsense repository catalogue...
OPNsense repository is up to date.
All repositories are up to date.
Checking for upgrades (157 candidates): .......... done
Processing candidates (157 candidates): ...... done
Checking integrity...Assertion failed: (!STREQ(uid, p->uid)), function pkg_conflicts_check_local_path, file pkg_jobs_conflicts.c, line 317.
Child process pid=9219 terminated abnormally: Abort trap
Starting web GUI...done.
***DONE***

My system is still running so I am going to leave it for now thinking there is an issue with the update?  The first time it tried to update 90 packages and gut stuck on the third one.  It no longer does that.
Hope this helps
Robert
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: wstemb on October 31, 2025, 09:28:04 AM
Quote from: franco on October 30, 2025, 11:26:20 AMIt's been about 24 hours since the hotfix went live and I haven't heard the issue is still happening. Incidentally, FreeBSD released pkg 2.4.0 which also includes this particular fix. So all of this went as expected.


Cheers,
Franco

Tried zhis morning on third, test virtual OPNsense server. The upgrade from 25.7 (base) to 25.7.6 finished without any problems or messages.
Tried to upgrade two production server in the cluster, alredy on 25.7.6, on both I got

Quote...
[1/1] Upgrading pkg from 2.3.1 to 2.3.1_1...
[1/1] Extracting pkg-2.3.1_1: .......... done
...

So I think the "problems" I described were before your intervention.


Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: franco on November 03, 2025, 03:25:31 PM
@Kg6hbh N100 perhaps?

@wstemb yep, that's the fixed version
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: LGDL on November 30, 2025, 05:46:08 PM
If this happens to you when attempting to upgrade 25.7 to 25.7.8 on a fresh install, see :

https://forum.opnsense.org/index.php?topic=49933.0

Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: vpx23 on December 03, 2025, 10:25:46 PM
I just got this error message when updating from 25.7.5 to 25.7.8, but everything seems to be running fine.

This error also came first and I had to press update again, I guess because of the new pkg: https://forum.opnsense.org/index.php?topic=49409.0

I got this strange message in the Backend log (configd):

2025-12-03T21:43:05 Error configd.py [1658a939-02b7-4e32-9ec6-163af174f6bb] Script action failed with Command '/usr/local/opnsense/scripts/firmware/read.sh ' died with <Signals.SIGBUS: 10>. at Traceback (most recent call last):   File "/usr/local/opnsense/service/modules/actions/script_output.py", line 89, in execute     subprocess.run(script_command, env=self.config_environment, shell=True,   File "/usr/local/lib/python3.11/subprocess.py", line 571, in run     raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '/usr/local/opnsense/scripts/firmware/read.sh ' died with <Signals.SIGBUS: 10>.
   

Obviously after the reboot but I don't know if it is related.

Health audit shows no problems:

***GOT REQUEST TO AUDIT HEALTH***
Currently running OPNsense 25.7.8 (amd64) at Wed Dec  3 21:54:18 CET 2025
>>> Root file system: zroot/ROOT/default
>>> Check installed kernel version
Version 25.7.8 is correct.
>>> Check for missing or altered kernel files
No problems detected.
>>> Check installed base version
Version 25.7.8 is correct.
>>> Check for missing or altered base files
No problems detected.
>>> Check installed repositories
OPNsense (Priority: 11)
>>> Check installed plugins
os-dnscrypt-proxy 1.16
os-realtek-re 1.0
os-smart 2.4
os-wol 2.5_3
>>> 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.8 has 67 dependencies to check.
Checking packages: .................................................................... done
***DONE***

By the way why can't you see the full update log in "System: Firmware: Log File" which is shown during the update? It just looks like this (Debug):

2025-12-03T21:41:46 Notice pkg-static opnsense-25.7.8 installed
2025-12-03T21:41:32 Notice pkg-static unbound upgraded: 1.24.0 -> 1.24.1
2025-12-03T21:41:32 Notice pkg-static syslog-ng upgraded: 4.8.2_4 -> 4.10.2
2025-12-03T21:41:31 Notice pkg-static suricata upgraded: 7.0.12 -> 8.0.2
2025-12-03T21:41:30 Notice pkg-static rrdtool reinstalled: 1.9.0_1 -> 1.9.0_1
2025-12-03T21:41:30 Notice pkg-static py311-vici upgraded: 5.9.11_1 -> 6.0.3
2025-12-03T21:41:30 Notice pkg-static py311-urllib3 upgraded: 1.26.20,1 -> 2.5.0,1
2025-12-03T21:41:29 Notice pkg-static py311-dnspython-2.8.0_1,1 installed
2025-12-03T21:41:29 Notice pkg-static py311-trio upgraded: 0.31.0 -> 0.32.0
2025-12-03T21:41:29 Notice pkg-static py311-sqlite3 upgraded: 3.11.13_11 -> 3.11.14_11
2025-12-03T21:41:29 Notice pkg-static py311-pyyaml upgraded: 6.0.2 -> 6.0.3
2025-12-03T21:41:29 Notice pkg-static py311-aioquic-1.3.0_1 installed
2025-12-03T21:41:29 Notice pkg-static py311-pyopenssl-25.3.0_1,1 installed
2025-12-03T21:41:29 Notice pkg-static py311-pylsqpack upgraded: 0.3.22 -> 0.3.23
2025-12-03T21:41:29 Notice pkg-static py311-pycparser upgraded: 2.22 -> 2.23
2025-12-03T21:41:29 Notice pkg-static py311-numexpr upgraded: 2.11.0 -> 2.14.1
2025-12-03T21:41:29 Notice pkg-static py311-numpy upgraded: 1.26.4_7,1 -> 1.26.4_10,1
2025-12-03T21:41:27 Notice pkg-static py311-markupsafe upgraded: 3.0.2 -> 3.0.3
2025-12-03T21:41:27 Notice pkg-static py311-anyio upgraded: 4.10.0 -> 4.11.0
2025-12-03T21:41:27 Notice pkg-static py311-idna upgraded: 3.10 -> 3.11
2025-12-03T21:41:26 Notice pkg-static py311-cryptography upgraded: 44.0.3_4,1 -> 45.0.7_1,1
2025-12-03T21:41:26 Notice pkg-static py311-charset-normalizer upgraded: 3.4.3 -> 3.4.4
2025-12-03T21:41:26 Notice pkg-static py311-certifi upgraded: 2025.8.3 -> 2025.10.5
2025-12-03T21:41:26 Notice pkg-static py311-attrs upgraded: 25.3.0 -> 25.4.0
2025-12-03T21:41:26 Notice pkg-static kea upgraded: 3.0.1_1 -> 3.0.2
2025-12-03T21:41:25 Notice pkg-static glib reinstalled: 2.84.1_3,2 -> 2.84.1_3,2
2025-12-03T21:41:24 Notice pkg-static python311 upgraded: 3.11.13_1 -> 3.11.14
2025-12-03T21:41:16 Notice pkg-static py311-openssl-25.0.0_1,1 deinstalled
2025-12-03T21:41:16 Notice pkg-static py311-aioquic-1.2.0 deinstalled
2025-12-03T21:41:16 Notice pkg-static py311-dnspython-2.8.0,1 deinstalled
2025-12-03T21:41:16 Notice pkg-static wpa_supplicant upgraded: 2.11_5 -> 2.11_7
2025-12-03T21:41:16 Notice pkg-static sudo upgraded: 1.9.17p2 -> 1.9.17p2_2
2025-12-03T21:41:16 Notice pkg-static strongswan upgraded: 6.0.1 -> 6.0.3_1
2025-12-03T21:41:12 Notice pkg-static php83-pear upgraded: 1.10.13 -> 1.10.16
2025-12-03T21:41:11 Notice pkg-static php83-zlib upgraded: 8.3.26 -> 8.3.28
2025-12-03T21:41:11 Notice pkg-static php83-xml upgraded: 8.3.26 -> 8.3.28
2025-12-03T21:41:11 Notice pkg-static php83-sqlite3 upgraded: 8.3.26 -> 8.3.28
2025-12-03T21:41:11 Notice pkg-static php83-sockets upgraded: 8.3.26 -> 8.3.28
2025-12-03T21:41:11 Notice pkg-static php83-simplexml upgraded: 8.3.26 -> 8.3.28
2025-12-03T21:41:11 Notice pkg-static php83-session upgraded: 8.3.26 -> 8.3.28
2025-12-03T21:41:11 Notice pkg-static php83-pdo upgraded: 8.3.26 -> 8.3.28
2025-12-03T21:41:10 Notice pkg-static php83-pcntl upgraded: 8.3.26 -> 8.3.28
2025-12-03T21:41:10 Notice pkg-static php83-ldap upgraded: 8.3.26 -> 8.3.28
2025-12-03T21:41:10 Notice pkg-static php83-gettext upgraded: 8.3.26 -> 8.3.28
2025-12-03T21:41:10 Notice pkg-static php83-filter upgraded: 8.3.26 -> 8.3.28
2025-12-03T21:41:10 Notice pkg-static php83-dom upgraded: 8.3.26 -> 8.3.28
2025-12-03T21:41:10 Notice pkg-static php83-curl upgraded: 8.3.26 -> 8.3.28
2025-12-03T21:41:10 Notice pkg-static php83-ctype upgraded: 8.3.26 -> 8.3.28
2025-12-03T21:41:10 Notice pkg-static opnsense-update upgraded: 25.7.5 -> 25.7.8
2025-12-03T21:41:10 Notice pkg-static openvpn upgraded: 2.6.15 -> 2.6.16
2025-12-03T21:41:10 Notice pkg-static openssh-portable upgraded: 10.0.p1_2,1 -> 10.2.p1_1,1
2025-12-03T21:41:09 Notice pkg-static ntp upgraded: 4.2.8p18_4 -> 4.2.8p18_5
2025-12-03T21:41:09 Notice pkg-static dnsmasq reinstalled: 2.91_1,1 -> 2.91_1,1
2025-12-03T21:41:09 Notice pkg-static dnscrypt-proxy2 upgraded: 2.1.5_16 -> 2.1.5_19
2025-12-03T21:41:09 Notice pkg-static ca_root_nss upgraded: 3.115_3 -> 3.117_2
2025-12-03T21:41:08 Notice pkg-static opnsense-25.7.5 deinstalled
2025-12-03T21:41:07 Notice pkg-static liblz4 upgraded: 1.10.0,1 -> 1.10.0_2,1
2025-12-03T21:41:07 Notice pkg-static curl upgraded: 8.16.0 -> 8.17.0
2025-12-03T21:41:07 Notice pkg-static boost-libs upgraded: 1.88.0_2 -> 1.89.0_1
2025-12-03T21:40:52 Notice pkg-static zstd upgraded: 1.5.7 -> 1.5.7_1
2025-12-03T21:40:52 Notice pkg-static nss upgraded: 3.117 -> 3.118.1
2025-12-03T21:40:51 Notice pkg-static sqlite3 upgraded: 3.50.2_1,1 -> 3.50.4_2,1
2025-12-03T21:40:51 Notice pkg-static smartmontools upgraded: 7.5 -> 7.5_1
2025-12-03T21:40:51 Notice pkg-static realtek-re-kmod upgraded: 1100.00.1403000_1 -> 1101.00.1403000
2025-12-03T21:40:51 Notice pkg-static php83-mbstring upgraded: 8.3.26 -> 8.3.28
2025-12-03T21:40:51 Notice pkg-static php83 upgraded: 8.3.26 -> 8.3.28
2025-12-03T21:40:50 Notice pkg-static openldap26-client reinstalled: 2.6.10 -> 2.6.10
2025-12-03T21:40:50 Notice pkg-static libxml2 upgraded: 2.14.5 -> 2.14.6
2025-12-03T21:40:49 Notice pkg-static cyrus-sasl-gssapi reinstalled: 2.1.28 -> 2.1.28
2025-12-03T21:40:49 Notice pkg-static krb5 reinstalled: 1.22.1 -> 1.22.1
2025-12-03T21:40:49 Notice pkg-static readline upgraded: 8.2.13_2 -> 8.3.1
2025-12-03T21:40:49 Notice pkg-static pkcs11-helper upgraded: 1.29.0_3 -> 1.31.0
2025-12-03T21:40:49 Notice pkg-static pcre2 upgraded: 10.46 -> 10.47
2025-12-03T21:40:48 Notice pkg-static nspr upgraded: 4.37 -> 4.38.2
2025-12-03T21:40:48 Notice pkg-static libunistring upgraded: 1.4 -> 1.4.1
2025-12-03T21:40:48 Notice pkg-static libnghttp2 upgraded: 1.67.0 -> 1.68.0
2025-12-03T21:40:48 Notice pkg-static libiconv upgraded: 1.17_1 -> 1.18_1
2025-12-03T21:40:48 Notice pkg-static libedit upgraded: 3.1.20250104,1 -> 3.1.20251016,1
2025-12-03T21:40:48 Notice pkg-static cyrus-sasl reinstalled: 2.1.28_5 -> 2.1.28_5
2025-12-03T21:40:47 Notice pkg-static brotli upgraded: 1.1.0,1 -> 1.2.0,1
2025-12-03T21:40:16 Notice pkg-static gethostby*.getanswer: asked for "pkg.opnsense.org IN AAAA", got type "HINFO"
2025-12-03T21:40:16 Notice pkg-static gethostby*.getanswer: asked for "pkg.opnsense.org IN AAAA", got type "HINFO"
2025-12-03T21:39:36 Notice pkg gethostby*.getanswer: asked for "pkg.opnsense.org IN AAAA", got type "HINFO"
2025-12-03T21:39:35 Notice pkg gethostby*.getanswer: asked for "pkg.opnsense.org IN AAAA", got type "HINFO"
2025-12-03T21:39:35 Notice pkg gethostby*.getanswer: asked for "pkg.opnsense.org IN AAAA", got type "HINFO"
2025-12-03T21:39:34 Notice pkg gethostby*.getanswer: asked for "pkg.opnsense.org IN AAAA", got type "HINFO"
2025-12-03T21:39:30 Notice pkg gethostby*.getanswer: asked for "pkg.opnsense.org IN AAAA", got type "HINFO"
2025-12-03T21:39:28 Notice pkg gethostby*.getanswer: asked for "pkg.opnsense.org IN AAAA", got type "HINFO"
2025-12-03T21:23:52 Notice pkg gethostby*.getanswer: asked for "pkg.opnsense.org IN AAAA", got type "HINFO"
2025-12-03T21:23:52 Notice pkg gethostby*.getanswer: asked for "pkg.opnsense.org IN AAAA", got type "HINFO"
2025-12-03T21:23:51 Notice pkg gethostby*.getanswer: asked for "pkg.opnsense.org IN AAAA", got type "HINFO"
2025-12-03T21:23:50 Notice pkg pkg upgraded: 1.19.2_6 -> 2.3.1_1
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: zbiles on December 10, 2025, 09:16:55 PM
This has happened on 2 of my firewalls in the past few days. Super frustrating! One I don't have a snapshot, just a file backup to restore so now I'll be spending the afternoon rebuilding. Unless someone has found a way to recover in-place?
Title: Re: "Danger. Unexpected error, check log for details" during 25.7.6 upgrade
Post by: Patrick M. Hausen on December 10, 2025, 09:31:32 PM
Quote from: zbiles on December 10, 2025, 09:16:55 PMThis has happened on 2 of my firewalls in the past few days. Super frustrating! One I don't have a snapshot, just a file backup to restore so now I'll be spending the afternoon rebuilding.

"This" simply means you have to perform checking for updates twice. It does not have any negative impact on your installed firewall. So why would you need to rebuild?

If you actually do need to rebuild, your problem is not related to this thread. Please open a new one and report the precise events, messages and circumstances so folks on the forum might assist.

Kind regards,
Patrick