Project

General

Profile

Bug #6594

Package reinstallation post-config restore hangs if no Internet connectivity

Added by Chris Buechler about 1 year ago. Updated 3 months ago.

Status:
Resolved
Priority:
High
Category:
Package System
Target version:
Start date:
07/09/2016
Due date:
% Done:

100%

Affected version:
2.3.x
Affected Architecture:
All

Description

If you restore a config, and upon reboot the system doesn't have Internet connectivity when trying to update metadata for packages, it'll get stuck during boot. It needs to timeout and continue with the boot in that circumstance like <=2.2.x.

2.4.0.b.20170401.1306-6594-boot-output (3.2 KB) James Dekker, 04/01/2017 09:33 PM

Associated revisions

Revision 9c91c7bd
Added by Doktor Notor 7 months ago

Fix the pkg_call() and set the timeout to a sane value (Bug #6594)

Revision a21a36fe
Added by Doktor Notor 7 months ago

Fix the pkg_call() and set the timeout to a sane value (Bug #6594)
(cherry picked from commit 9c91c7bd747074b8cdaa90e8810f0c2df081f72d)

Revision a1147a30
Added by Doktor Notor 7 months ago

Fix the pkg_call() and set the timeout to a sane value (Bug #6594)
(cherry picked from commit 9c91c7bd747074b8cdaa90e8810f0c2df081f72d)

History

#1 Updated by Jim Thompson about 1 year ago

  • Assignee set to Renato Botelho

#2 Updated by Adam Piasecki about 1 year ago

This happens even without packages installed. I restored a config without any package information in it. Even selected
"Do not backup package information." when backing up the config. It still hangs on boot.

#3 Updated by Chris Buechler about 1 year ago

  • Description updated (diff)
  • Priority changed from Normal to High

It's still the package reinstall that gets hung up, regardless of whether or not you have packages installed. It sets needs_package_sync_after_reboot regardless of whether there are packages in the config, which is where it gets hung.

#4 Updated by Kevin Wojniak 9 months ago

I'm running into this right now. Not a big network guy, just trying to replace our small business' router with a SG-4860 1U and twiddling my thumbs while the router sits and attempts to access WAN even though interfaces haven't been assigned (I did a restore of the config from the web).

I think changing it to not attempt 3 (?) times and use a lower timeout would greatly help. Then I could be on my way home sooner :)

#5 Updated by Pig Monkey 9 months ago

I was just hit by this as well. In my case I am preparing to replace a device at a remote site. I used pfsense's restore functionality to upload the configuration from the old device to the new device, and rebooted. Then wondered why it seemed to still be hanging 15 minutes later.

After throwing in a serial cable and power cycling the new device, I saw the "Waiting for Internet connection to update pkg metadata and finish package reinstallationUpdating pfSense-core repository catalogue..." message. After hanging there for a while it moves on to "Updating pfSense repository catalogue..." and then hangs again. It finally errors there, and then moves on to hanging at "Updating pfSense-core repository catalogue..." And then it loops back to "pfSense repository catalogue...". It does the loop 3 or 4 times.

A shorter timeout is definitely appropriate. If the first check fails, it would be nice if it did not attempt the subsequent updates. Perhaps there should be some sort of "offline" boot option that we can use to prevent any connection attempts if we know we're going to bring the device up without WAN.

#6 Updated by Renato Botelho 7 months ago

Kevin Wojniak wrote:

I'm running into this right now. Not a big network guy, just trying to replace our small business' router with a SG-4860 1U and twiddling my thumbs while the router sits and attempts to access WAN even though interfaces haven't been assigned (I did a restore of the config from the web).

I think changing it to not attempt 3 (?) times and use a lower timeout would greatly help. Then I could be on my way home sooner :)

Which version were you upgrading to?

#7 Updated by Renato Botelho 7 months ago

Pig Monkey wrote:

I was just hit by this as well. In my case I am preparing to replace a device at a remote site. I used pfsense's restore functionality to upload the configuration from the old device to the new device, and rebooted. Then wondered why it seemed to still be hanging 15 minutes later.

After throwing in a serial cable and power cycling the new device, I saw the "Waiting for Internet connection to update pkg metadata and finish package reinstallationUpdating pfSense-core repository catalogue..." message. After hanging there for a while it moves on to "Updating pfSense repository catalogue..." and then hangs again. It finally errors there, and then moves on to hanging at "Updating pfSense-core repository catalogue..." And then it loops back to "pfSense repository catalogue...". It does the loop 3 or 4 times.

A shorter timeout is definitely appropriate. If the first check fails, it would be nice if it did not attempt the subsequent updates. Perhaps there should be some sort of "offline" boot option that we can use to prevent any connection attempts if we know we're going to bring the device up without WAN.

Which version were you upgrading to?

#8 Updated by Pig Monkey 7 months ago

Renato Botelho wrote:

Which version were you upgrading to?

2.3.2

#9 Updated by Kill Bill 7 months ago

Someone test this, perhaps? https://github.com/pfsense/pfsense/pull/3582

Dunno, but it seems to me someone has misread the PHP docs.

#10 Updated by Renato Botelho 7 months ago

Kill Bill wrote:

Someone test this, perhaps? https://github.com/pfsense/pfsense/pull/3582

Dunno, but it seems to me someone has misread the PHP docs.

It was really a bug, thanks for spotting it but it has no relation with this one. That piece of code is only used by GUI, during boot only pfSense-upgrade is used.

#11 Updated by Renato Botelho 7 months ago

  • Status changed from Confirmed to Feedback
  • % Done changed from 0 to 100

Pig Monkey wrote:

Renato Botelho wrote:

Which version were you upgrading to?

2.3.2

It has a fix on 2.3.3 and 2.4.0. I couldn't replicate it anymore

#12 Updated by Kill Bill 7 months ago

Renato Botelho wrote:

Kill Bill wrote:

Someone test this, perhaps? https://github.com/pfsense/pfsense/pull/3582

Dunno, but it seems to me someone has misread the PHP docs.

It was really a bug, thanks for spotting it but it has no relation with this one. That piece of code is only used by GUI, during boot only pfSense-upgrade is used.

Well, at least it definitely seems to have fixed the GUI freeze on package (re)install.

#13 Updated by James Dekker 6 months ago

On 2.4.0.b.20170401.1306, when a backup from 2.4.0.b.20170328.1156 is restored with no WAN connectivity the attached console output is shown. pfSense is not accessible from the WebGUI until the process times out and it moves on.

#14 Updated by Paighton Bisconer 5 months ago

On 2.4.0.b.20170407.1403, backed up config, restored with no WAN connectivity, pfSense WEBGUI was accessible, console did hang on reinstalling packages but once WAN was restored everything worked fine. No crashes or hangs while restoring config other than waiting for packages.

#15 Updated by Jim Pingle 5 months ago

  • Target version changed from 2.4.0 to 2.3.4
  • Affected Architecture set to All

#16 Updated by Renato Botelho 5 months ago

  • Status changed from Feedback to Resolved

#17 Updated by Marco Hofmann 4 months ago

Hello everybody.
I'm at a customer site today with several branch offices. I sit at the head quarter and prepare three pfsense boxes for replacement. There are old x86 aplliances I have to replace. I grabbed the config.xml from the old appliances and installed a fresh version of 2.3.4 onto the new hardware. I then logged on to the WebGUI and restored the config.xml. I knew about this bug here so I thought the restore would be much quicker. But I already wait for over 30 minutes now. Is this not fixed with 2.3.4 ?

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...

#18 Updated by Oliver Hansen 3 months 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...

#19 Updated by Marco Hofmann 3 months ago

I opened a new ticket for that problem, as the old one (this one) is closed
https://redmine.pfsense.org/issues/7604

You can post your content there please.

Also available in: Atom PDF