You are not logged in.

#1 2021-07-18 23:36:03

Salkay
Member
Registered: 2014-05-22
Posts: 618

[Possible?] Keep using pacman server on multiple errors

I've been sharing my pacman cache using darkhttpd. Obviously, I can only share the packages I have installed on my "server" computer. If the "client" wants to install something else, they get a 404 error, and pacman tries the next server. Unfortunately pacman 6 times out when there are too many errors and won't use the server any more. I think the limit is three errors.

error: failed retrieving file 'amdvlk-2021.Q3.1-1-x86_64.pkg.tar.zst' from 192.168.1.81:8081 : The requested URL returned error: 404
error: failed retrieving file 'lib32-amdvlk-2021.Q3.1-1-x86_64.pkg.tar.zst' from 192.168.1.81:8081 : The requested URL returned error: 404
error: failed retrieving file 'vulkan-intel-21.1.5-1-x86_64.pkg.tar.zst' from 192.168.1.81:8081 : The requested URL returned error: 404
warning: too many errors from 192.168.1.81:8081, skipping for the remainder of this transaction

Is there a way to prevent this timeout, and keep trying the first server?

Last edited by Salkay (2022-10-22 04:51:56)

Offline

#2 2021-07-18 23:52:44

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,365
Website

Re: [Possible?] Keep using pacman server on multiple errors

No.

Offline

#3 2021-08-03 14:05:38

Salkay
Member
Registered: 2014-05-22
Posts: 618

Re: [Possible?] Keep using pacman server on multiple errors

Thanks Allan. Looks like pacman is too clever!

Offline

#4 2021-08-03 18:32:40

a821
Member
Registered: 2012-10-31
Posts: 381

Re: [Possible?] Keep using pacman server on multiple errors

Offline

#5 2021-08-03 22:47:46

Salkay
Member
Registered: 2014-05-22
Posts: 618

Re: [Possible?] Keep using pacman server on multiple errors

I haven't tried those options, but I assume they would suffer from the same issues? If your "server" doesn't have the files, pacman on the "client" will have an error.

Offline

#6 2021-08-04 06:22:38

a821
Member
Registered: 2012-10-31
Posts: 381

Re: [Possible?] Keep using pacman server on multiple errors

Salkay wrote:

I haven't tried those options, but I assume they would suffer from the same issues? If your "server" doesn't have the files, pacman on the "client" will have an error.

Not according to their doc, see here and the About section of pacserve.

Offline

#7 2021-08-04 08:17:16

Salkay
Member
Registered: 2014-05-22
Posts: 618

Re: [Possible?] Keep using pacman server on multiple errors

a821 wrote:

Not according to their doc, see here and the About section of pacserve.

Oh nice! Sorry I should have been more thorough in my reading. Thanks!

pacserve looks fiddly to incorporate with AUR helpers, but pacoloco looks like it should been seen as a normal server by the client, so that might work quite well!

Offline

#8 2021-08-28 00:19:23

doctorzeus
Member
Registered: 2011-12-24
Posts: 79

Re: [Possible?] Keep using pacman server on multiple errors

Might be a good feature to add to pacman..

Offline

#9 2022-10-17 09:41:13

vicbis
Member
From: Melbourne Australia
Registered: 2018-01-31
Posts: 2

Re: [Possible?] Keep using pacman server on multiple errors

I have the same problem here. It's a lot faster to get packages locally.
I haven't tried this yet, in "pacman-6.0.2/lib/libalpm/dload.c" lines 61->63 is:

     /* number of "soft" errors required to blacklist a server, set to 0 to disable
      * server blacklisting */
     const unsigned int server_error_limit = 3;

Looks like one of those dreaded hard coded variables, and probably should be put in pacman.conf.

Of course you'll have to rebuild.
https://wiki.archlinux.org/title/Meson_ … guidelines  may help.

BTW, I use a server that I wrote in 'C', if anyone is interested.

Confirmed. Setting 'server_error_limit' to 0 stops blacklisting the server(s)

Last edited by vicbis (2022-11-11 00:31:11)

Offline

#10 2022-10-22 02:54:09

Salkay
Member
Registered: 2014-05-22
Posts: 618

Re: [Possible?] Keep using pacman server on multiple errors

Thanks @vicbis that looks helpful. I've actually now use checkupdates to pre-download packages on my other systems, so I don't share my cache any more. Hopefully this hint is useful to others though.

Offline

#11 2022-10-22 03:49:17

kermit63
Member
Registered: 2018-07-04
Posts: 171

Re: [Possible?] Keep using pacman server on multiple errors

Pre-pandemic when I had 3 computers all running arch, I used NFS to share my /var/cache/pacman/pkg folder on my main computer to the 2 other devices. The /var/cache/pacman/pkg folders of the 2 are bind-mounted to the NFS share and had read/write permissions.

Any of the 3 computers can run updates or install new packages, and if they are not available in the main cache, then the packages are downloaded and stored in the main cache. Hence there are no duplicated downloads nor storage.

This works pretty well if all computers are on the same local network, but security could be an issue if they are not.

Unfortunately I gave away my 2 computers to some of my poorer relatives during the height of the pandemic when schools and computer shops were closed for practically 2 years and on-line learning was the only form of education in my country. So I no longer have this set-up since I'm down to just one computer.

Offline

Board footer

Powered by FluxBB