Failed to enable portmaster service

@Yochanan

i have this error installing portmaster in pamac gui:
“Failed to enable unit: Unit file portmaster.service does not exist.”

if i try to do “sudo systemctl enable --now portmaster” from terminal i receive
“Failed to enable unit: Unit file portmaster.service does not exist.”
in response.

if i open the portmaster app i see only the message " the portmaster core service is not running"
and if i click the button “start core service” i write the password and then nothing happen.

i have tried reinstalling and i have tried remove-reboot-reinstall with the same results

I can’t reproduce that. Make sure you’re up to date and have 1.0.0-2 installed. Did you have the the AUR package installed previously?

If uninstalling / reinstalling the package does not help, please post the output of the following here using proper formatting:

pamac install portmaster-stub-bin
systemctl status portmaster
/opt/safing/portmaster/portmaster-start app --data=/opt/safing/portmaster
[robin0800@robins-desktop ~]$ systemctl status portmaster
○ portmaster.service - Portmaster by Safing
     Loaded: loaded (/usr/lib/systemd/system/portmaster.service; enabled; prese>
     Active: inactive (dead)
       Docs: https://safing.io
             https://docs.safing.io
type or paste code here

I had to do
“sudo systemctl enable --now portmaster”
before it would start.

[robin0800@robins-desktop ~]$ systemctl status portmaster
● portmaster.service - Portmaster by Safing
     Loaded: loaded (/usr/lib/systemd/system/portmaster.service; enabled; preset: disabled)
     Active: active (running) since Tue 2023-03-14 00:41:25 GMT; 3s ago
       Docs: https://safing.io
             https://docs.safing.io
   Main PID: 472557 (portmaster-star)
      Tasks: 21 (limit: 38422)
     Memory: 39.1M
        CPU: 177ms
     CGroup: /system.slice/portmaster.service
             ├─472557 /opt/safing/portmaster/portmaster-start --data /opt/safing/portmaster core --
             └─472565 /opt/safing/portmaster/updates/linux_amd64/core/portmaster-core_v1-0-7 --data /opt/safing/portmaster

Mar 14 00:41:25 robins-desktop systemd[1]: Started Portmaster by Safing.
Mar 14 00:41:25 robins-desktop portmaster-start[472557]: [control] 2023/03/14 00:41:25 starting /opt/safing/portmaster/updates/linux_amd64>
Mar 14 00:41:25 robins-desktop portmaster-start[472557]: 230314 00:41:25.919 ▶ BOF
Mar 14 00:41:26 robins-desktop portmaster-start[472557]: 230314 00:41:26.031 olver-mdns:137 ▶ WARN 001 resolver: no IPv6 stack detected, d>

The service is enabled automatically during installation as your status shows. All you should have to do is open the program via the desktop shortcut and click the button to start it.

I just found the problem:
there was a symlink in /etc/systemd/system/ that pointed to
/opt/safing/portmaster/portmaster.service
most likely due to installation from aur of an old version so it was only my problem.
I found the answer here for a similar problem if anyone is interested:

now it works without problems.
thanks and sorry for the waste of time

Translated with DeepL Translate: The world's most accurate translator (free version)

1 Like

@Yochanan we have to fix that in our package to clean that file out if existing. etc will be used before lib.

[phil@infinitybook ~]$ ls -lasih /etc/systemd/system/portmaster.service 
13504431 0 lrwxrwxrwx 1 root root 41 12. Feb  00:34 /etc/systemd/system/portmaster.service -> /opt/safing/portmaster/portmaster.service
[phil@infinitybook ~]$ sudo rm /etc/systemd/system/portmaster.service
[phil@infinitybook ~]$ sudo systemctl enable --now portmaster
Removed "/etc/systemd/system/multi-user.target.wants/portmaster.service".
Created symlink /etc/systemd/system/multi-user.target.wants/portmaster.service -> /usr/lib/systemd/system/portmaster.service.

I cannot reproduce that. For clarity and posterity, uninstalling the portmaster-stub-bin AUR package removes the service symlinks. No idea what happened on your system.

❯ sudo pacman -R portmaster-stub-bin
checking dependencies...

Package (1)          Old Version  Net Change

portmaster-stub-bin  0.8.8-2      -12.97 MiB

Total Removed Size:  12.97 MiB

:: Do you want to remove these packages? [Y/n] 
:: Processing package changes...
info Disabling portmaster.service to launch at boot
Removed "/etc/systemd/system/portmaster.service".
Removed "/etc/systemd/system/multi-user.target.wants/portmaster.service".
(1/1) removing portmaster-stub-bin                       [------------------------------] 100%
:: Running post-transaction hooks...
(1/3) Arming ConditionNeedsUpdate...
(2/3) Updating icon theme caches...
(3/3) Checking for orphaned packages..

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