Upgrade error opnsense: 23.7.9 -> 23.7.10_1

Started by JohnnyBeGood, December 13, 2023, 01:44:17 AM

Previous topic - Next topic
Hey all,

Just recently started using OPNsense at home and when I tried to update I got the below error. Does anyone know how to fix it?

***GOT REQUEST TO UPDATE***
Currently running OPNsense 23.7.9 at Tue Dec 12 16:30:49 PST 2023
Updating OPNsense repository catalogue...
Waiting for another process to update repository OPNsense
All repositories are up to date.
Updating OPNsense repository catalogue...
OPNsense repository is up to date.
All repositories are up to date.
Checking for upgrades (58 candidates): .......... done
Processing candidates (58 candidates): . done
The following 2 package(s) will be affected (of 0 checked):

Installed packages to be UPGRADED:
opnsense: 23.7.9 -> 23.7.10_1
os-ddclient: 1.17 -> 1.18

Number of packages to be upgraded: 2
Checking integrity... done (0 conflicting)
pkg-static: archive_read_open_filename(/var/cache/pkg/os-ddclient-1.18~753e302a6f.pkg): Lzma library error: Corrupted input data
Starting web GUI...done.
Generating RRD graphs...done.
***DONE***

December 13, 2023, 06:53:09 AM #1 Last Edit: December 13, 2023, 06:59:45 AM by sysadmin75421
Click close .  Then click Apply . It will install the 2 needed packages

Or  you can go to the console and select option 12. That will also update the system.

Thank you for the reply!

Below is the console output. Using GUI is an endless loop. Any other suggestions?

   0) Logout                              7) Ping host
  1) Assign interfaces                   8) Shell
  2) Set interface IP address            9) pfTop
  3) Reset the root password            10) Firewall log
  4) Reset to factory defaults          11) Reload all services
  5) Power off system                   12) Update from console
  6) Reboot system                      13) Restore a backup

Enter an option: 12

Fetching change log information, please wait... done

This will automatically fetch all available updates and apply them.

Proceed with this action? [y/N]: y

Hi!

A number of FreeBSD source code changes accumulated so it is better
to have them delivered to your doorstep before the holidays are in
full swing.

Here are the full patch notes:

o system: improve config revision audit ability
o system: cleanse system_get_language_code() output
o system: safeguard /tmp/PHP_errors.log file before usage
o system: add an optional random delay before executing remote backups
o system: fix regression in log viewer level selector
o reporting: OpenVPN server instances were missing from respective health graph
o interfaces: move interface list widget link to assignments page
o interfaces: add new backend jobs and extend with optional parameter
o interfaces: add validation for proxy ARP strict subnet use
o firewall: improve alias write behaviour by checking for changes beforehand
o firewall: fix preg_replace() to avoid truncated network display in rules listing
o firewall: add an ifconfig.debug file
o firmware: switch bogons/changelog set base URL to portable "opnsense-update -X" call
o ipsec: move save button on mobile page into its own container
o ipsec: add support for RADIUS class groups in instances
o unbound: use tls-system-cert instead of tls-cert-bundle
o web proxy: fix setting unknown language directory
o ui: upgrade jqTree to version 1.7.5
o plugins: os-ddclient 1.18[1]
o plugins: os-dec-hw 1.0 is a Deciso hardware specific dashboard widget
o plugins: os-net-snmp fix for directory setup (contributed by doktornotor)
o plugins: os-telegraf 1.12.10[2]
o plugins: os-upnp now reloads on newwanip event
o plugins: os-wireguard fix for missing firewall reload
o plugins: os-wireguard-go fix for device registration
o src: clang: sanitizer failure with ASLR enabled[3]
o src: dhclient: do not add 0.0.0.0 interface alias
o src: ice: match irdma interface changes
o src: ixv: separate VFTA table for each interface
o src: libnetmap: better fix for port parsing failure
o src: pf: expose more syncookie state information to userspace
o src: pf: fix mem leaks upon vnet destroy

