"Danger. Unexpected error, check log for details" during 25.7.6 upgrade

Started by jonm, October 23, 2025, 05:18:07 PM

Previous topic - Next topic
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.

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

Thanks Franco. I can provide logs if they might be of help. The system seems to be ok now.

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


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

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?

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

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.

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.

?

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.