pkg(8): "An error occured while fetching package: No error"

From: Jim Long <stable_at_umpquanet.com>
Date: Mon, 10 Feb 2025 20:36:16 UTC
A fuller write-up is at:

https://forums.freebsd.org/threads/pkg-8-an-error-occured-while-fetching-package-no-error.96761/

Or I can re-post it here if folk prefer.


FreeBSD 14.2-STABLE #0 stable/14-n270227-b40ca26721d7: Sun Jan 26 12:59:37 PST 2025     root@buildhost.example.edu:/usr/obj/usr/src/amd64.amd64/sys/GENERIC


What does the error at reference mean?  One way it arises is a DNS
failure, but I don't believe that's my case, based on tcpdump showing
100% successful DNS lookups, and the fact that the problem persists even
when using the well-known public DNS server 8.8.8.8.

The symptoms are that pkg audit will sometimes work and sometimes fail, 
with no discernable pattern:

jimsdesk : 06:18:23 /root# pkg-static -v; pkg-static audit -Fq
2.0.5
mariadb1011-server-10.11.10_1
firefox-134.0.2,2
jimsdesk : 06:25:16 /root# pkg-static audit -Fq
pkg-static: An error occured while fetching package: No error
pkg-static: cannot fetch vulnxml file
jimsdesk : 06:25:18 /root# pkg-static audit -Fq
mariadb1011-server-10.11.10_1
firefox-134.0.2,2
jimsdesk : 06:25:19 /root# pkg-static audit -Fq
pkg-static: An error occured while fetching package: No error
pkg-static: cannot fetch vulnxml file
jimsdesk : 06:25:20 /root# pkg-static audit -Fq
mariadb1011-server-10.11.10_1
firefox-134.0.2,2


Thank you for any pointers you can offer.