# I Would Have Thought



## Geezer (Sep 29, 2021)

`freebsd-update fetch`

```
Looking up update.FreeBSD.org mirrors... 2 mirrors found.
Fetching metadata signature for 13.0-RELEASE from update2.freebsd.org... failed.
Fetching metadata signature for 13.0-RELEASE from update1.freebsd.org... failed.
No mirrors remaining, giving up.

This may be because upgrading from this platform (amd64)
or release (13.0-RELEASE) is unsupported by freebsd-update. Only
platforms with Tier 1 support can be upgraded by freebsd-update.
See https://www.freebsd.org/platforms/index.html for more info.

If unsupported, FreeBSD must be upgraded by
```
source.

I would have thought both that amd64 is Tier 1, and that 13.0 is supported.


----------



## zirias@ (Sep 29, 2021)

"This may be" hints this is a generic error message. Fetching failed, probably for _some_ other reason. I'd say try again later.

BTW, better use the `code` tag for multiline stuff…


----------



## SirDice (Sep 29, 2021)

Yeah, it's a fairly generic error message. It failed to fetch the metadata so it can't determine if your system is supported or not.


----------



## Geezer (Sep 29, 2021)

Zirias said:


> "This may be" hints this is a generic error message. Fetching failed, probably for _some_ other reason. I'd say try again later.



Yes, I am sure it is some other reason.

When I try this on a machine in a remote data centre, all works well. So I though it maybe geo-locating to servers that were not maintained. But when I drill update1.freebsd.org and update2.freebsd.org, they are the same.



Zirias said:


> BTW, better use the `code` tag for multiline stuff…


Okay, done that.


----------



## Geezer (Sep 29, 2021)

SirDice said:


> Yeah, it's a fairly generic error message. It failed to fetch the metadata so it can't determine if your system is supported or not.


Yes. Why would it have failed to fetch?


----------



## SirDice (Sep 29, 2021)

Geezer said:


> So I though it maybe geo-locating to servers that were not maintained. But when I drill update1.freebsd.org and update2.freebsd.org, they are the same.


DNS doesn't appear to be the issue, it did manage to find the two update mirrors (it does this through DNS).


----------



## grahamperrin@ (Sep 30, 2021)

SirDice said:


> … the two update mirrors …



When neither is found, is this significant?


```
root@mowa219-gjp4-vm-freebsd-13-zfs:~ # freebsd-update fetch
Looking up update.FreeBSD.org mirrors... none found.
Fetching metadata signature for 13.0-RELEASE from update.FreeBSD.org... done.
Fetching metadata index... done.
Inspecting system... done.
Preparing to download files... done.

No updates needed to update system to 13.0-RELEASE-p4.
root@mowa219-gjp4-vm-freebsd-13-zfs:~ #
```


----------



## SirDice (Sep 30, 2021)

What does `drill update.freebsd.org` return? In my case I get two IP addresses. A reverse lookup on those results in update1.freebsd.org and update2.freebsd.org.


----------



## Geezer (Sep 30, 2021)

SirDice said:


> What does `drill update.freebsd.org` return? In my case I get two IP addresses. A reverse lookup on those results in update1.freebsd.org and update2.freebsd.org.


`update.freebsd.org.    3560    IN    A    204.15.11.69
update.freebsd.org.    3560    IN    A    163.237.247.16`

As it did yesterday.

But today, `freebsd-update fetch` works!


----------



## grahamperrin@ (Oct 1, 2021)

SirDice said:


> What does `drill update.freebsd.org` return?




```
root@mowa219-gjp4-vm-freebsd-13-zfs:~ # drill update.freebsd.org
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 58613
;; flags: qr rd ra ; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;; update.freebsd.org.  IN      A

;; ANSWER SECTION:
update.freebsd.org.     3231    IN      A       204.15.11.69
update.freebsd.org.     3231    IN      A       163.237.247.16

;; AUTHORITY SECTION:

;; ADDITIONAL SECTION:

;; Query time: 7 msec
;; SERVER: 192.168.1.1
;; WHEN: Fri Oct  1 04:59:28 2021
;; MSG SIZE  rcvd: 68
root@mowa219-gjp4-vm-freebsd-13-zfs:~ # uname -KU
1300139 1300139
root@mowa219-gjp4-vm-freebsd-13-zfs:~ # freebsd-version -kru
13.0-RELEASE-p4
13.0-RELEASE-p4
13.0-RELEASE-p4
root@mowa219-gjp4-vm-freebsd-13-zfs:~ #
```



> In my case I get two IP addresses.



I'm almost certain that yesterday, when no mirrors were found, I got just *one* address in response to the drill command.



> A reverse lookup …



Almost certain because I recall performing a reverse lookup on just one.


----------



## Tieks (Oct 1, 2021)

grahamperrin said:


> I'm almost certain that yesterday, when no mirrors were found, I got just *one* address


That means they changed A-records in DNS. If there was only one visible during some time, that one probably got a heavy load. Could explain Geezer's problem.


----------



## Geezer (Oct 1, 2021)

Tieks said:


> That means they changed A-records in DNS. If there was only one visible during some time, that one probably got a heavy load. Could explain Geezer's problem.



No. I checked the DNS for from my local machine, and on a remote machine (in a data centre in Europe), and it was the same from both. But I could successfully run freebsd-upgrade only on the remote machine.


----------



## grahamperrin@ (Oct 2, 2021)

Similarly, _I would have thought_ that a message should appear when there is, say, a six-minute delay before pkg-upgrade(8) can tell whether the FreeBSD repository is up to date:


```
root@mowa219-gjp4-8570p-freebsd:~ # time pkg upgrade
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating poudriere repository catalogue...
poudriere repository is up to date.
All repositories are up to date.
Checking for upgrades (15 candidates): 100%
Processing candidates (15 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.
6.958u 0.190s 6:24.98 1.8%      2602+493k 392+40io 648pf+0w
root@mowa219-gjp4-8570p-freebsd:~ #
```

This is not to complain. 

In my case, it's because a few days ago, my IPv6 tunnel stopped working as expected. 

With the interface taken down, no delay:


```
root@mowa219-gjp4-8570p-freebsd:~ # ifconfig gif0 down
root@mowa219-gjp4-8570p-freebsd:~ # time pkg upgrade
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating poudriere repository catalogue...
poudriere repository is up to date.
All repositories are up to date.
Checking for upgrades (15 candidates): 100%
Processing candidates (15 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.
7.273u 0.172s 0:08.12 91.6%     2622+499k 21+40io 0pf+0w
root@mowa219-gjp4-8570p-freebsd:~ # pkg install sysutils/cpufetch
…
```


----------



## msplsh (Oct 3, 2021)

This happens to me all the time with pkg and it's always from getting served a dead server via DNS.  I would use the -s option.


----------



## grahamperrin@ (Oct 5, 2021)

msplsh said:


> This 𠉧… the -s option.



For clarity: that's <https://www.freebsd.org/cgi/man.cgi...ektion=8&manpath=FreeBSD+13.0-RELEASE#OPTIONS> (not  pkg-upgrade(8)).


----------

