pkg update doesn't work in a fresh 14.3 install

Hi,
I get the error below when attempting to do pkg update. This is a fresh 14.3 install. Not sure what went wrong. Could you help please?

Code:
# pkg update
Updating FreeBSD repository catalogue...
Unable to update repository FreeBSD
Updating FreeBSD-kmods repository catalogue...
Unable to update repository FreeBSD-kmods
Error updating repositories!

pkg bootstrap -f doesn't work either

Code:
# pkg bootstrap -f
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from pkg+[URL]https://pkg.freebsd.org/FreeBSD:14:amd64/quarterly[/URL], please wait...
pkg: Attempted to fetch pkg+[URL]https://pkg.freebsd.org/FreeBSD:14:amd64/quarterly/Latest/pkg.pkg[/URL]
pkg: Attempted to fetch pkg+[URL]https://pkg.freebsd.org/FreeBSD:14:amd64/quarterly/Latest/pkg.txz[/URL]
pkg: Error: Not Found
A pre-built version of pkg could not be found for your system.
Bootstrapping pkg from pkg+[URL]https://pkg.freebsd.org/FreeBSD:14:amd64/kmods_quarterly_3[/URL], please wait...
pkg: Attempted to fetch pkg+[URL]https://pkg.freebsd.org/FreeBSD:14:amd64/kmods_quarterly_3/Latest/pkg.pkg[/URL]
pkg: Attempted to fetch pkg+[URL]https://pkg.freebsd.org/FreeBSD:14:amd64/kmods_quarterly_3/Latest/pkg.txz[/URL]
pkg: Error: Not Found
A pre-built version of pkg could not be found for your system.

This is the output of pkg -vv

Code:
# pkg -vv
Version                 : 1.21.3
PKG_DBDIR = "/var/db/pkg";
PKG_CACHEDIR = "/var/cache/pkg";
PORTSDIR = "/usr/ports";
INDEXDIR = "";
INDEXFILE = "INDEX-14";
HANDLE_RC_SCRIPTS = false;
DEFAULT_ALWAYS_YES = false;
ASSUME_ALWAYS_YES = false;
REPOS_DIR [
    "/etc/pkg/",
    "/usr/local/etc/pkg/repos/",
]
PLIST_KEYWORDS_DIR = "";
SYSLOG = true;
ABI = "FreeBSD:14:amd64";
ALTABI = "freebsd:14:x86:64";
DEVELOPER_MODE = false;
VULNXML_SITE = "[URL]http://vuxml.freebsd.org/freebsd/vuln.xml.xz[/URL]";
FETCH_RETRY = 3;
PKG_PLUGINS_DIR = "/usr/local/lib/pkg/";
PKG_ENABLE_PLUGINS = true;
PLUGINS [
]
DEBUG_SCRIPTS = false;
PLUGINS_CONF_DIR = "/usr/local/etc/pkg/";
PERMISSIVE = false;
REPO_AUTOUPDATE = true;
NAMESERVER = "";
HTTP_USER_AGENT = "pkg/1.21.3";
EVENT_PIPE = "";
FETCH_TIMEOUT = 30;
UNSET_TIMESTAMP = false;
SSH_RESTRICT_DIR = "";
PKG_ENV {
}
PKG_SSH_ARGS = "";
DEBUG_LEVEL = 0;
ALIAS {
    all-depends = "query %dn-%dv";
    annotations = "info -A";
    build-depends = "info -qd";
    cinfo = "info -Cx";
    comment = "query -i \"%c\"";
    csearch = "search -Cx";
    desc = "query -i \"%e\"";
    download = "fetch";
    iinfo = "info -ix";
    isearch = "search -ix";
    prime-list = "query -e '%a = 0' '%n'";
    prime-origins = "query -e '%a = 0' '%o'";
    leaf = "query -e '%#r == 0' '%n-%v'";
    list = "info -ql";
    noauto = "query -e '%a == 0' '%n-%v'";
    options = "query -i \"%n - %Ok: %Ov\"";
    origin = "info -qo";
    orphans = "version -vRl?";
    provided-depends = "info -qb";
    rall-depends = "rquery %dn-%dv";
    raw = "info -R";
    rcomment = "rquery -i \"%c\"";
    rdesc = "rquery -i \"%e\"";
    required-depends = "info -qr";
    roptions = "rquery -i \"%n - %Ok: %Ov\"";
    shared-depends = "info -qB";
    show = "info -f -k";
    size = "info -sq";
    unmaintained = "query -e '%m = \"[email]ports@FreeBSD.org[/email]\"' '%o (%w)'";
    runmaintained = "rquery -e '%m = \"[email]ports@FreeBSD.org[/email]\"' '%o (%w)'";
}
CUDF_SOLVER = "";
SAT_SOLVER = "";
RUN_SCRIPTS = true;
CASE_SENSITIVE_MATCH = false;
LOCK_WAIT = 1;
LOCK_RETRIES = 5;
SQLITE_PROFILE = false;
WORKERS_COUNT = 0;
READ_LOCK = false;
IP_VERSION = 0;
AUTOMERGE = true;
VERSION_SOURCE = "";
CONSERVATIVE_UPGRADE = true;
PKG_CREATE_VERBOSE = false;
AUTOCLEAN = false;
DOT_FILE = "";
REPOSITORIES {
}
VALID_URL_SCHEME [
    "pkg+http",
    "pkg+https",
    "https",
    "http",
    "file",
    "ssh",
    "tcp",
]
ALLOW_BASE_SHLIBS = false;
WARN_SIZE_LIMIT = 1048576;
METALOG = "";
OSVERSION = 1403000;
IGNORE_OSVERSION = false;
BACKUP_LIBRARIES = false;
BACKUP_LIBRARY_PATH = "/usr/local/lib/compat/pkg";
PKG_TRIGGERS_DIR = "/usr/local/share/pkg/triggers";
PKG_TRIGGERS_ENABLE = true;
AUDIT_IGNORE_GLOB [
]
AUDIT_IGNORE_REGEX [
]
COMPRESSION_FORMAT = "";
COMPRESSION_LEVEL = -1;
ARCHIVE_SYMLINK = false;
REPO_ACCEPT_LEGACY_PKG = false;
FILES_IGNORE_GLOB [
]
FILES_IGNORE_REGEX [
]


