OPNsense Forum

English Forums => 25.1, 25.4 Production Series => Topic started by: angryviking on February 25, 2025, 09:38:32 PM

Title: Upgrading from 24.7.12.4 to 25.1 fails on APU4D4
Post by: angryviking on February 25, 2025, 09:38:32 PM
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?
Title: Re: Upgrading from 24.7.12.4 to 25.1 fails on APU4D4
Post by: newsense on February 26, 2025, 01:24:56 AM
I've upgraded APU4D4 without any issue.

Can you post the healthcheck results before attempting the upgrade ?
Title: Re: Upgrading from 24.7.12.4 to 25.1 fails on APU4D4
Post by: angryviking on March 12, 2025, 07:08:28 PM
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***
Title: Re: Upgrading from 24.7.12.4 to 25.1 fails on APU4D4
Post by: newsense on March 12, 2025, 07:31:08 PM
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.

Title: Re: Upgrading from 24.7.12.4 to 25.1 fails on APU4D4
Post by: franco on March 12, 2025, 08:05:37 PM
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
Title: Re: Upgrading from 24.7.12.4 to 25.1 fails on APU4D4
Post by: newsense on March 12, 2025, 08:51:46 PM
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.
Title: Re: Upgrading from 24.7.12.4 to 25.1 fails on APU4D4
Post by: angryviking on March 13, 2025, 04:05:57 PM
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
Title: Re: Upgrading from 24.7.12.4 to 25.1 fails on APU4D4
Post by: newsense on March 13, 2025, 05:17:33 PM
Sorry, forgot a switch. I edited the commands in the post above
Title: Re: Upgrading from 24.7.12.4 to 25.1 fails on APU4D4
Post by: angryviking on March 23, 2025, 09:39:09 PM
Thank you guys! I was able to upgrade to 25.1.3 using this method over SSH :)