Pacserve errors

Hello everyone. I am running xfce version of Monjaro, kernel 4.19.

I hoped to use pacserve to install packages on a second machine, without the need to download packages twice.

pacserve was installed from pamac-manager from the AUR repository.

commands issued on the command line.
systemctl start pacserve.service
systemctl enable pacserve.service

Unfortunately I can not seem to get it running correctly. The second system does not give me any errors, but does not find packages on the lan.

My main system gives me this error.

sudo pacsrv -Syu
[sudo] password for flippy: 
:: Synchronizing package databases...
error: failed retrieving file 'core.db' from localhost:15678 : Failed to connect to localhost port 41234: Connection refused
 core is up to date
error: failed retrieving file 'extra.db' from localhost:15678 : Failed to connect to localhost port 41234: Connection refused
 extra is up to date
error: failed retrieving file 'community.db' from localhost:15678 : Failed to connect to localhost port 41234: Connection refused
 community is up to date
error: failed retrieving file 'multilib.db' from localhost:15678 : Failed to connect to localhost port 41234: Connection refused
 multilib is up to date

I tried systemctl enable pacserve-ports.service but it did not solve the problem.

Failed to connect to localhost port 41234: Connection refused

IP-tables, ufw, firewall?

I have not installed uft or any firewall. Its pretty much a fresh install of Manjaro.

following this site https://techspirited.com/linux-how-to-open-port-in-linux

I tried adding the port 15678 and 41234 with this command.
iptables -A INPUT -p tcp -dport 15678 -j ACCEPT

but I still get the same error.

I also enabled port forwarding on my router for those ports.

I'm not sure what to look up or try at this point.

AUR is not Manjaro! :slight_smile:

https://xyne.archlinux.ca/projects/pacserve/

Opening Firewall Ports

Pacserve normally requires 2 ports:

  • 15678 - for incoming HTTP(S) connections
  • 15679 - for incoming multicast announcements

If you are running systemd and use iptables.service, you can enable pacserve-ports.service to open and close ports automatically when the pacserve.service starts and stops, respectively. You can also use pacserve-ports to manually open and close ports (see below). The rules can be configured in /etc/pacserve/pacserve-ports.conf .

Maybe it is better to use manjaro wiki :wink:
Test if Firewall is activ:

systemctl status ufw   
~ >>> systemctl status ufw                                                                                
‚óŹ ufw.service - CLI Netfilter Manager
   Loaded: loaded (/usr/lib/systemd/system/ufw.service; enabled; vendor preset: disabled)
   Active: active (exited) since Fri 2019-07-12 00:05:24 CEST; 1h 18min ago
 Main PID: 472 (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 4915)
   Memory: 0B
   CGroup: /system.slice/ufw.service

Jul 12 00:05:24 kde systemd[1]: Starting CLI Netfilter Manager...
Jul 12 00:05:24 kde systemd[1]: Started CLI Netfilter Manager.

Check both PC about firewalls.

Hint: do not use pacserve from AUR. Use pacredir, it's better.
There is pacredir in our repos you can use. (it also contains pacserve)
Have a look at how to use it here:

But currently there is a mistake in the Manjaro package, so you will have to wait until it is fixed (or fix it for yourself for now by editing /etc/avahi/services/pacserve.service as decribed here: Manjaro specific build of pacredir)

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

Forum kindly sponsored by