Project

General

Profile

Bug #7604

Bug #6594 is not resolved: Waiting for Internet connection to update pkg metadata and finish package reinstallation

Added by Marco Hofmann almost 3 years ago. Updated over 1 year ago.

Status:
Resolved
Priority:
High
Category:
Backup / Restore
Target version:
Start date:
05/26/2017
Due date:
% Done:

100%

Estimated time:
Affected Version:
2.3.4
Affected Architecture:
amd64

Description

I reference Bug #6594 - https://redmine.pfsense.org/issues/6594#change-32802

I left a comment there, but the bug is closed so I start a new one. (https://redmine.pfsense.org/issues/6594#note-17)
I was watching this issue for a few months now. We visit a lot of customers with branch offices, where we replace 32bit hardware against 64bit hardware. We install the new hardware before we go to the customer and restore the config.xml file with no WAN link. This has a timeout from about 30-45 minutes. This is really really annoying.
I had this on the last appointment with two fresh 2.3.4 boxes and no difference at all in comparison to the old 2.3.x releases.

As long as these boxes are planed to be swapped, this is no problem at all. But I fear the day when I would have to emergency restore a config.xml on spare hardware, and would have to wait 30+ minutes just to get the box only. This was a few minutes task in the past.

Configuring CRON...done.
Starting NTP time client...done.
Starting DHCP service...done.
Starting DHCPv6 service...done.
Configuring firewall......done.
Configuring IPsec VPN... done
Generating RRD graphs...done.
Waiting for Internet connection to update pkg metadata and finish package reinstallationUpdating pfSense-core repository catalogue...
repository pfSense-core has no meta file, using default settings
Unable to update repository pfSense-core
Updating pfSense repository catalogue...
repository pfSense has no meta file, using default settings
Unable to update repository pfSense
Error updating repositories!

ERROR!!! An error occurred on pkg execution (rc = 70) with parameters 'update -f':
pkg: https://pkg.pfsense.org/pfSense_v2_3_4_amd64-core/meta.txz: No address record
pkg: https://pkg.pfsense.org/pfSense_v2_3_4_amd64-core/packagesite.txz: No address record
pkg: https://pkg.pfsense.org/pfSense_v2_3_4_amd64-pfSense_v2_3_4/meta.txz: No address record
pkg: https://pkg.pfsense.org/pfSense_v2_3_4_amd64-pfSense_v2_3_4/packagesite.txz: No address record

.Updating pfSense-core repository catalogue...
repository pfSense-core has no meta file, using default settings
Unable to update repository pfSense-core
Updating pfSense repository catalogue...
repository pfSense has no meta file, using default settings
Unable to update repository pfSense
Error updating repositories!

ERROR!!! An error occurred on pkg execution (rc = 70) with parameters 'update -f':
pkg: Repository pfSense-core load error: access repo file(/var/db/pkg/repo-pfSense-core.sqlite) failed: No such file or directory
pkg: https://pkg.pfsense.org/pfSense_v2_3_4_amd64-core/meta.txz: No address record
pkg: https://pkg.pfsense.org/pfSense_v2_3_4_amd64-core/packagesite.txz: No address record
pkg: Repository pfSense load error: access repo file(/var/db/pkg/repo-pfSense.sqlite) failed: No such file or directory
pkg: https://pkg.pfsense.org/pfSense_v2_3_4_amd64-pfSense_v2_3_4/meta.txz: No address record
pkg: https://pkg.pfsense.org/pfSense_v2_3_4_amd64-pfSense_v2_3_4/packagesite.txz: No address record

.Updating pfSense-core repository catalogue...

Associated revisions

Revision 10511c3b (diff)
Added by Renato Botelho over 1 year ago

Fix #7604: Rework pkg reinstall on config restore

- Remove old code needed to upgrade fom < 2.3 to 2.3
- Simplify logic using a single file /conf/needs_package_sync
- Create /etc/rc.package_reinstall_all, a script used to reinstall all
packages present in config but not on pkg database
- Make rc.bootup to call rc.package_reinstall_all to run in background

History

#1 Updated by Oliver Hansen over 2 years ago

Just happened to me as well. Brand new SG-2440 from Netgate with 2.3.4 pre-installed. I restored a config from the old router which is also on 2.3.4 and I've been waiting for over 20 minutes and so far it just keeps looping. Going to be late to the office after waiting for this to finish.

Waiting for Internet connection to update pkg metadata and finish package reinstallationUpdating pfSense-core repository catalogue...
repository pfSense-core has no meta file, using default settings

Unable to update repository pfSense-core
Updating pfSense repository catalogue...
repository pfSense has no meta file, using default settings
Unable to update repository pfSense
Error updating repositories!

ERROR!!! An error occurred on pkg execution (rc = 70) with parameters 'update -f':
pkg: Repository pfSense-core load error: access repo file(/var/db/pkg/repo-pfSense-core.sqlite) failed: No such file or directory
pkg: https://firmware.netgate.com/pkg/pfSense_factory-v2_3_4_amd64-core/meta.txz: No address record
pkg: https://firmware.netgate.com/pkg/pfSense_factory-v2_3_4_amd64-core/packagesite.txz: No address record
pkg: Repository pfSense load error: access repo file(/var/db/pkg/repo-pfSense.sqlite) failed: No such file or directory
pkg: https://firmware.netgate.com/pkg/pfSense_factory-v2_3_4_amd64-pfSense_factory-v2_3_4/meta.txz: No address record
pkg: https://firmware.netgate.com/pkg/pfSense_factory-v2_3_4_amd64-pfSense_factory-v2_3_4/packagesite.txz: No address record

.Updating pfSense-core repository catalogue...
repository pfSense-core has no meta file, using default settings
Unable to update repository pfSense-core
Updating pfSense repository catalogue...

#2 Updated by Adam Piasecki over 2 years ago

This is happening to me too, have a fresh 2.3.4 install. I will restore config from another 2.3.4 install. Sure enough hangs on boot. Is there anyway to restore a config without internet connection?

#3 Updated by Guillem Parera over 2 years ago

A quick workaround:

Interrupt update process with ctrl+c and enter to a shell. Then:
vi /usr/local/etc/pkg/repos/pfSense.conf

Change the "enabled" option from "yes" to "no". Save and exit. Exit the shell. On next boot the update process will fail only spending a few seconds and booting normally.

#4 Updated by chip br over 2 years ago

Just happened to me, moments ago.

Backup up a 2.3.4 machine (server is unstable) and replaced the server hardware with a fresh new 2.3.4 copy.
After reloading the backup config and fixing the interfaces, i´ve rebooted and the server hang

I can confirm that using @Guillem Parera workaround can make the server boot normally, apart from throwing 3-4 connection errors on boot

#5 Updated by Adam Best over 2 years ago

Same issue as above.

Experienced issues with package updates not registering. Tried to run the command from CLI and it threw this error:

Updating pfSense-core repository catalogue...
pkg: Repository pfSense-core load error: access repo file(/var/db/pkg/repo-pfSense-core.sqlite) failed: No such file or directory

Sure enough, that file was missing and was not being regenerated. Thought to backup and restore, now I'm at the hang at boot and even after @Guillem Parera's work around, pkg will not update because that file is missing.

2 months and no word, no assignee?

#6 Updated by Kill Bill over 2 years ago

Definitely confirmed as not fixed at all. The easiest way to reproduce is to exploit the pfBNG + unbound bug. Missing include file -> unbound not starting -> no DNS, cannot update repo -> hangs on boot forever until your CTRL+C and exit (that is, if you have serial console).

Reproduced on latest 2.4 snapshot with config.xml restored via USB stick during install.

#7 Updated by Vincent Sencil over 2 years ago

Backup:
1. Backup by ticking Skip packages
2. Backup the Package Manager only

On the server where you want to restore the backup config:
1. Ensure that Installed Packages from the original machine are installed also.

Restore first the backup config (skip packages) then restore the package manager backup.

Reboot the machine.

#8 Updated by Kill Bill over 2 years ago

Vincent Sencil wrote:

Backup:
1. Backup by ticking Skip packages
2. Backup the Package Manager only

On the server where you want to restore the backup config:
1. Ensure that Installed Packages from the original machine are installed also.

Restore first the backup config (skip packages) then restore the package manager backup.

Reboot the machine.

AFAICT this is completely useless exercise since the download is attempted even if no packages whatsoever are installed.

FFS it cannot be so hard to drop the timeouts to SANE values (3 minutes cumulative max. with all retries included), not 30+ minutes!!!

#9 Updated by Kill Bill over 2 years ago

So I just tried again... this must be the most braindead thing ever.

Waiting for Internet connection to update pkg metadata and finish package reinstallation
Updating pfSense-core repository catalogue...
Fetching meta.txz: . done
Fetching packagesite.txz: . done
Processing entries: . done
pfSense-core repository update completed. 7 packages processed.
Updating pfSense repository catalogue...
Fetching meta.txz: . done
Fetching packagesite.txz: .......... done
Processing entries: .......... done
pfSense repository update completed. 485 packages processed.
All repositories are up to date.

Updating pfSense-core repository catalogue... <--- why? You've just finished that!!!
pfSense-core repository is up to date.  <-- No shit, Sherlock!
Updating pfSense repository catalogue... <-- ZOMG.
pfSense repository is up to date. <-- ORLY? I'm shocked!
All repositories are up to date. <-- No way!

And this utter stupidity goes on, and on, and on, with every frickin' package that's supposed to be reinstalled:

Updating pfSense-core repository catalogue...
pfSense-core repository is up to date.
Updating pfSense repository catalogue...
pfSense repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        pfSense-pkg-AutoConfigBackup: 1.47 [pfSense]

Number of packages to be installed: 1
...
Menu items... done.
Writing configuration... done.

Next package:

Updating pfSense-core repository catalogue... <-- Are you a fsckin' Alzheimer or what?
pfSense-core repository is up to date.
Updating pfSense repository catalogue... <-- Right, definitely a severe Alzheimer.
pfSense repository is up to date.
All repositories are up to date.
The following 4 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        pfSense-pkg-nut: 2.7.4_5 [pfSense]
        nut: 2.7.4_4 [pfSense]
        neon: 0.30.1 [pfSense]
        net-snmp: 5.7.3_17 [pfSense]

Number of packages to be installed: 4

OMG this just cannot be humanly possible. Update the goddamn repos ONCE! ONCE!! ONCE!!! It's just enough to do it ONCE!!! NOT once per package FFS!

#10 Updated by Adam Piasecki about 2 years ago

Can't believe this is still a issue. :( At the very least can we just decrease the timeout to like 3mins? I would think that would be fine for all of us.

#11 Updated by Steve Allison about 2 years ago

I've just come across this bug now. Most.. infuriating .. nonsense. In my case I have a working WAN, but you can't select PPPOE0 during the interface assignment post-restore, so as it stands its impossible for me to bypass a 30-45 minutes wait.

#12 Updated by G Black almost 2 years ago

I didn't realize this was a huge issue, but I have a workaround for this.

At the moment booting appears to stop with this error, hit Ctrl+C to break out of the process
This brings you to a prompt to select the shell. Hit <Enter> which selects the default shell, /bin/sh
When you see the shell prompt again type "exit" and it will continue with the rest of the boot process.

This process works for several different errors that hang the boot process but its a great time saver for sure on this specific issue.

#13 Updated by Adam Piasecki almost 2 years ago

G Black wrote:

At the moment booting appears to stop with this error, hit Ctrl+C to break out of the process
This brings you to a prompt to select the shell. Hit <Enter> which selects the default shell, /bin/sh
When you see the shell prompt again type "exit" and it will continue with the rest of the boot process.

This doesn't work, once it starts booting it just gets back to the point where it checks the packages and hangs again. Tried this again, and does the same thing.

#14 Updated by James Dekker almost 2 years ago

Still hitting this in 2.4.3.

#15 Updated by James Dekker almost 2 years ago

  • Target version set to 2.4.4

#16 Updated by Jim Thompson almost 2 years ago

  • Assignee set to Steve Beaver

Assigned to PM for further re-assignment.

#17 Updated by Gareth Hay over 1 year ago

A different workaround for those who are just trying to factory the unit:

Escape to shell, (Single user, CTRL+C)

"cp /conf.default/config.xml /conf/config.xml"

#18 Updated by Steve Beaver over 1 year ago

  • Assignee changed from Steve Beaver to Renato Botelho

#19 Updated by Steve Beaver over 1 year ago

  • Status changed from New to In Progress

#20 Updated by Renato Botelho over 1 year ago

  • Status changed from In Progress to Feedback
  • % Done changed from 0 to 100

#21 Updated by Vladimir Lind over 1 year ago

  • Status changed from Feedback to Resolved

On SG4860 2.4.4 build Tue Aug 14 16:55:58 EDT 2018 - restored config.xml, disabled WAN facing switchport, device booted up without delays:

Configuring WAN interface...done.
Configuring CARP settings...done.
Syncing OpenVPN settings...done.
Configuring firewall......done.
Starting PFLOG...done.
Setting up gateway monitors...done.
Setting up static routes...done.
Setting up DNSs...
Starting DNS Resolver...done.
Synchronizing user settings...done.
Starting webConfigurator...done.
Configuring CRON...done.
Starting NTP time client...done.
Configuring firewall......done.
Generating RRD graphs...done.
Triggering packages reinstallation in background
Starting syslog...done.
Starting CRON... done.
pfSense 2.4.4-DEVELOPMENT amd64 Tue Aug 14 16:55:58 EDT 2018
Bootup complete

FreeBSD/amd64 (pfSense.localdomain) (ttyu1)

Netgate SG-4860 - Serial: NEWSERIALT - Netgate Device ID: xxxxxxxxxxxxxxxxxxx

  • Welcome to pfSense 2.4.4-DEVELOPMENT (amd64) on pfSense ***

    WAN (wan) -> igb1 ->

Looks good.

#22 Updated by Vladimir Lind over 1 year ago

Repeated the same test with installed squid, bind packages - all good, no delay's in bootup.

Also available in: Atom PDF