Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
23.1 Legacy Series
»
[Resolved] Fatal error: Uncaught Error: Class "Phalcon\Di\FactoryDefault"
« previous
next »
Print
Pages: [
1
]
Author
Topic: [Resolved] Fatal error: Uncaught Error: Class "Phalcon\Di\FactoryDefault" (Read 6412 times)
debrucer
Newbie
Posts: 10
Karma: 1
[Resolved] Fatal error: Uncaught Error: Class "Phalcon\Di\FactoryDefault"
«
on:
January 29, 2023, 03:05:47 am »
We have one OPNsense server in each of four AWS Regions. Each server is on the public network in that regions AWS Availability Zone (AZ). There are two private subnets in each AZ (AppServer & DBServer subnets). The four VPCs are set up identically except for their IP addresses are chosen not to conflict (172.17.x.x, 172.18.x.x, 172.19.x.x and 172.20.x.x). Prior to upgrading all four from 22.1.11_1, or whatever the latest release was, to the new 23.1, we noticed that while our tunnels still worked, we could not successfully add any new tunnels or peers. We attributated this to a confused configuration with the former os-wireguard, wireguard-go and wp-quick having been used previously, so we elected to upgrade all four servers from the latest available AWS releases. The entire upgrade process was done using only the SSH interface (as ec2-user, then sudo su -) and the menu 12 option to upgrade. There are many steps between the starting version around 21.7, to get to 23.1. Each step on each server took a number of tries, with the required reboots (often failing to restart), requiring another shutdown and startup to get going. We were somewhere near the end. At least a couple of the servers were in the process of getting the final 23.1 fix. Then they started failing and failing to recover after several restart attempts. Log files were scrutinized, and the last logs of three out of the four servers contained the following failure message:
Initializing...
Fatal error: Uncaught Error: Class "Phalcon\Di\FactoryDefault" not found in /usr/local/opnsense/mvc/script/load_phalcon.php:31
Stack trace:
#0 /usr/local/etc/inc/legacy_bindings.inc(29): require_once()
#1 /usr/local/etc/inc/config.inc(84): require_once('/usr/local/etc/...')
#2 /usr/local/etc/rc.bootup(51): require_once('/usr/local/etc/...')
#3 {main}
thrown in /usr/local/opnsense/mvc/script/load_phal
Anyway, that is the message from a day's work here. No servers running. No tunnels rebuilt.
The error message comes up in Google in 2015, 2020, 2021... nothing current.
Can anyone help me please? Have we seen this error recently?
Thank you,
David
«
Last Edit: January 31, 2023, 10:55:59 pm by debrucer
»
Logged
debrucer
Newbie
Posts: 10
Karma: 1
RESOLVED - Fatal error: Uncaught Error: Class "Phalcon\Di\FactoryDefault" not
«
Reply #1 on:
January 29, 2023, 06:51:46 pm »
Each of our servers has two NICs: NiC-0 = 172.xx.0.135 and NIC-1 = 172.xx.0.251. This setup has worked since mid-November; however, very early in the upgrade process, something switched their definitions. Both NIC-0 and NIC-1 now use the single private IP address of 172.xx.0.251.
In order to connect to these servers after it made the changes and the upgrade failed, all I had to do to get on was go out to the AWS management console and disassociate the public IP address from NIC-0 and assign it to NIC-1. Then I was able to connect through both the GUI and SSH (Putty).
Upgrades seem to be progressing properly now. Everything seems to be accessible; however, I haven't worked it out in my head yet as to possible repercussions. I'll be back if further comment i required.
David
Logged
debrucer
Newbie
Posts: 10
Karma: 1
Re: [Resolved] Fatal error: Uncaught Error: Class "Phalcon\Di\FactoryDefault"
«
Reply #2 on:
January 31, 2023, 11:09:51 pm »
From the documentation:
By default, the system will be configured with 2 interfaces LAN & WAN. The first network port found will be configured as LAN and the second will be WAN.
NIC-0 became LAN and NIC-1 became WAN. My mistake was in attaching the public IP to NIC-0 (the LAN).
At various stages of the upgrade process the software apparently tried to correct my mistakes. Sometimes it goofed. Sometimes it worked. Once this was sorted out there was very little problem.
Everything is accessible now. I'm not sure where or when I went wrong on this, almost total operator error.
«
Last Edit: February 01, 2023, 12:26:39 am by debrucer
»
Logged
jamesosw
Newbie
Posts: 6
Karma: 0
Re: [Resolved] Fatal error: Uncaught Error: Class "Phalcon\Di\FactoryDefault"
«
Reply #3 on:
February 01, 2023, 07:39:08 am »
Having the same error.
Full error details:
Fatal error: Uncaught Error: Class "Phalcon\Di\FactoryDefault" not found in /usr/local/opnsense/mvc/script/load_phalcon.php:31
Stack trace:
#0 /usr/local/etc/inc/legacy_bindings.inc(29):require_once()
#1 /usr/local/etc/inc/config.inc(84):require_once ('/usr/local/etc/...')
#2 /usr/local/etc/rc.bootup(51):require_once ('sr/local/etc...')
#3 {main}
thown in /usr/local/opnsense/mvc/script/load_phalcon.php on line 31
Running on a physical box so I don't think I'm able to fix the problem by changing the interfaces between LAN & WAN
Logged
debrucer
Newbie
Posts: 10
Karma: 1
Re: [Resolved] Fatal error: Uncaught Error: Class "Phalcon\Di\FactoryDefault"
«
Reply #4 on:
February 01, 2023, 07:19:10 pm »
Not sure I know how to help here. Physical disconnection and reconnection of interfaces isn't necessarily required. If you can get into the system either at the console or through an SSH connection, you can switch interfaces aroundl Since I am using AWS, I can take snapshots at various stages, particularly right before doing something that I've found dangerous. There are two ways to roll back to the snapshot. #1 is to do it while the instance is running performing the "replace root device" option. #2 is to shutdown the instance, detach the drive and then create a new drive from my snapshot, and finally, restarting the host.
I tell you that to explain where and how I came up with a fix. I probably went through that process 20 times until I got the fix. I'd start up fresh, do something to fix it, and when it breaks again, go back and start over. All the time, watching logs and "live view" for any information.
Immediately before the attempt to fix it that worked, I had found that the upgrade was failing with a missing library. (Sorry, totally forget the name of the library; but I couldn't find it). Then I found a message indicating that one component was failing because of this library missing.
In the package's menu, I reinstalled "rrdtool", and ran the upgrade process again. That apparently replaced the missing library.
No failures. It upgraded.
Now, why this was missing, I do not know. And why it wasn't missing on three other instances I upgraded, I don't know either. I do know that after reinstalling rrdtool, the process worked. 23.1 upgraded. This may or may not be a solution for you. My processes were repeatable because of snapshots. In the old day, one would have to go through the entire process to get back to the point to try this, That may be the situation for you on a physical host.
My theory was that getting the ports right fixed my problem. Still, having that library present was a requirement.
Hope this helps.
David
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
23.1 Legacy Series
»
[Resolved] Fatal error: Uncaught Error: Class "Phalcon\Di\FactoryDefault"