OPNsense Forum

English Forums => 21.7 Legacy Series => Topic started by: XeroX on July 28, 2021, 06:06:56 pm

Title: OPNSense Upgrade 21.7
Post by: XeroX on July 28, 2021, 06:06:56 pm
Hello,
my setup seems to be broke after the update.

Updated via console and it is leaving me with a 10 minute reboot. configd does not start as some pyhton library is missing. I'm not able to ssh or login on console via root or my user account. It say login incorrect or access denied.

I can login via web, but I'm not able to see logs or running the update again. The dashboard stays empty and the widgets throw an error.

Warning: Invalid argument supplied for foreach() in /usr/local/www/widgets/widgets/smart_status.widget.php on line 48

Is there any way to recover from it? The missing python library seems to be jinja2.

Report is sent via WebUI, maybe someone can see the full log, as I cant.

Any chances to modify the boot parameter to be logged in as root without pw prompt?

Cheers

Title: Re: OPNSense Upgrade 21.7
Post by: franco on July 28, 2021, 08:01:08 pm
Twitter user had a similar issue and suggested that the following fixed it:

# opnsense-update -u


Cheers,
Franco
Title: Re: OPNSense Upgrade 21.7
Post by: k0ns0l3 on July 28, 2021, 08:15:39 pm
# opnsense-update -u
Fetching packages-21.7-LibreSSL-amd64.tar: ..................................... done
Fetching base-21.7-amd64.txz: .. failed, no signature found

 ???
Title: Re: OPNSense Upgrade 21.7
Post by: franco on July 28, 2021, 09:02:37 pm
Can you add "-V" ? The files are definitely on the mirror so whatever is happening is more on the local end...


Cheers,
Franco
Title: Re: OPNSense Upgrade 21.7
Post by: XeroX on July 28, 2021, 10:44:26 pm
Twitter user had a similar issue and suggested that the following fixed it:

# opnsense-update -u


Cheers,
Franco

Sadly I'm not able to access OPNSense via Console or SSH. Any tips how to restore the access?

Is there anything like with linux to boot with init=/bin/sh
Title: Re: OPNSense Upgrade 21.7
Post by: XeroX on July 28, 2021, 11:11:00 pm
Okay, I got this def*cked.

- Removed check on:  Console menu    Password protect the console menu
- Was able to access console again.
- run pkg update
- run opnsense-update -u
- dont reboot
- run opnsense-update to install all packages that where missing

Nightmare :) Now everything works fine again.

Still shows "OPNsense 21.1.9_1-amd64" but uname -a shows 21.7.

EDIT:
Update for packages is normal?
packages   21.1.9_1   21.7   upgrade   OPNsense

This gives some configd errors again, but runs through and then everything went on normal.


Thanks to everyone.
Title: Re: OPNSense Upgrade 21.7
Post by: franco on July 29, 2021, 08:24:47 am
Looks like that needed more nudging.... essentially the package upgrade did not go through (uname shows kernel info) and it still needed the packages update to 21.7.

As to why the first packages upgrade failed it's hard to tell. There's /var/cache/opnsense-update/.upgrade.log but that resets after each invoke so when you end up where you are supposed to be the error is likely gone already.


Cheers,
Franco
Title: Re: OPNSense Upgrade 21.7
Post by: XeroX on July 29, 2021, 10:01:37 am
I remember that the first update installed kernel and packages. The package proably failed due to missing pyhton module and configd was not able to start. The system rebooted.

It ended up like I described before and all packages where marked as missing. Shouldn't all single packages be reinstalled as well?

Can I provide any logfiles to help? Will check .upgrade.log.
Title: Re: OPNSense Upgrade 21.7
Post by: XeroX on July 29, 2021, 10:56:46 am
Maybe this helps.

https://pastebin.com/1N48KJT2

Code: [Select]
configd not running? (check /var/run/configd.pid).
Starting configd.
Traceback (most recent call last):
  File "/usr/local/opnsense/service/configd.py", line 43, in <module>
    import modules.processhandler
  File "/usr/local/opnsense/service/modules/processhandler.py", line 43, in <mod                                                                                                                                                                             ule>
    from . import ph_inline_actions, syslog_error, syslog_info, syslog_notice, s                                                                                                                                                                             ingleton
  File "/usr/local/opnsense/service/modules/ph_inline_actions.py", line 32, in <                                                                                                                                                                             module>
    from . import template
  File "/usr/local/opnsense/service/modules/template.py", line 42, in <module>
    import jinja2
ModuleNotFoundError: No module named 'jinja2'
/usr/local/etc/rc.d/configd: WARNING: failed to start configd
Title: Re: OPNSense Upgrade 21.7
Post by: franco on July 29, 2021, 11:38:14 am
This is a transitional error that only appears due to the ordering of upgrades in the package manager when moving from Python 3.7 to 3.8. It won't cause issues with the upgrade itself.


Cheers,
Franco
Title: Re: OPNSense Upgrade 21.7
Post by: XeroX on July 29, 2021, 11:45:26 am
Hello franco,
thanks for your quick reply.

This was the error message when I ended up stick during startup. However sry that I can't add more as I describe above to resolve this for anyone who gets stuck there as well.

Maybe you can add to the announcement that the update may takes up to 15 minutes, as I noticed it went up to 220/244 packages and ended up trying to start configd after every past package. This added alot of time.

Thanks for you work!

Cheers
Title: Re: OPNSense Upgrade 21.7
Post by: franco on July 29, 2021, 11:49:32 am
Hi,

Depending on the disk speed the upgrade can take more than one hour worst case. We always recommend watching via monitor or serial console to be sure there is ongoing progress. During these major upgrades the system goes into a upgrade-only boot so it's not connected to the network and it appears as "downtime", but that is also done for safety reasons.... :)

It's hard to say it takes X minutes for this reason alone and then you have a lot of hardware that takes forever to boot anyway (looking at you, HP).


Cheers,
Franco