`mirrors` command only ever returns 3 responses

IDK what’s is going on but I’m trying to update garuda and I keep getting:

error: failed retrieving file 'core.db' from mirror.cyberbits.asia : Failed to connect to mirror.cyberbits.asi
a port 443 after 12 ms: Couldn't connect to server
error: failed retrieving file 'extra.db' from mirror.cyberbits.asia : Failed to connect to mirror.cyberbits.as
ia port 443 after 12 ms: Couldn't connect to server
error: failed retrieving file 'multilib.db' from mirror.cyberbits.asia : Failed to connect to mirror.cyberbits
.asia port 443 after 22 ms: Couldn't connect to server

Turns out there is only 3 mirrors in the /etc/pacman.d/mirrorlist

Server = rsync://rsync.archlinux.nautile.nc/archlinux/$repo/os/$arch
Server = https://mirror.cyberbits.asia/archlinux/$repo/os/$arch
Server = rsync://rsync.cyberbits.asia/archlinux/$repo/os/$arch

Running any of the mirror alias all result in these 3 mirrors, trying reflector on it’s own also only yields these 3!
But I can see at https://archlinux.org/mirrors/status/json/ that there should be more!

No idea what is going on.

Figured it out. (kinda I think)

Suspicion

So I think someone is lying~
EVER SINGLE ONE of 1000+ mirrors are currently syncing.
Their completion_pct is always < 1 which makes sense, the Arch package repo must be very very busy, there is no posible way that you could ever reach 100% sync and keep it for longer than a few minutes before something changes.

Either mirror.cyberbits.asia has a direct fabric link up to the master repo or they are lying.

This present a problem for the reflector because it is set (by default) to only consider 100% synced repos.

Fix

The fix is simple, just add --completion-percent 98 to the alias commands in ~/.config/fish/fish.config!

Now all the reflector commands should result in more than 3 results!

Update

There is still the issue of garuda-update

I needed to modify /usr/lib/garuda/garuda-update/main-update to include --completion-percent 98 on reflector and --completion 0.98 for rate-mirros (default)

After that I did (a stupidly fast) update of over 300+ packages!

I wonder if this has always been an issue for me, I have never had a big update be so fast!

Post Note

IDK how hard it is to determine the Country Code for the system in the update script but I get shafted pretty hard with rate-mirrors default starting country of US

For Comparison:

rate-mirrors --entry-country ZA arch --completion 0.98

# RE-TESTING TOP MIRRORS
# [ZA] SpeedTestResult { speed: 20.62 MB/s; elapsed: 1.000321431s; connection_time: 108.001558ms }
# [ZA] SpeedTestResult { speed: 11.61 MB/s; elapsed: 324.656966ms; connection_time: 36.170813ms }
# [ZA] SpeedTestResult { speed: 11.65 MB/s; elapsed: 1.000240086s; connection_time: 13.233233ms }
# [KE] SpeedTestResult { speed: 3.10 MB/s; elapsed: 1.000071538s; connection_time: 119.224697ms }
# [KE] SpeedTestResult { speed: 2.91 MB/s; elapsed: 997.683285ms; connection_time: 336.652954ms }

~ 40 MB/s aggregate on top 5


rate-mirrors arch --completion 0.98

# RE-TESTING TOP MIRRORS
# [ZA] SpeedTestResult { speed: 11.59 MB/s; elapsed: 300.976466ms; connection_time: 35.371243ms }
# [MU] SpeedTestResult { speed: 5.50 MB/s; elapsed: 999.254375ms; connection_time: 96.943848ms }
# [IN] SpeedTestResult { speed: 1.24 MB/s; elapsed: 998.136977ms; connection_time: 505.120506ms }
# [PL] SpeedTestResult { speed: 492.93 KB/s; elapsed: 930.155587ms; connection_time: 1.60249554s }
# [ZA] SpeedTestResult { speed: 11.65 MB/s; elapsed: 1.000226545s; connection_time: 12.814089ms }

~ 29 MB/s aggregate on top 5

Not sure if you can modify it to take that into account but I can confirm, for me. it is a major speedup.

2 Likes

I think you missed this thread about this:

5 Likes

Make sure you have done the following before you post:

1 Like

This is a very good write up, thank you. Unfortunately I only found this after I already figured it all out myself, I published my root cause analysis here: `update`: error: failed to synchronize all databases (unexpected error) - #48 by TNE

PS: I literally just went looking for posts to mark solutions under with my root cause analysis and then found this hah

3 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.