m0zgen / blocky-installer

🧩 Install Blocky on to CentOS, Fedora, Debian, Ubuntu Linux

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

systemctl start blocky fails with 217 USER

yusi1 opened this issue · comments

● blocky.service - Blocky is a DNS proxy and ad-blocker
     Loaded: loaded (/etc/systemd/system/blocky.service; enabled; vendor preset>
     Active: activating (auto-restart) (Result: exit-code) since Fri 2022-06-03>
    Process: 28997 ExecStart=/opt/blocky/blocky --config /opt/blocky/config.yml>
   Main PID: 28997 (code=exited, status=217/USER)
        CPU: 839us

Fixed with useradd blockyusr.

commented

Hi, thanks for your reply? it is a strange as is installer use useradd tool in the installation process and blockyusr should be created automatically.

P.S. You also can use journalctl or debug mode in blocky or system messages for possible diagnostic or troubleshoot some problems.

I don't know what happened to be honest, also the capabilities on the blocky executable file were reset too so I had to add them again with:
setcap CAP_NET_BIND_SERVICE+ep blocky

thanks for the tip for debug mode too btw I will use that next time

Also I had blocky already installed in /opt with my config before I ran the script, maybe that might of caused some issue?

commented

Potentially yes, since a systemd unit is created that runs as the blockyusr user and you need to restart installed blocky with special installed script restart-blocky.sh this script set permit to setcap to blockyusr

I'll use that script to restart Blocky next time, thanks.