You are not logged in.

#1 2021-12-12 22:52:54

paulm
Member
Registered: 2020-01-02
Posts: 4

Trying to understand weird pacman synching issue

Have been running Arch for years, always using `pacman -Syyu` to fetch package database updates and then upgrade. Today, this failed due to pacman thinking pandoc 2.14.1-64 is the latest, while it actually is 2.14.1-66.

[root@juggle ~]# pacman -Syy
:: Synchronizing package databases...
 core                                                                                                              137.8 KiB  1006 KiB/s 00:00 [#######################################################################################] 100%
 extra                                                                                                            1564.6 KiB  4.98 MiB/s 00:00 [#######################################################################################] 100%
 community                                                                                                           5.8 MiB  7.97 MiB/s 00:01 [#######################################################################################] 100%
 multilib                                                                                                          148.8 KiB  1653 KiB/s 00:00 [#######################################################################################] 100%
 sublime-text                                                                                                     1827.0   B  4.32 KiB/s 00:00 [#######################################################################################] 100%

[root@juggle ~]# pacman -Ss pandoc
...
community/pandoc 2.14.1-64 [installed: 2.14.1-62]
    Conversion between markup formats
...

[root@juggle ~]# pacman -S pandoc
resolving dependencies...
looking for conflicting packages...

Packages (1) pandoc-2.14.1-64

Total Installed Size:  60.93 MiB
Net Upgrade Size:       0.00 MiB

:: Proceed with installation? [Y/n] 
:: Retrieving packages...
 pandoc-2.14.1-64-x86_64 is up to date
error: failed retrieving file 'pandoc-2.14.1-64-x86_64.pkg.tar.zst' from ftp.nluug.nl : The requested URL returned error: 404
error: failed retrieving file 'pandoc-2.14.1-64-x86_64.pkg.tar.zst' from mirrors.kernel.org : The requested URL returned error: 404
error: failed retrieving file 'pandoc-2.14.1-64-x86_64.pkg.tar.zst' from arch.jensgutermuth.de : The requested URL returned error: 404
error: failed retrieving file 'pandoc-2.14.1-64-x86_64.pkg.tar.zst' from mirror.metalgamer.eu : The requested URL returned error: 404
error: failed retrieving file 'pandoc-2.14.1-64-x86_64.pkg.tar.zst' from mirror.metalgamer.eu : The requested URL returned error: 404
error: failed retrieving file 'pandoc-2.14.1-64-x86_64.pkg.tar.zst' from mirror.autisten.club : The requested URL returned error: 404
error: failed retrieving file 'pandoc-2.14.1-64-x86_64.pkg.tar.zst.sig' from arch.lucassymons.net : The requested URL returned error: 404
warning: failed to retrieve some files
error: failed to commit transaction (failed to retrieve some files)
Errors occurred, no packages were upgraded.

Checking some of the mirrors at the top of mirrorlist, some indeed currently have 2.14.1-66, others (ftp.nluug.nl) does not even have a pandoc package:

[root@juggle ~]# head -n 20 /etc/pacman.d/mirrorlist
################################################################################
################# Arch Linux mirrorlist generated by Reflector #################
################################################################################

# With:       reflector --latest 200 --protocol http --protocol https --sort rate --save doh
# When:       2020-12-14 20:56:34 UTC
# From:       https://www.archlinux.org/mirrors/status/json/
# Retrieved:  2020-12-14 20:55:33 UTC
# Last Check: 2020-12-14 19:56:41 UTC

#Server = https://archmirror.it/$repo/os/$arch
Server = http://ftp.nluug.nl/os/Linux/distr/archlinux/$repo/os/$arch
Server = https://mirrors.kernel.org/archlinux/$repo/os/$arch
Server = https://arch.jensgutermuth.de/$repo/os/$arch
Server = https://mirror.metalgamer.eu/archlinux/$repo/os/$arch
Server = http://mirror.metalgamer.eu/archlinux/$repo/os/$arch
Server = https://mirror.autisten.club/archlinux/$repo/os/$arch
Server = http://arch.lucassymons.net/$repo/os/$arch
Server = https://mirror.init7.net/archlinux/$repo/os/$arch
Server = https://mirror.chaoticum.net/arch/$repo/os/$arch

[root@juggle ~]# wget http://ftp.nluug.nl/os/Linux/distr/archlinux/community/os/x86_64/pandoc-2.14.1-66-x86_64.pkg.tar.zst
--2021-12-12 23:44:25--  http://ftp.nluug.nl/os/Linux/distr/archlinux/community/os/x86_64/pandoc-2.14.1-66-x86_64.pkg.tar.zst
Resolving ftp.nluug.nl (ftp.nluug.nl)... 2001:67c:6ec:221:145:220:21:40, 145.220.21.40
Connecting to ftp.nluug.nl (ftp.nluug.nl)|2001:67c:6ec:221:145:220:21:40|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2021-12-12 23:44:25 ERROR 404: Not Found.

[root@juggle ~]# wget https://mirrors.edge.kernel.org/archlinux/community/os/x86_64/pandoc-2.14.1-66-x86_64.pkg.tar.zst
--2021-12-12 23:43:12--  https://mirrors.edge.kernel.org/archlinux/community/os/x86_64/pandoc-2.14.1-66-x86_64.pkg.tar.zst
SSL_INIT
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving mirrors.edge.kernel.org (mirrors.edge.kernel.org)... 2604:1380:2001:3900::1, 147.75.101.1
Connecting to mirrors.edge.kernel.org (mirrors.edge.kernel.org)|2604:1380:2001:3900::1|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9178535 (8.8M) [text/plain]
Saving to: ‘pandoc-2.14.1-66-x86_64.pkg.tar.zst’

pandoc-2.14.1-66-x86_64.pkg.tar.zst                         100%[========================================================================================================================================>]   8.75M  8.91MB/s    in 1.0s    

2021-12-12 23:43:14 (8.91 MB/s) - ‘pandoc-2.14.1-66-x86_64.pkg.tar.zst’ saved [9178535/9178535]

[root@juggle ~]# wget https://arch.jensgutermuth.de/community/os/x86_64/pandoc-2.14.1-66-x86_64.pkg.tar.zst
--2021-12-12 23:45:17--  https://arch.jensgutermuth.de/community/os/x86_64/pandoc-2.14.1-66-x86_64.pkg.tar.zst
SSL_INIT
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving arch.jensgutermuth.de (arch.jensgutermuth.de)... 2a03:4000:6:83a6::1000, 37.120.176.32
Connecting to arch.jensgutermuth.de (arch.jensgutermuth.de)|2a03:4000:6:83a6::1000|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9178535 (8.8M) [application/octet-stream]
Saving to: ‘pandoc-2.14.1-66-x86_64.pkg.tar.zst.1’

pandoc-2.14.1-66-x86_64.pkg.tar.zst.1                       100%[========================================================================================================================================>]   8.75M  8.16MB/s    in 1.1s    

2021-12-12 23:45:18 (8.16 MB/s) - ‘pandoc-2.14.1-66-x86_64.pkg.tar.zst.1’ saved [9178535/9178535]

Checking https://archlinux.org/mirrors/nluug.nl/38/, the last sync I see is 11 Dec 2021 21:05, i.e. yesterday. Yet, this mirror is listed under Successfully Syncing Mirrors on https://archlinux.org/mirrors/status/, but with a delay of 13:40 hours:minutes. That's not really successfully synching, is it?

Which makes me wonder how pacman updates it package database. Does it only look at the entry in the mirrorlist that it can reach, list the package files from there and that's that? Or is there a database file somewhere that is retrieved? I can't seem to find it on the wiki, nor find a flag for pacman that gives me this information. I.e. `pacman -Syyi` shows the older version 2.14.1-64 being the latest:

[root@juggle ~]# pacman -Syyi > lst
...
[root@juggle ~]# cat lst
Repository      : community
Name            : pandoc
Version         : 2.14.1-64
Description     : Conversion between markup formats
Architecture    : x86_64
URL             : https://pandoc.org
...

Offline

#2 2021-12-12 22:54:11

paulm
Member
Registered: 2020-01-02
Posts: 4

Re: Trying to understand weird pacman synching issue

Ok, so pacman apparently *does* use the first mirror listed, as commenting out the ftp.nluug.nl entry and doing a `pacman -Syy` now indeed makes `pacman -Ss` show the newer pandoc.

Offline

#3 2021-12-12 23:10:10

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,082

Re: Trying to understand weird pacman synching issue

Yes pacman just picks the first mirror in the list, if that responds to the database syncing request then that will be the database that it will match it's versions against. This is also one of the reasons  it's reccommended to not use -Syy  habitually. If a server is generally working but for some reason has wrong timestamps, you can prevent an accidental incompatible situation by using one -y which actually checks the timestamps instead of overwritting.

Offline

Board footer

Powered by FluxBB