safing / portmaster-packaging

Portmaster packages and installers
GNU General Public License v3.0
49 stars 22 forks source link

Portmaster is not running after install #74

Closed northys closed 7 months ago

northys commented 2 years ago

What happened:

I've just installed portmaster (https://github.com/safing/portmaster-packaging/issues/73) and it is enabled/dead.

northys at northys-beast
» sudo systemctl status portmaster
○ portmaster.service - Portmaster by Safing
     Loaded: loaded (/etc/systemd/system/portmaster.service; enabled; vendor preset: enabled)
     Active: inactive (dead)
       Docs: https://safing.io
             https://docs.safing.io
northys at northys-beast
» sudo journalctl -u portmaster --since "5 minutes ago"
-- No entries --

What did you expect to happen?:

Portmaster works.

How did you reproduce it?:

Download deb, install it on Ubuntu 22.04.

Debug Information:

ghost commented 2 years ago

You need to reboot your system for it to start working. Did you reboot?

northys commented 2 years ago

I've never had to restart my system and I've installed portmaster many times.

northys commented 2 years ago

Also this is just LOL. Why would I do that and how am I supposed to realize that I should do it?

I'm not BFU windows user. My system doesn't need rebooting to make stuff work.

ghost commented 2 years ago

I understand your view but I was just trying make the Portmaster work. Please tell me if you got it working. By the way, I am on Fedora and the cmd shows the Portmaster as active when I open it and start the core service.

northys commented 2 years ago

Of course I got it into working state I'm using portmaster for 2 years already :D I'm just used to post any issue that appears so safing guys know about it.

1-bit-wonder commented 2 years ago

I seem to be experiencing this issue as well. I can add that Portmaster systemd service unit can not even be found when checking status of the unit via systemctl on boot up, even though systemctl list-unit-files shows it as enabled:

image

After running systemctl enable portmaster I get the same active status output as OP above. (inactive (dead)):

image

Only after this can I go into the Portmaster UI and click to start core service, which does at this point get Portmaster up and running:

image

What did you expect to happen?: Systemd service unit being enabled should automatically start the core service on boot.

How did you reproduce it?: Installed RPM on OpenSUSE Tumbleweed.

1-bit-wonder commented 2 years ago

Did some digging and found this to be a problem with symlinking the service unit file - I was able to get it working by removing the symlink in /etc/systemd/system and just copying the file directly and then re-enabling the service like so:

# systemctl disable portmaster.service
# rm /etc/systemd/system/portmaster.service
# cp /opt/safing/portmaster/portmaster.service /etc/systemd/system/portmaster.service
# systemctl enable portmaster.service
dhaavi commented 2 years ago

I think how it is now is expected behavior.

We enable the service, but don't start it, as we want user to reboot to have a clean first start. Users might not expect Portmaster to become active immediately and start killing connections, possibly interrupting their work flow. It is nicer to have the user reboot in order to not interrupt any important things going on.

We previously had warnings and messages in the install process, but had to remove them because of issues. I will add a notice to the docs (https://github.com/safing/docs/pull/78) and will have a chat with @davegson on how we can improve things here.

1-bit-wonder commented 2 years ago

Hmm my problem may be a bit different from OP, because even on reboot the service would not start without manual intervention as seen in my comment above. Should I break this out into another issue?

dhaavi commented 2 years ago

Hey @higherdimensions, I also think that your issue is different, could it be that it is more similar to https://github.com/safing/portmaster/issues/673?

On this issue: I've added a note to the Linux installer downloads on the docs page: https://docs.safing.io/portmaster/install/linux

Handing this over to @davegson for further considerations.

github-actions[bot] commented 7 months ago

This issue has been automatically marked as inactive because it has not had activity in the past two months.

If no further activity occurs, this issue will be automatically closed in one week in order to increase our focus on active topics.

github-actions[bot] commented 7 months ago

This issue has been automatically closed because it has not had recent activity. Thank you for your contributions.

If the issue has not been resolved, you can find more information in our Wiki or continue the conversation on our Discord.