Recently, pacman-mirrors --fasttrack
has been putting slow or invalid entries at the top of /etc/pacman.d/mirrorlist
.
For example, below are the top four entries returned of the most recent run of pacman-mirrors --fasttrack
and their scan results:
::INFO Writing mirror list
::Bulgaria : https://mirror.telepoint.bg/manjaro/stable
::Spain : https://ftp.caliu.cat/pub/distribucions/manjaro/stable
::Global : https://mirrors.manjaro.org/repo/stable
::Global : https://mirrors.fossho.st/manjaro/stable
...
Result from Bulgaria scan:
0.974 Bulgaria : https://mirror.telepoint.bg/manjaro/
Result from Spain scan:
..... Spain : https://ftp.caliu.cat/pub/distribucions/manjaro/
::ERROR Connection: HTTPSConnectionPool(host='ftp.caliu.cat', port=443): Max retries exceeded with url: /pub/distribucions/manjaro/stable/core/x86_64/core.db.tar.gz (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f1e5c4f61f0>: Failed to establish a new connection: [Errno -2] Name or service not known'))
Result from first Global entry:
0.201 Global : https://mirrors.manjaro.org/repo/
Result from second Global entry:
0.455 Global : https://mirrors.fossho.st/manjaro/
As you can see the two Global scans are significantly faster than the top Bulgaria result, and the Spain scan can’t even complete due to an error, but is still the second entry.
FYI: The Spain entry is failing because I have harden-algo-downgrade: yes
in my unbound config.
Any help would be appreciated.
Don’t use fasttrack. It makes pacman-mirrors skip the speed tests for the mirrors.
1 Like
Thank you for the quick reply.
I honestly thought that was the whole point of the fasttrack option, it’s what the pamac-mirrorlist.service runs.
Would the pacman-mirrors --method rank
be the behavior I’m looking for?
The rank method should be the default.
default is fast (but not with fasttrack !) :
you test with pacman-mirrors --continent
?
-f, --fasttrack [NUMBER]
: Generates a random mirrorlist for the users current selected branch,
mirrors are randomly selected
-m, --method METHOD : Default method is rank but random can be selected.
Understood. However, I ran pacman-mirrors --method rank
and still received the Bulgaria and Spain entries as the top two despite Bulgaria being slower than the Global entries and the Spain failing:
::INFO Writing mirror list
::Bulgaria : https://mirror.telepoint.bg/manjaro/stable
::Spain : https://ftp.caliu.cat/pub/distribucions/manjaro/stable
::Global : https://mirrors.manjaro.org/repo/stable
::Global : https://mirrors.fossho.st/manjaro/stable
Ran the reset command sudo pacman-mirrors --country all --api --protocols all --set-branch stable
and still get that Bulgaria and Spain as the top two entries:
::INFO Writing mirror list
::Bulgaria : https://mirror.telepoint.bg/manjaro/stable
::Spain : https://ftp.caliu.cat/pub/distribucions/manjaro/stable
::Australia : https://manjaro.lucassymons.net/stable
::Global : https://mirrors.manjaro.org/repo/stable
ok, as you, my results are false
but good if i use only https …
pacman-mirrors --continent --api --protocol https
@linux-aarhus
ok order is false if we have ftp error
ok:
pacman-mirrors -c germany --api --protocol all
ko:
pacman-mirrors -c Bulgaria --api --protocol all
# ::ERROR unknown url type: ftps
issue open
1 Like
I ran pacman-mirrors --fasttrack --api --protocol https
and that seemed to help for the Bulgaria entry. However, the error Spain entry remains:
::INFO Writing mirror list
::Spain : https://ftp.caliu.cat/pub/distribucions/manjaro/stable
::Australia : https://manjaro.lucassymons.net/stable
::United_States : https://mirror.math.princeton.edu/pub/manjaro/stable
::Canada : https://osmirror.org/manjaro/stable
I think I’m running into two distinct problems:
- Ranking against all protocols can produce false results.
- A mirror where the IP address can’t be resolved is not being discarded from the results.
I’ll try turning off harden-algo-downgrade
in unbound which should allow the Spain entry to resolve an IP address to see if it gets placed correctly in the ranking.
I re-ran pacman-mirrors --fasttrack --api --protocol https
after allowing the Spain entry’s ftp.caliu.cat to be resolved, and I received correct entries (cursory check of the query results) for the mirrorlist output:
::INFO Writing mirror list
::Australia : https://manjaro.lucassymons.net/stable
::Global : https://mirrors.manjaro.org/repo/stable
::United_States : https://mirror.math.princeton.edu/pub/manjaro/stable
::Canada : https://osmirror.org/manjaro/stable
I can only guess there’s one or two bugs with the ranking that was recently introduced into pacman-mirrors because it was only during the last round of updates that I discovered this due to pacman -Syu errors from that unresolvable Spain entry being at the top of the mirrorlist. The Bulgaria entry kept popping up after subsequent runs of pacman-mirrors.
I apologize, I did not see your edits before my later entries. And thank you for creating an issue for me!
v4.21.5 has been pushed to unstable
Please check if this solves your finding.
2 Likes