Updating OPNsense repository catalogue...
OPNsense repository is up to date.
All repositories are up to date.
Updating OPNsense repository catalogue...
OPNsense repository is up to date.
All repositories are up to date.
Checking for upgrades (58 candidates): .......... done
Processing candidates (58 candidates): . done
The following 2 package(s) will be affected (of 0 checked):

Installed packages to be UPGRADED:
        opnsense: 23.7.9 -> 23.7.10_1
        os-ddclient: 1.17 -> 1.18

Number of packages to be upgraded: 2
Checking integrity... done (0 conflicting)
pkg-static: archive_read_open_filename(/var/cache/pkg/os-ddclient-1.18~753e302a6f.pkg): Lzma library error: Corrupted input data
Starting web GUI...done.
Generating RRD graphs...done.



Remove the offending file and try again?


rm -f /var/cache/pkg/os-ddclient-1.18~753e302a6f.pkg

getting this error trying to upgrade to 23.7.10 from .9

***GOT REQUEST TO CHECK FOR UPDATES***
Currently running OPNsense 23.7.9 at Wed Dec 13 06:58:30 EST 2023
Fetching changelog information, please wait... Missing /usr/local/etc/pkg/repos/OPNsense.conf
Repository not found: OPNsense
Updating FreeBSD repository catalogue...
pkg: sqlite error while executing SELECT count(name) FROM sqlite_master WHERE type='table' AND name='repodata'; in file pkgdb.c:2367: database is locked
pkg: Repository FreeBSD contains no repodata table, need to re-create database
Fetching meta.conf: . done
Fetching packagesite.pkg: .......... done
Processing entries: .......... done
FreeBSD repository update completed. 33987 packages processed.
pkg: sqlite error while executing DROP TABLE repo_update; in file pkgdb.c:2343: malformed database schema (packages_origin) - invalid rootpage
All repositories are up to date.
pkg: Unknown repository: OPNsense
pkg: sqlite error while executing SELECT count(name) FROM sqlite_master WHERE type='table' AND name='repodata'; in file pkgdb.c:2367: database is locked
pkg: Repository FreeBSD contains no repodata table, need to re-create database
pkg: Repository FreeBSD cannot be opened. 'pkg update' required
Checking for upgrades (0 candidates): . done
Processing candidates (0 candidates): . done
Checking integrity... done (0 conflicting)
Your packages are up to date.
self: No packages available to install matching 'opnsense'

opnsense-bootstrap time I guess. This looks pretty damaged.


Cheers,
Franco

did opnsense-bootstrap but got stuck here -

--
Beep! Beep!
Fetching base-23.7.10-amd64.txz: ...client_loop: send disconnect: Broken pipe

The base system doesn't matter although it points to a somewhat persistent connectivity issue on your end... Packages should be reinstalled cleanly now.

You can do a health audit to confirm.


Cheers,
Franco

thanks, a reboot and everything came up fine.  thank you

Ok, but make sure FreeBSD repository is disabled properly again so it can't mess with the package dependencies.


Cheers,
Franco

Quote from: doktornotor on December 13, 2023, 11:21:58 AM
Remove the offending file and try again?


rm -f /var/cache/pkg/os-ddclient-1.18~753e302a6f.pkg

Yes, that's how I resolved my issue! Thank you!
I had two "os-ddclient-1.18" renamed to "os-ddclient-1.18~753e302a6f.pkg2" and the upgrade finally completed.



OK, thanks for feedback. Sounds like pkg{,-static} bug to me, I'd say unlinking and trying to refetch the broken package file would be a much saner behaviour than giving up with a cryptic error.

Quote from: doktornotor on December 13, 2023, 03:58:19 PM
OK, thanks for feedback. Sounds like pkg{,-static} bug to me, I'd say unlinking and trying to refetch the broken package file would be a much saner behaviour than giving up with a cryptic error.
You're welcome, and thank you for your suggestion! There's no way I would be able to fix it alone.