OPNsense Forum

Archive => 22.7 Legacy Series => Topic started by: allan on July 29, 2022, 10:16:13 pm

Title: Upgrade Log - Undefined Constant Error
Post by: allan on July 29, 2022, 10:16:13 pm
Any concerns with the following error? There are several in my upgrade log. This is an upgrade from 22.1_10 to 22.7_4.

Code: [Select]
Starting configd.
Reloading plugin configuration

Fatal error: Uncaught Error: Undefined constant "OCSP_REVOKED_STATUS_NOSTATUS" in /usr/local/etc/inc/certs.inc:33
Stack trace:
#0 /usr/local/etc/inc/config.inc(41): require_once()
#1 /usr/local/etc/rc.configure_plugins(35): require_once('/usr/local/etc/...')
#2 {main}
thrown in /usr/local/etc/inc/certs.inc on line 33
pkg-static: POST-INSTALL script failed
[220/230] Reinstalling os-siproxd-1.3_1...
[220/230] Extracting os-siproxd-1.3_1: .......... done
Stopping configd...done
Starting configd.
Reloading plugin configuration

Fatal error: Uncaught Error: Undefined constant "OCSP_REVOKED_STATUS_NOSTATUS" in /usr/local/etc/inc/certs.inc:33
Stack trace:
#0 /usr/local/etc/inc/config.inc(41): require_once()
#1 /usr/local/etc/rc.configure_plugins(35): require_once('/usr/local/etc/...')
#2 {main}
thrown in /usr/local/etc/inc/certs.inc on line 33
Reloading template OPNsense/Siproxd: OK
[221/230] Reinstalling os-rspamd-1.12...
[221/230] Extracting os-rspamd-1.12: .......... done
Stopping configd...done
Starting configd.
Reloading plugin configuration

Fatal error: Uncaught Error: Undefined constant "OCSP_REVOKED_STATUS_NOSTATUS" in /usr/local/etc/inc/certs.inc:33
Stack trace:
#0 /usr/local/etc/inc/config.inc(41): require_once()
#1 /usr/local/etc/rc.configure_plugins(35): require_once('/usr/local/etc/...')
#2 {main}
thrown in /usr/local/etc/inc/certs.inc on line 33
Reloading template OPNsense/Rspamd: OK
[222/230] Upgrading os-postfix from 1.23 to 1.23_1...
[222/230] Extracting os-postfix-1.23_1: .......... done
Stopping configd...done
Title: Re: Upgrade Log - Undefined Constant Error
Post by: nsteinmetz on July 30, 2022, 03:57:17 pm
Same here but it seems it prevents my opensense to start after the reboot - Seems I'm half 22.7 with still some 22.1 files  :(
Title: Re: Upgrade Log - Undefined Constant Error
Post by: nsteinmetz on July 30, 2022, 05:10:00 pm
Could get rid of it by:

Code: [Select]
pkg update -f
pkg upgrade
# will list some php8 packages which were not yet upgraded
# and opnsense-base package was also upgraded at this time
reboot
# done
Title: Re: Upgrade Log - Undefined Constant Error
Post by: alexroz on July 30, 2022, 06:10:00 pm
Any concerns with the following error? There are several in my upgrade log. This is an upgrade from 22.1_10 to 22.7_4.

Code: [Select]
Starting configd.
Reloading plugin configuration

Fatal error: Uncaught Error: Undefined constant "OCSP_REVOKED_STATUS_NOSTATUS" in /usr/local/etc/inc/certs.inc:33
Stack trace:
#0 /usr/local/etc/inc/config.inc(41): require_once()
#1 /usr/local/etc/rc.configure_plugins(35): require_once('/usr/local/etc/...')
#2 {main}
thrown in /usr/local/etc/inc/certs.inc on line 33
pkg-static: POST-INSTALL script failed
[220/230] Reinstalling os-siproxd-1.3_1...
[220/230] Extracting os-siproxd-1.3_1: .......... done
Stopping configd...done
Starting configd.
Reloading plugin configuration

Fatal error: Uncaught Error: Undefined constant "OCSP_REVOKED_STATUS_NOSTATUS" in /usr/local/etc/inc/certs.inc:33
Stack trace:
#0 /usr/local/etc/inc/config.inc(41): require_once()
#1 /usr/local/etc/rc.configure_plugins(35): require_once('/usr/local/etc/...')
#2 {main}
thrown in /usr/local/etc/inc/certs.inc on line 33
Reloading template OPNsense/Siproxd: OK
[221/230] Reinstalling os-rspamd-1.12...
[221/230] Extracting os-rspamd-1.12: .......... done
Stopping configd...done
Starting configd.
Reloading plugin configuration

Fatal error: Uncaught Error: Undefined constant "OCSP_REVOKED_STATUS_NOSTATUS" in /usr/local/etc/inc/certs.inc:33
Stack trace:
#0 /usr/local/etc/inc/config.inc(41): require_once()
#1 /usr/local/etc/rc.configure_plugins(35): require_once('/usr/local/etc/...')
#2 {main}
thrown in /usr/local/etc/inc/certs.inc on line 33
Reloading template OPNsense/Rspamd: OK
[222/230] Upgrading os-postfix from 1.23 to 1.23_1...
[222/230] Extracting os-postfix-1.23_1: .......... done
Stopping configd...done

What is a path to the upgrade log file?
Title: Re: Upgrade Log - Undefined Constant Error
Post by: allan on July 30, 2022, 07:18:50 pm
What is a path to the upgrade log file?

