OPNsense Forum

Archive => 17.1 Legacy Series => Topic started by: tillsense on August 17, 2016, 06:28:56 pm

Title: Message from opnsense-devel-17.1.a_196
Post by: tillsense on August 17, 2016, 06:28:56 pm
Quote
Reloading GUI configuration
Message from opnsense-devel-17.1.a_196:
Thanks for all the fish...

Fatal error: Class 'Phalcon\DI\FactoryDefault' not found in /usr/local/opnsense/mvc/script/load_phalcon.php on line 32
*** Error code 255

Stop.
make: stopped in /usr/core
Title: Re: Message from opnsense-devel-17.1.a_196
Post by: tillsense on August 19, 2016, 07:51:28 pm
no www no ssh ... root login without password on the vm console....it's broken
Title: Re: Message from opnsense-devel-17.1.a_196
Post by: franco on August 22, 2016, 07:09:53 am
It looks like the package install did not go through. Unfortunately other than the hint that the file could not be loaded there isn't much. Was this a GUI upgrade or a "make upgrade" from the repository? What was the version before that one?

Important information:

# cat /usr/local/opnsense/versions/opnsense.last
# pkg info opnsense-devel
# pkg install opnsense-devel
Title: Re: Message from opnsense-devel-17.1.a_196
Post by: tillsense on August 22, 2016, 07:45:57 pm
"make upgrade" on ssh console
last: 17.1a_161-d137b214a
info: ...Version: 17.1.a_196 .... Descrption:  0c1e5723b
install: (no chance) no dns... no route...


Title: Re: Message from opnsense-devel-17.1.a_196
Post by: franco on August 23, 2016, 09:59:25 am
Very odd, it seems to be installed alright. Something else to try:

# /usr/local/etc/rc.restart_webgui
# /usr/local/etc/rc.sshd
# clog /var/log/system.log

Maybe this choked on OpenSSL vs. LibreSSL, the system log will tell.
Title: Re: Message from opnsense-devel-17.1.a_196
Post by: tillsense on August 23, 2016, 08:04:50 pm
both command fails with same error:
Quote
Fatal error: Class 'Phalcon\DI\FactoryDefault' not found in /usr/local/opnsense/mvc/script/load_phalcon.php on line 32

the log end (no new log exits) at the installation date with:
Quote
...
Aug 17 18:23:34 sense sshd[434567]: Received signal 15; terminating.
Aug 17 18:23:34 sense kernel: ..done
Aug 17 18:23:34 sense kernel: .
Aug 17 18:23:36 sense root: /etc/rc.shutdown: WARNING: $strongswan_enable is not set properly - see rc.conf(5).
Aug 17 18:23:36 sense syslogd: exiting on signal 15

yes very odd
Title: Re: Message from opnsense-devel-17.1.a_196
Post by: franco on August 23, 2016, 09:20:58 pm
Ok, I think I know what's wrong. Go to your core.git and run:

# git checkout a7e3a8bf5a
# make upgrade


Cheers,
Franco
Title: Re: Message from opnsense-devel-17.1.a_196
Post by: tillsense on August 25, 2016, 06:28:25 pm
hi franco,

the directory does not exist anymore. i had cleared for new fresh clone. at this point i did not know that more goes broken. its ok... alpha testing  ;D

cheers till
Title: Re: Message from opnsense-devel-17.1.a_196
Post by: franco on August 26, 2016, 05:45:41 pm
Hi Till,

Well, then at least let's unearth the issue:

FreeBSD ports pushed an awesome and long-overdue change of the extensions.ini handling within their PHP packages. Long story sort was that installing PHP packages that depend on each other was prone to racing and would sometimes end up in the wrong order, throwing fatal errors or spurious warnings.

Their solution was to split up the extensions.ini into ext-20-gettext.ini et al., where each plugin (gettext in this case) would get its private extensions file, which PHP itself sorts using the priority (20 in this case) so that all the dependencies are properly ordered.

This scared the hell out of me when I saw it, because it could potentially brick OPNsense on firmware upgrades like you've seen, although I did not know what the exact error would be. We pushed this for 16.7.2 and all went fine (thank god!). But now seeing your issue it's exactly what could go wrong: we stop writing the extensions.ini file that even m0n0wall must have written back then and in doing so it would break the system under the following condition:

The new packages for OPNsense 16.7.2 were not applied before going beyond the core.git's master branch state. opnsense-devel is version 17.1.a_194 on 16.7.2's packages, and you tripped over the critical section by applying the development changes before the packages itself were ready for it.

Sorry for this, I should have waited a while before I flipped the kill-switch for the extensions.ini:

https://github.com/opnsense/core/commit/706d2804e134

Restoring that bit or manually bringing back the extensions.ini would fix your setup, because it would allow PHP to load Phalcon.

Do you still want to fix this system or set it up again?


Cheers,
Franco