Upgrading from 24.7.12.4 to 25.1 fails on APU4D4

Started by angryviking, February 25, 2025, 09:38:32 PM

Previous topic - Next topic
Hello guys!

I have the exact same problem as the gentleman in https://forum.opnsense.org/index.php?topic=45505 when upgrading my firewall.

During boot after upgrade it gives the following message and does not complete.

>>> Invoking early script 'upgrade'
>>> Invoking early script 'configd'
Starting configd.
>>> Invoking early script 'templates'
Generating configuration: OK
>>> Invoking early script 'backup'
>>> Invoking backup script 'captiveportal'
>>> Invoking backup script 'dhcpleases'
>>> Invoking backup script 'duid'
>>> Invoking backup script 'netflow'
>>> Invoking backup script 'rrd'
>>> Invoking early script 'carp'
CARP event system: Error (255)
Launching the init system...done.
Initializing...
Fatal error: Uncaught Error: Call to undefined function OPNsense\Core\simplexml_load_string() in /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php:389
Stack trace:
#0 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php(431): OPNsense\Core\Config->loadFromStream(Resource id #18)
#1 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php(329): OPNsense\Core\Config->load()
#2 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Singleton.php(51): OPNsense\Core\Config->init()
#3 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Singleton.php(72): OPNsense\Core\Singleton->__construct()
#4 /usr/local/etc/inc/config.inc(114): OPNsense\Core\Singleton::getInstance()
#5 /usr/local/etc/inc/config.inc(369): parse_config()
#6 /usr/local/etc/rc.bootup(50): require_once('/usr/local/etc/...')
#7 {main}
  thrown in /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php on line 389
Enter full pathname of shell or RETURN for /bin/sh:

I have been able to rollback using a ZFS snapshot I randomly created. Would be really nice feature if all upgrades created a snapshot automatically by the way :)

Have tried this upgrade 3 times now and still get the same result. All health checks looks good and everything is working perfectly.

Any idea how to upgrade without reinstalling 25.1 and reimporting the config?

I've upgraded APU4D4 without any issue.

Can you post the healthcheck results before attempting the upgrade ?

Sorry for the late answer, but here it is

***GOT REQUEST TO AUDIT HEALTH***
Currently running OPNsense 24.7.12_4 (amd64) at Wed Mar 12 18:30:53 CET 2025
>>> Root file system: zroot/ROOT/pre25.1
>>> Check installed kernel version
Version 24.7.12 is correct.
>>> Check for missing or altered kernel files
No problems detected.
>>> Check installed base version
Version 24.7.12 is correct.
>>> Check for missing or altered base files
No problems detected.
>>> Check installed repositories
OPNsense (Priority: 11)
>>> Check installed plugins
os-acme-client 4.7
os-crowdsec 1.0.8_1
os-ddclient 1.26
os-nginx 1.34_5
os-udpbroadcastrelay 1.0_5
>>> 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 24.7.12_4 has 69 dependencies to check.
Checking packages: ...................................................................... done
***DONE***

March 12, 2025, 07:31:08 PM #3 Last Edit: March 13, 2025, 05:00:32 PM by newsense
Do these steps

opnsense-update -bkr 25.1.3 -A 25.1
Reboot.

opnsense-update -p -A 25.1
Reboot only if this second step completes without issues, else post here without rebooting.


Practically, a missing PHP library post-boot could always happen regardless of the way the upgrade is performed -- either by chance or by existing configuration of third party packages and the latter is implied by ending up with the same error 3 times in a row.

The health audit is not elaborate enough to show third party packages or manually installed ports.


Cheers,
Franco

I know it is not ideal, but that gives the user a chance to fix things when/if the issues come up during the packages update step.

root@gw01:~ # opnsense-update -bkr 25.1.3
Fetching base-25.1.3-amd64.txz: ..[fetch: https://pkg.opnsense.org/FreeBSD:14:amd64/24.7/sets/base-25.1.3-amd64.txz.sig: Not Found] failed, no signature found

Sorry, forgot a switch. I edited the commands in the post above

Thank you guys! I was able to upgrade to 25.1.3 using this method over SSH :)