You are not logged in.

#251 2021-11-12 01:33:18

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 6,802
Website

Re: pacserve - easily share Pacman packages between computers

aureooms wrote:

Hi Xyne,
If I restart pacserve peers can be discovered again. Is there a standard way to
automate recovering from this error?

I've added a handler for that exception so it should just keep retrying at the configured multicast announcement interval without the need to restart.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#252 2021-11-14 11:16:25

aureooms
Member
Registered: 2016-05-26
Posts: 7

Re: pacserve - easily share Pacman packages between computers

Xyne wrote:

I've added a handler for that exception so it should just keep retrying at the configured multicast announcement interval without the need to restart.

Thanks a lot! I suppose this is a recent addition available with version 2021.11-1 of python3-threaded_servers. Your system at https://xyne.archlinux.ca/ looks down for me however so cannot update. But do not worry, I will be patient!

Last edited by aureooms (2021-11-14 11:16:45)

Offline

#253 2021-11-14 21:00:12

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 6,802
Website

Re: pacserve - easily share Pacman packages between computers

aureooms wrote:

Thanks a lot! I suppose this is a recent addition available with version 2021.11-1 of python3-threaded_servers. Your system at https://xyne.archlinux.ca/ looks down for me however so cannot update. But do not worry, I will be patient!

I don't host the site myself. It's been graciously hosted by Dusty for over a decade but he hasn't really been involved in the community for a while so the free ride may be over.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#254 2021-11-15 02:34:35

linuxninja
Member
Registered: 2018-07-28
Posts: 5

Re: pacserve - easily share Pacman packages between computers

The secondary mirror for Xyne's repo is still up.
Xyne: If you need a place to move your primary hosting, the offer still stands.
I was unable to email you due to the domain DNS being unresolvable.

Offline

#255 2021-11-15 14:46:36

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 6,802
Website

Re: pacserve - easily share Pacman packages between computers

linuxninja wrote:

The secondary mirror for Xyne's repo is still up.
Xyne: If you need a place to move your primary hosting, the offer still stands.
I was unable to email you due to the domain DNS being unresolvable.

I appreciate that, thanks! I'm going to sort out a new email address and I'll get back to you as soon as that's done.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#256 2021-12-13 13:28:41

toothandnail
Member
From: Oxfordshire, UK
Registered: 2012-05-05
Posts: 84

Re: pacserve - easily share Pacman packages between computers

This morning I upgraded (using pacserve...), getting a whole lot of python package upgrades. After a restart, pacserve is failing consistently:

[paulm@rigel ~]$ systemctl status pacserve
● pacserve.service - Pacserve
     Loaded: loaded (/usr/lib/systemd/system/pacserve.service; enabled; vendor preset: disabled)
     Active: activating (auto-restart) (Result: exit-code) since Mon 2021-12-13 13:05:44 GMT; 7s ago
    Process: 1835 ExecStart=/usr/bin/pacserve $PACSERVE_ARGS (code=exited, status=1/FAILURE)
   Main PID: 1835 (code=exited, status=1/FAILURE)
        CPU: 35ms

The error doesn't give me much, so I've no idea which upgrade caused the problem. One of my desktops, which hasn't had a restart still has an operational pacserve.

Offline

#257 2021-12-13 20:42:32

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 6,802
Website

Re: pacserve - easily share Pacman packages between computers

What's the output of journalctl -xeu pacserve.service? What happens when you run pacserve directly from the command line?


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#258 2021-12-14 07:51:01

toothandnail
Member
From: Oxfordshire, UK
Registered: 2012-05-05
Posts: 84

Re: pacserve - easily share Pacman packages between computers

Xyne wrote:

What's the output of journalctl -xeu pacserve.service? What happens when you run pacserve directly from the command line?

  journalctl -xeu pacserve.service

Dec 14 07:19:03 rigel systemd[1]: Started Pacserve.
░░ Subject: A start job for unit pacserve.service has finished successfully
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ A start job for unit pacserve.service has finished successfully.
░░ 
░░ The job identifier is 7077.
Dec 14 07:19:03 rigel pacserve[16324]: /usr/bin/python3: Error while finding module specification for 'ThreadedServers.Pacserve' (ModuleNotFoundError: No module named 'ThreadedServers')
Dec 14 07:19:03 rigel systemd[1]: pacserve.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ An ExecStart= process belonging to unit pacserve.service has exited.
░░ 
░░ The process' exit code is 'exited' and its exit status is 1.
Dec 14 07:19:03 rigel systemd[1]: pacserve.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ The unit pacserve.service has entered the 'failed' state with result 'exit-code'.
Dec 14 07:19:18 rigel systemd[1]: pacserve.service: Scheduled restart job, restart counter is at 42.
░░ Subject: Automatic restarting of a unit has been scheduled
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ Automatic restarting of the unit pacserve.service has been scheduled, as the result for
░░ the configured Restart= setting for the unit.
Dec 14 07:19:18 rigel systemd[1]: Stopped Pacserve.
░░ Subject: A stop job for unit pacserve.service has finished
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ A stop job for unit pacserve.service has finished.
░░ 
░░ The job identifier is 7190 and the job result is done.
Dec 14 07:19:18 rigel systemd[1]: Started Pacserve.
░░ Subject: A start job for unit pacserve.service has finished successfully
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ A start job for unit pacserve.service has finished successfully.
░░ 
░░ The job identifier is 7190.
Dec 14 07:19:18 rigel pacserve[16350]: /usr/bin/python3: Error while finding module specification for 'ThreadedServers.Pacserve' (ModuleNotFoundError: No module named 'ThreadedServers')
Dec 14 07:19:18 rigel systemd[1]: pacserve.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ An ExecStart= process belonging to unit pacserve.service has exited.
░░ 
░░ The process' exit code is 'exited' and its exit status is 1.
Dec 14 07:19:18 rigel systemd[1]: pacserve.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░ 
░░ The unit pacserve.service has entered the 'failed' state with result 'exit-code'
[paulm@rigel ~]$ pacserve
/usr/bin/python3: Error while finding module specification for 'ThreadedServers.Pacserve' (ModuleNotFoundError: No module named 'ThreadedServers')

