You are not logged in.
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
No.
Offline
Thanks Allan. Looks like pacman is too clever!
Offline
What about https://archlinux.org/packages/communit … 4/pacoloco or https://xyne.archlinux.ca/projects/pacserve for sharing your pacman cache??
Offline
What about https://archlinux.org/packages/communit … 4/pacoloco or https://xyne.archlinux.ca/projects/pacserve for sharing your pacman cache??
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
a821 wrote:What about https://archlinux.org/packages/communit … 4/pacoloco or https://xyne.archlinux.ca/projects/pacserve for sharing your pacman cache??
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
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
Might be a good feature to add to pacman..
Offline
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
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
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.
Never argue with an idiot, they will drag you down to their level and then beat you with experience.
It is better to light a candle than curse the darkness.
A journey of a thousand miles begins with a single step.
Online