23.1 PHP recurring exceptions

Started by msmarcapo, May 10, 2023, 05:44:52 PM

Previous topic - Next topic
Hey,
after upgrade to 23.1.6 we got recurring exception reports on one of our nodes.
We automatically copy many of the config settings from one node to another via XMLRPC Sync.
How can we further analyse the root cause of this XML Error?
This behave started soon after upgrading to the new major version. Before we didn't get this problem.
Can we increase loglevel or anything to go ahead?



Additonal notes below:

System Information:
User-Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/112.0
FreeBSD 13.1-RELEASE-p7 stable/23.1-n250430-7eb6eb035df SMP amd64
OPNsense 23.1.6 982c0e24c
Plugins os-node_exporter-1.1 os-wireguard-1.13_5
Time Wed, 10 May 2023 17:14:50 +0200
OpenSSL 1.1.1t  7 Feb 2023
Python 3.9.16
PHP 8.1.18


PHP Errors:

[10-May-2023 15:20:00 Europe/Berlin] PHP Fatal error:  Uncaught OPNsense\Core\ConfigException: invalid config xml in /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php:383
Stack trace:
#0 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php(412): OPNsense\Core\Config->loadFromStream(Resource id #19)
#1 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php(725): OPNsense\Core\Config->load()
#2 /usr/local/etc/inc/xmlrpc/legacy.inc(145): OPNsense\Core\Config->lock()
#3 /usr/local/opnsense/contrib/IXR/IXR_Library.php(446): restore_config_section_xmlrpc(Array)
#4 /usr/local/opnsense/contrib/IXR/IXR_Library.php(384): IXR_Server->call('opnsense.restor...', Array)
#5 /usr/local/opnsense/contrib/IXR/IXR_Library.php(357): IXR_Server->serve('__construct(Array)
#7 /usr/local/www/xmlrpc.php(104): XMLRPCServer->start()
#8 {main}
  thrown in /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php on line 383
[10-May-2023 15:30:00 Europe/Berlin] PHP Fatal error:  Uncaught OPNsense\Core\ConfigException: invalid config xml in /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php:383
Stack trace:
#0 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php(412): OPNsense\Core\Config->loadFromStream(Resource id #19)
#1 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php(725): OPNsense\Core\Config->load()
#2 /usr/local/etc/inc/xmlrpc/legacy.inc(145): OPNsense\Core\Config->lock()
#3 /usr/local/opnsense/contrib/IXR/IXR_Library.php(446): restore_config_section_xmlrpc(Array)
#4 /usr/local/opnsense/contrib/IXR/IXR_Library.php(384): IXR_Server->call('opnsense.restor...', Array)
#5 /usr/local/opnsense/contrib/IXR/IXR_Library.php(357): IXR_Server->serve('__construct(Array)
#7 /usr/local/www/xmlrpc.php(104): XMLRPCServer->start()
#8 {main}
  thrown in /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php on line 383
[10-May-2023 16:20:00 Europe/Berlin] PHP Fatal error:  Uncaught OPNsense\Core\ConfigException: invalid config xml in /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php:383
Stack trace:
#0 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php(412): OPNsense\Core\Config->loadFromStream(Resource id #19)
#1 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php(725): OPNsense\Core\Config->load()
#2 /usr/local/etc/inc/xmlrpc/legacy.inc(145): OPNsense\Core\Config->lock()
#3 /usr/local/opnsense/contrib/IXR/IXR_Library.php(446): restore_config_section_xmlrpc(Array)
#4 /usr/local/opnsense/contrib/IXR/IXR_Library.php(384): IXR_Server->call('opnsense.restor...', Array)
#5 /usr/local/opnsense/contrib/IXR/IXR_Library.php(357): IXR_Server->serve('__construct(Array)
#7 /usr/local/www/xmlrpc.php(104): XMLRPCServer->start()
#8 {main}
  thrown in /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php on line 383
[10-May-2023 16:50:00 Europe/Berlin] PHP Fatal error:  Uncaught OPNsense\Core\ConfigException: invalid config xml in /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php:383
Stack trace:
#0 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php(412): OPNsense\Core\Config->loadFromStream(Resource id #19)
#1 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php(725): OPNsense\Core\Config->load()
#2 /usr/local/etc/inc/xmlrpc/legacy.inc(145): OPNsense\Core\Config->lock()
#3 /usr/local/opnsense/contrib/IXR/IXR_Library.php(446): restore_config_section_xmlrpc(Array)
#4 /usr/local/opnsense/contrib/IXR/IXR_Library.php(384): IXR_Server->call('opnsense.restor...', Array)
#5 /usr/local/opnsense/contrib/IXR/IXR_Library.php(357): IXR_Server->serve('__construct(Array)
#7 /usr/local/www/xmlrpc.php(104): XMLRPCServer->start()
#8 {main}
  thrown in /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php on line 383



Thanks for your help!

It looks like the current /conf/config.xml may be damaged on that particular node throwing the error.

# xmllint --noout /conf/config.xml

(best to test all nodes with the command to be sure)


Cheers,
Franco

Thanks for Reply!
Unfortunately we can't get any further with this.
No Error shown.

How can we go ahead?

I'm not sure. Either PHP or xmllint is lying or it wasn't the right test (location).


Cheers,
Franco