Project

General

Profile

Actions

Bug #6594

closed

Package reinstallation post-config restore hangs if no Internet connectivity

Added by Chris Buechler almost 8 years ago. Updated almost 7 years ago.

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

100%

Estimated time:
Plus Target Version:
Release Notes:
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.


Files

Actions #1

Updated by Jim Thompson almost 8 years ago

  • Assignee set to Renato Botelho
Actions #2

Updated by Adam Piasecki almost 8 years 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.

Actions #3

Updated by Chris Buechler almost 8 years 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.

Actions #4

Updated by Kevin Wojniak over 7 years 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 :)

Actions #5

Updated by Pig Monkey over 7 years 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.

Actions #6

Updated by Renato Botelho about 7 years 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?

Actions #7

Updated by Renato Botelho about 7 years 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?

Actions #8

Updated by Pig Monkey about 7 years ago

Renato Botelho wrote:

Which version were you upgrading to?

2.3.2

Actions #9

Updated by Kill Bill about 7 years ago

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

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

Actions #10

Updated by Renato Botelho about 7 years 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.

Actions #11

Updated by Renato Botelho about 7 years 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

Actions #12

Updated by Kill Bill about 7 years 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.

Actions #13

Updated by Anonymous about 7 years 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.

Actions #14

Updated by Paighton Bisconer about 7 years 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.

Actions #15

Updated by Jim Pingle almost 7 years ago

  • Target version changed from 2.4.0 to 2.3.4
  • Affected Architecture All added
  • Affected Architecture deleted ()
Actions #16

Updated by Renato Botelho almost 7 years ago

  • Status changed from Feedback to Resolved
Actions #17

Updated by Marco Hofmann almost 7 years 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...

Actions #18

Updated by Oliver Hansen almost 7 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...

Actions #19

Updated by Marco Hofmann almost 7 years 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.

Actions

Also available in: Atom PDF