I need to read the journalctl man page - would be nice to be able to strip the colour codes for this sort of thing..... The journalctl entry is only a segment, since the unit attempts multiple restarts.

Just did a pacman update and added the new python3-threaded-servers. Back to normal output from systemctl status pacserve. Thanks for the quick fix smile

Offline

#259 2021-12-28 23:52:08

zoqaeski
Member
From: /earth/australia/.
Registered: 2009-09-30
Posts: 132

Re: pacserve - easily share Pacman packages between computers

I'm having an issue where my computers don't fetch the latest repository updates, because they always prefer to download the repository itself off the local network. So then pacman tells me that there are no updates and I can't update anything because the repo dbs are out of sync. If one of the computers is offline, the other one tries to get its updates from itself and never finds any updated packages.

The behaviour seemed to have changed in the last month or so, and I didn't notice until I had no new updates in almost two weeks. Telling pacserve to prefer the newest files (with --find-newest) breaks hosting of my local repo that I use for AUR packages.

Offline

#260 2021-12-30 11:13:13

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 6,802
Website

Re: pacserve - easily share Pacman packages between computers

I haven't (intentionally) changed anything in the way Pacserve handles requests. It should pass through requests for database files to the first configured external mirror. Did you remove all other mirrors from your pacman configuration?


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#261 2021-12-31 09:19:13

zoqaeski
Member
From: /earth/australia/.
Registered: 2009-09-30
Posts: 132

Re: pacserve - easily share Pacman packages between computers

Xyne wrote:

I haven't (intentionally) changed anything in the way Pacserve handles requests. It should pass through requests for database files to the first configured external mirror. Did you remove all other mirrors from your pacman configuration?

Nope, and I'm using Reflector to periodically update the mirrorlist (I think the systemd timer runs once a fortnight?). The only way I could get them to update was to disable Pacserve, run `pacman -Syy` to force refresh the mirrors followed by a `pacman -Syu` to download the packages to one machine, then reenable Pacserve so the other one could get its updates (repeating the process of disabling, refreshing, and re-enabling Pacserve). I'm holding the updates for a couple of packages due to non-repo dependencies that are incompatible with newer library versions, but that shouldn't be causing issues with the rest. All of my AUR and non-repo packages are built on the more powerful machine and served up from a custom repo via Pacserve (using the optional `<filepath>` argument). Makepkg builds the custom packages to /var/cache/pacman/makepkg/<repo-name>, and Pacserve is supposed to share that directory on the network.

Offline

#262 2022-01-01 03:04:59

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 6,802
Website

Re: pacserve - easily share Pacman packages between computers

What's the output of the following command (replace the host and port with the values for the local pacserve server)?

curl -I 'http://localhost:15678/pacman/core/x86_64/core.db'

Are you using the --trust-pacserve-peers option? In that case you should basically have one system configured to act as a local hub by downloading the databases from the mirror directly.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#263 2022-01-05 13:19:31

zoqaeski
Member
From: /earth/australia/.
Registered: 2009-09-30
Posts: 132

Re: pacserve - easily share Pacman packages between computers

Xyne wrote:

What's the output of the following command (replace the host and port with the values for the local pacserve server)?

curl -I 'http://localhost:15678/pacman/core/x86_64/core.db'

The following command gives:

$ curl -I 'http://localhost:15678/pacman/core/x86_64/core.db'
HTTP/1.1 303 See Other
Server: ThreadedServers.Pacserve/2021.11.20
Date: Wed, 05 Jan 2022 13:12:19 GMT
Content-Type: text/plain; charset=UTF-8
Content-Length: 58
Location: https://mirror.osbeck.com/archlinux/core/os/x86_64/core.db
Connection: close

Are you using the --trust-pacserve-peers option? In that case you should basically have one system configured to act as a local hub by downloading the databases from the mirror directly.

No, I am not using that option on either peer. The pacserve command run by `pacserve.service` is:

pacserve --avahi --multicast /var/cache/pacman/makepkg/

I've just finished moving house and I haven't had the time to upgrade any of my computers for over a week, so I'll try updating on the weekend and see what happens.

Last edited by zoqaeski (2022-01-05 13:20:24)

Offline

#264 2022-01-05 23:53:42

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 6,802
Website

Re: pacserve - easily share Pacman packages between computers

The command output shows that pacserve is correctly forwarding the request to the mirror. Try switching mirrors if the problem persists.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

Board footer

Powered by FluxBB