Repositories:
  FreeBSD: { 
    url             : "pkg+[URL]https://pkg.freebsd.org/FreeBSD:14:amd64/quarterly[/URL]",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
  FreeBSD-kmods: { 
    url             : "pkg+[URL]https://pkg.freebsd.org/FreeBSD:14:amd64/kmods_quarterly_3[/URL]",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }
#
 
https://pkg.freebsd.org/ says this:
We use MaxMind GeoLite based geo-dns to choose a close mirror for you.

IMPORTANT: We do NOT guarantee uptime of any particular mirror. We provide SRV fallbacks for redundancy.

Very likely this geo-dns thing has some issues or the mirror site automatically picked for you has some issues. You can try fetching (with the "fetch" command) pkg.pkg from a mirror site near you and if that works, temporarily change it to that site in /etc/pkg/FreeBSD.conf.
 
Same incident in freebsd 15. From last 48 hours. I'm from India.
Hi,
I get the error below when attempting to do pkg update. This is a fresh 14.3 install. Not sure what went wrong. Could you help please?



pkg bootstrap -f doesn't work either



This is the output of pkg -vv
 
I've seen numerous reports from people in Asia having issues with mirrors now. India, Singapore, Thailand etc. Not sure what's going on, but changing to a different (non-asian?) mirror seems to be a solution.
 
It only affected the pkg repos though. Does FreeBSD use a different mirror set for the base system updates?
 
Theses mirrors, for me, are unreachable, so I tried to guess their locations by running dig and whois commands, but I can't tell for sure the information is correct:
pkg0.twn.freebsd.org - Taipei Taiwan
pkg0.syd.freebsd.org - Sydney Australia
pkg0.kul.freebsd.org - Kuala Lumpur Malaysia
pkg0.jinx.freebsd.org - Johannesburg South Africa

4 mirrors out of 13 are down, I don't know what is currently happening but that's not good.
 
I'm from India too. Looks like there is some issue with the mirror selected for our region.

Let me test out the solution suggested by bakul

Edit : The issue resolved on its own when I checked today.
Thanks for informing! I was looking for the update. Tomorrow I will give another try to freebsd15.
 
You can send email to pkgmgr@FreeBSD.org who may be able to do something about downed mirrors.

Okay so I looked at the administration page which is quite impressive, and thought that "FTP/WWW Mirror Site Coordinators" was may be more appropriate, so I did what is written and sent a bug report.
If it's not the right team who manage this then hopefully they will relay the message.

mefizto For me all 5 mirrors in USA seem fine, I can ping them all as well as open their http pages from a web browser.
 
Hi gotnull,

that is interesting. There must be some algorithm selecting the mirror in the stock configuration that does not send me to these servers since I just tried and have the same "Not found" error. I will try to modify the configuration.

Kindest regards,

M
 
So the bug has been closed with this note "closed works as intended".

This is the response:
Use the pkg.FreeBSD.org name. It will always point at a working mirror which will ideally be nearby (network-wise, not necessarily geographically).

Hardcoding individual mirrors is not supported. If that's documented somewhere, that's a documentation bug.

Unexpected answer and quite disappointing honestly, the main subject is literally avoided ...
It sounds like a polite way to say "none of my business, bye".
 
Admin comment added.
Code:
To add a bit of context - now that I'm not typing in transit: we took the
slowest-to-catch-up mirrors out of the gdns to allow the others to sync
more quickly.  We also added a third-party CDN cache (Fastly) in front
of the mirrors.

We are still fine-tuning the system.  A lot of this was deployed in a hurry,
about a fortnight before 15.0-RELEASE, and the dust is still settling.
 
Back
Top