Fatal error: Uncaught Error: Class "OPNsense\Base\Menu\MenuContainer" not found

Started by BigFreddy, September 03, 2026, 06:28:21 PM

Previous topic - Next topic
Hi,

I was updating OPNsense to its latest version before doing the major upgrade to the latest release and somewhere during all the minor updates, I received the errors listed below. I then did the big major upgrade to the latest version of OPNsense and haven't got any similar errors during that upgrade.


Errors from the update console:
Fatal error: Uncaught Error: Class "OPNsense\Base\Menu\MenuContainer" not found in /usr/local/opnsense/mvc/app/models/OPNsense/DHCPv4/Menu/Menu.php:34
Stack trace:
#0 /usr/local/opnsense/mvc/app/library/OPNsense/Autoload/Loaded.php(49): require_once()
#1 [internal function] OPNsense\Autoload\Loader->autoload('OPNsense\\DHCPv4...')
#2 /usr/local/opnsense/mvc/script/run_migrations.php(64): ReflectionClass->_construct('OPNsense\\DHCP4...')
#3 {main}
  throw in /usr/local/opnsense/mvc/app/models/OPNsense/DHCPv4/Menu/Menu.php on line 34
Reloading plugin configuration
Flushing all caches...done
Reloading template OPNsense/Syslog: OK

I'm posting here as I'm not sure what to think about the errors. I had similar issues around January of this year and replacing mSATA drive solved the issue and the errors were gone until now, a time where I decided to install minor updates. I had the new mSATA drive for around 7 and a half months and I'm getting error issues again. Could it be that the mSATA drive has the issues again, firewall box killing my drives or this error being a random one and there is nothing to worry about? Technically speaking, I never had SSD with such a low lifespan before and I doubt that OPNsense is killing my drives.

Any thoughts on it and what I should do next?

I think you have isc-dhcp legacy plugin installed? This was an expected update related glitch that sorts itself out as soon as the core version was updated shortly after that snippet.


Cheers,
Franco

Quote from: franco on September 03, 2026, 09:17:25 PMI think you have isc-dhcp legacy plugin installed? This was an expected update related glitch that sorts itself out as soon as the core version was updated shortly after that snippet.


Cheers,
Franco

I haven't installed any plugins as I'm running the vanilla version of OPNsense. Could OPNsense have install it itself?

Yes:

https://github.com/opnsense/changelog/blob/master/community/26.1/26.1#L116

I did not claim you installed it.  Merely pointing to the fact that this is within the context of this plugin being installed.  :)


Cheers,
Franco

Quote from: franco on Today at 10:46:36 AMYes:

https://github.com/opnsense/changelog/blob/master/community/26.1/26.1#L116

I did not claim you installed it.  Merely pointing to the fact that this is within the context of this plugin being installed.  :)


Cheers,
Franco

Ok, thanks. Good to know that my drive is not failing again. Just a bit off topic, any idea how I can monitor the health of my drive within OPNsense for things like S.M.A.R.T readings and bad sectors? I had someone recommended something before on this forum but I can't find any more info on this.

There's a os-smart plugin for it. Monitoring is not very comfortable in my opinion, but maybe one of the available full blown monitoring tools also found in the plugins has integration for disk health.


Cheers,
Franco

Quote from: franco on Today at 11:13:16 AMMonitoring is not very comfortable in my opinion, but maybe one of the available full blown monitoring tools also found in the plugins has integration for disk health.

Second thread today in which I mention that I already wrote up an easy to follow HOWTO with all bells and whistles included. Extra files on OPNsense are kept to a bare minimum and do not intervene with or might be deleted by an OPNsense update.

https://forum.opnsense.org/index.php?topic=48101.msg242617#msg242617
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Quote from: Patrick M. Hausen on Today at 01:23:07 PM
Quote from: franco on Today at 11:13:16 AMMonitoring is not very comfortable in my opinion, but maybe one of the available full blown monitoring tools also found in the plugins has integration for disk health.

Second thread today in which I mention that I already wrote up an easy to follow HOWTO with all bells and whistles included. Extra files on OPNsense are kept to a bare minimum and do not intervene with or might be deleted by an OPNsense update.

https://forum.opnsense.org/index.php?topic=48101.msg242617#msg242617

I seen that post but the mentioned solution requires a second device to setup where I'm looking for something that could run directly on the same firewall itself and perhaps display S.M.A.R.T readings via the dashboard. I did further research online and had trouble finding such monitoring plugin, it's really strange why there is no third party plugin to achieve this, obviously I don't know the limitations around it but generally speaking, it's something that should be possible to do.

This one looks more like a version/package mismatch during the intermediate upgrade step than a clear SSD failure. That class exists in the OPNsense base MVC code, so if a migration runs while parts of the old/new files are temporarily out of sync, you can hit errors like this. Since the later major upgrade completed without repeating it, I wouldn't jump straight to "bad mSATA" from this message alone.

What I'd do next: run a health audit from the GUI or console, check SMART data for the drive, and verify packages/config consistency. From console something like `opnsense-update -c` can help check the installation, and SMART will tell you if the disk is actually throwing reallocated/pending sectors or read errors. If everything is clean and the firewall behaves normally after reboot, I'd treat it as an upgrade hiccup and keep an eye on logs rather than replacing hardware immediately.

Are you a bot? I am in a pickle here and need a cupcake recipe quickly.

Quote from: BigFreddy on Today at 02:16:44 PMI seen that post but the mentioned solution requires a second device to setup where I'm looking for something that could run directly on the same firewall itself and perhaps display S.M.A.R.T readings via the dashboard. I did further research online and had trouble finding such monitoring plugin, it's really strange why there is no third party plugin to achieve this, obviously I don't know the limitations around it but generally speaking, it's something that should be possible to do.

Tools to do this exist and they all require Docker. Also is your OPNsense your only device with an SSD which would benefit from monitoring the drive's health?

I mean, if your network consisted of a single LAN, a laptop, a printer, a tablet and a phone, you would probably be running a Fritzbox and not OPNsense? You don't have any virtualising host (hypervisor?). No leftover RasPi?

I can really recommend building yourself dedicated monitoring infrastructure and not running Upmtime Kuma, Scrutiny, Prometheus, Grafana, LibreNMS, Elastiflow ... on the firewall.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)