OPNsense Forum

Archive => 20.7 Legacy Series => Topic started by: networkfan on January 25, 2021, 12:06:05 pm

Title: Update firmware in terminal | transfer timed out (20.7)
Post by: networkfan on January 25, 2021, 12:06:05 pm
Hi,

I'm new on OPNsense and install it into a VM.

For some reason the system can not load the updates:
Code: [Select]
Fetching change log information, please wait... fetch: transfer timed outFound this topic [1] and verify prefer IPv4 over IPv6 is set.

Ping on terminal to opnsense.org is ok, so internet connection working.
Any idea?

[1] https://forum.opnsense.org/index.php?topic=6097.0

Edit: Download a image with curl on the OPNsense terminal work also, but has a delay of 8-9 seconds.
Look like there is a problem on the DNS, maybe the timeout of the updater is to short?
Title: Re: Update firmware in terminal | transfer timed out (20.7)
Post by: franco on January 25, 2021, 01:24:50 pm
"fetch:" means libfetch so something is wrong. curl is not an appropriate test, try to download the same image using "fetch" utility instead:

# fetch -v "URL"


Cheers,
Franco
Title: Re: Update firmware in terminal | transfer timed out (20.7)
Post by: networkfan on January 25, 2021, 01:42:01 pm
Hi Franco,

thanks for reply.

fetch -v URL works as expected, test file is downloaded:
Code: [Select]
root@OPNsense:/tmp # fetch -v https://mirror.dns-root.de/opnsense/releases/20.7/OPNsense-20.7-OpenSSL-nano-amd64.img.bz2
resolving server address: mirror.dns-root.de:443
SSL options: 82004854
Peer verification enabled
Using CA cert file: /usr/local/etc/ssl/cert.pem
Verify hostname
TLSv1.3 connection established using TLS_AES_256_GCM_SHA384
Certificate subject: /C=US/ST=CA/L=San Francisco/O=Cloudflare, Inc./CN=sni.cloudflaressl.com
Certificate issuer: /C=US/O=Cloudflare, Inc./CN=Cloudflare Inc ECC CA-3
requesting https://mirror.dns-root.de/opnsense/releases/20.7/OPNsense-20.7-OpenSSL-nano-amd64.img.bz2
remote size / mtime: 443121899 / 1596067234
OPNsense-20.7-OpenSSL-nano-amd64.img.bz2               422 MB 8726 kBps    49s
root@OPNsense:/tmp #

But update do not work:
Code: [Select]
Enter an option: 12

Fetching change log information, please wait... fetch: transfer timed out
fetch: /tmp/changelog/changelog.txz.sig appears to be truncated: 0/1332 bytes

This will automatically fetch all available updates, apply them,
and reboot if necessary.

This update requires a reboot.

Proceed with this action? [y/N]:

*** OPNsense.localdomain: OPNsense 20.7 (amd64/OpenSSL) ***

Oh, maybe only the changelog is the problem, try it with "Proceed with this action? [y/N]:y"...
Title: Re: Update firmware in terminal | transfer timed out (20.7)
Post by: networkfan on January 25, 2021, 01:46:47 pm
Look like it works  :)

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

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.
Updating database digests format: .......... done
New version of pkg detected; it needs to be installed first.
The following 1 package(s) will be affected (of 0 checked):

Installed packages to be UPGRADED:
pkg: 1.12.0_1 -> 1.15.10_2

Number of packages to be upgraded: 1

4 MiB to be downloaded.
[1/1] Fetching pkg-1.15.10_2.txz: .......... done
Checking integrity... done (0 conflicting)
[1/1] Upgrading pkg from 1.12.0_1 to 1.15.10_2...
[1/1] Extracting pkg-1.15.10_2: .......... done
pkg-static: Failed to execute lua script: [string "args = {}..."]:11: attempt to call a nil value (field 'stat')
Updating OPNsense repository catalogue...
OPNsense repository is up to date.
All repositories are up to date.
Checking for upgrades (103 candidates): .......... done
Processing candidates (103 candidates): ....... done
The following 77 package(s) will be affected (of 0 checked):
Title: Re: Update firmware in terminal | transfer timed out (20.7)
Post by: franco on January 25, 2021, 01:53:11 pm
Yes looks good, the default answer to that question is "N"(o) :D


Cheers,
Franco
Title: Re: Update firmware in terminal | transfer timed out (20.7)
Post by: franco on January 25, 2021, 01:56:22 pm
PS: not sure what's wrong with the changelog. Normally it could be a proxy filtering out the binary signature...
Title: Re: Update firmware in terminal | transfer timed out (20.7)
Post by: networkfan on January 25, 2021, 02:00:07 pm
Yes looks good, the default answer to that question is "N"(o) :D
...yes   ;D

Code: [Select]
OPNsense 20.7.8-amd64
FreeBSD 12.1-RELEASE-p12-HBSD
OpenSSL 1.1.1i 8 Dec 2020

Edit:
Update over GUI/Terminal still show the same error, maybe snort in front of OPNsense block something (even if i don't see an alert...).
Title: Re: Update firmware in terminal | transfer timed out (20.7)
Post by: networkfan on April 19, 2021, 11:22:56 am
@ franco,

thank you for the help, my donation is on the way.
Title: Re: Update firmware in terminal | transfer timed out (20.7)
Post by: franco on April 19, 2021, 03:43:32 pm
No final response back then so I guess this started to work afterwards? Thanks!


Cheers,
Franco
Title: Re: Update firmware in terminal | transfer timed out (20.7)
Post by: networkfan on April 19, 2021, 06:55:43 pm
Yes works.

My OPNSense test setup was behind a pfSense and not all necessary ports was open (tcpdump show the issue).
OPNSense is really interesting!
Title: Re: Update firmware in terminal | transfer timed out (20.7)
Post by: franco on April 19, 2021, 07:55:55 pm
Ah ok nice to hear that was easy to track down. 8)


Cheers,
Franco