The log itself is /var/cache/opnsense-update/.upgrade.log but you can access it through the web GUI - System > Firmware > Status > Run an audit (button) > Upgrade.
Title: Re: Upgrade Log - Undefined Constant Error
Post by: franco on July 30, 2022, 09:08:17 pm
As a shortcut on the console the command to view the upgrade log is:

# opnsense-update -G

The constant errors are only an issue when PHP 8 is upgraded but core package isn't. Usually it's the last one so afterwards it reboots for consistency and then it's fine.

(You can see that from the number, probably package 230/230 at the end.)


Cheers,
Franco
Title: Re: Upgrade Log - Undefined Constant Error
Post by: allan on July 30, 2022, 09:20:01 pm
As a shortcut on the console the command to view the upgrade log is:

# opnsense-update -G

The constant errors are only an issue when PHP 8 is upgraded but core package isn't. Usually it's the last one so afterwards it reboots for consistency and then it's fine.

(You can see that from the number, probably package 230/230 at the end.)

Thanks for the shortcut @franco. Yes, it got to the core -- package 230/230. Here is the bottom part before the package messages start. Glad this is all fine.

Code: [Select]
Starting configd.
Reloading plugin configuration

Fatal error: Uncaught Error: Undefined constant "OCSP_REVOKED_STATUS_NOSTATUS" in /usr/local/etc/inc/certs.inc:33
Stack trace:
#0 /usr/local/etc/inc/config.inc(41): require_once()
#1 /usr/local/etc/rc.configure_plugins(35): require_once('/usr/local/etc/...')
#2 {main}
  thrown in /usr/local/etc/inc/certs.inc on line 33
Reloading template OPNsense/Syslog: OK
Reloading template OPNsense/ddclient: OK
[229/230] Reinstalling os-acme-client-3.11...
[229/230] Extracting os-acme-client-3.11: .......... done
Stopping configd...done
Starting configd.

Deprecated: Required parameter $expression follows optional parameter $description in /usr/local/opnsense/mvc/app/models/OPNsense/HAProxy/HAProxy.php on line 147

Deprecated: Required parameter $testType follows optional parameter $description in /usr/local/opnsense/mvc/app/models/OPNsense/HAProxy/HAProxy.php on line 176

Deprecated: Required parameter $type follows optional parameter $description in /usr/local/opnsense/mvc/app/models/OPNsense/HAProxy/HAProxy.php on line 176

Deprecated: Required parameter $address follows optional parameter $description in /usr/local/opnsense/mvc/app/models/OPNsense/HAProxy/HAProxy.php on line 204

Deprecated: Required parameter $port follows optional parameter $description in /usr/local/opnsense/mvc/app/models/OPNsense/HAProxy/HAProxy.php on line 204

Deprecated: Required parameter $mode follows optional parameter $description in /usr/local/opnsense/mvc/app/models/OPNsense/HAProxy/HAProxy.php on line 204

Deprecated: Required parameter $name follows optional parameter $enabled in /usr/local/opnsense/mvc/app/models/OPNsense/HAProxy/HAProxy.php on line 230

Deprecated: Required parameter $mode follows optional parameter $enabled in /usr/local/opnsense/mvc/app/models/OPNsense/HAProxy/HAProxy.php on line 230

Deprecated: Required parameter $algorithm follows optional parameter $enabled in /usr/local/opnsense/mvc/app/models/OPNsense/HAProxy/HAProxy.php on line 230
Reloading plugin configuration

Fatal error: Uncaught Error: Undefined constant "OCSP_REVOKED_STATUS_NOSTATUS" in /usr/local/etc/inc/certs.inc:33
Stack trace:
#0 /usr/local/etc/inc/config.inc(41): require_once()
#1 /usr/local/etc/rc.configure_plugins(35): require_once('/usr/local/etc/...')
#2 {main}
  thrown in /usr/local/etc/inc/certs.inc on line 33
Reloading template OPNsense/AcmeClient: OK
[230/230] Upgrading opnsense from 22.1.10_4 to 22.7_4...
[230/230] Extracting opnsense-22.7_4: .......... done
Stopping configd...done
Resetting root shell
Updating /etc/shells
Unhooking from /etc/rc
Unhooking from /etc/rc.shutdown
Updating /etc/shells
Registering root shell
Hooking into /etc/rc
Hooking into /etc/rc.shutdown
Starting configd.
>>> Invoking update script 'refresh'

Warning: Undefined array key "networks" in /usr/local/etc/inc/plugins.inc on line 209
Writing firmware setting...done.
Writing trust files...done.
Configuring login behaviour...done.
Configuring system logging...done.
Running fc-cache to build fontconfig cache...
Compiling glib schemas
No schema files found: doing nothing.
=====
Message from py39-urllib3-1.26.10,1:

...
Title: Re: Upgrade Log - Undefined Constant Error
Post by: franco on July 30, 2022, 09:23:45 pm
Yep, looks a bit weird, but that's exactly why the full package update is done before enabling networking and then rebooted again to "let the dust settle" :)


Cheers,
Franco
Title: Re: Upgrade Log - Undefined Constant Error
Post by: allan on July 30, 2022, 09:36:42 pm
Yep, looks a bit weird, but that's exactly why the full package update is done before enabling networking and then rebooted again to "let the dust settle" :)

Weird wasn't what I was thinking of when I saw "Fatal error".  ;)  ;D
Title: Re: Upgrade Log - Undefined Constant Error
Post by: franco on July 31, 2022, 12:53:56 pm
There's nothing more calming than a fatal error that fixes itself :D


Cheers,
Franci
Title: Re: Upgrade Log - Undefined Constant Error
Post by: george@darksilk.com.au on February 26, 2023, 09:39:47 am
I'm gettin the same error. Trying to upgrade from 22.7.11_1 to 23.1.1