Adguardhome: Latest snap package won't start on Raspberry PI

Created on 16 Nov 2020  ·  5Comments  ·  Source: AdguardTeam/AdGuardHome

Issue Details

The snap version won't start on my Raspberry Pi 4:

# snap lags -n 100 adguard-home
2020-11-16T13:54:58Z systemd[1]: Started Service for snap application adguard-home.adguard-home.
2020-11-16T13:54:59Z adguard-home.adguard-home[3158]: 2020/11/16 14:54:59 [error] Couldn't read config file /var/snap/adguard-home/1125/AdGuardHome.yaml: open /var/snap/adguard-home/1125/AdGuardHome.yaml: no such file or directory
2020-11-16T13:54:59Z adguard-home.adguard-home[3158]: 2020/11/16 14:54:59 [info] AdGuard Home, version 0.104.1, channel release, arch linux arm v7
2020-11-16T13:54:59Z adguard-home.adguard-home[3158]: 2020/11/16 14:54:59 [info] This is the first time AdGuard Home is launched
2020-11-16T13:54:59Z adguard-home.adguard-home[3158]: 2020/11/16 14:54:59 [info] Checking if AdGuard Home has necessary permissions
2020-11-16T13:54:59Z adguard-home.adguard-home[3158]: 2020/11/16 14:54:59 [info] AdGuard failed to bind to port 53 due to listen tcp 127.0.0.1:53: listen: operation not permitted
2020-11-16T13:54:59Z adguard-home.adguard-home[3158]: Please note, that this is crucial for a DNS server to be able to use that port.
2020-11-16T13:54:59Z adguard-home.adguard-home[3158]: 2020/11/16 14:54:59 [info] Initializing auth module: /var/snap/adguard-home/1125/data/sessions.db
2020-11-16T13:54:59Z adguard-home.adguard-home[3158]: 2020/11/16 14:54:59 [info] Auth: initialized.  users:0  sessions:0
2020-11-16T13:54:59Z adguard-home.adguard-home[3158]: 2020/11/16 14:54:59 [info] Initialize web module
2020-11-16T13:54:59Z adguard-home.adguard-home[3158]: 2020/11/16 14:54:59 [info] This is the first launch of AdGuard Home, redirecting everything to /install.html
2020-11-16T13:54:59Z adguard-home.adguard-home[3158]: 2020/11/16 14:54:59 [info] AdGuard Home is available on the following addresses:
2020-11-16T13:54:59Z adguard-home.adguard-home[3158]: 2020/11/16 14:54:59 [info] Go to http://0.0.0.0:3000
2020-11-16T13:54:59Z adguard-home.adguard-home[3158]: 2020/11/16 14:54:59 [info] Stopped
2020-11-16T13:54:59Z adguard-home.adguard-home[3158]: 2020/11/16 14:54:59 [fatal] listen tcp 0.0.0.0:3000: listen: operation not permitted
2020-11-16T13:54:59Z systemd[1]: snap.adguard-home.adguard-home.service: Main process exited, code=exited, status=1/FAILURE
2020-11-16T13:54:59Z systemd[1]: snap.adguard-home.adguard-home.service: Failed with result 'exit-code'.
2020-11-16T13:54:59Z systemd[1]: snap.adguard-home.adguard-home.service: Service RestartSec=100ms expired, scheduling restart.
2020-11-16T13:54:59Z systemd[1]: snap.adguard-home.adguard-home.service: Scheduled restart job, restart counter is at 1.
2020-11-16T13:54:59Z systemd[1]: Stopped Service for snap application adguard-home.adguard-home.

The logs indicate a potentially already bound port, but that is not the case:

# netstat -tulpe
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode      PID/Program name    
tcp        0      0 0.0.0.0:ssh             0.0.0.0:*               LISTEN      root       16303      588/sshd            
tcp6       0      0 [::]:ssh                [::]:*                  LISTEN      root       16305      588/sshd            
udp        0      0 0.0.0.0:35904           0.0.0.0:*                           avahi      15714      355/avahi-daemon: r 
udp        0      0 0.0.0.0:bootpc          0.0.0.0:*                           root       14057      582/dhcpcd          
udp        0      0 0.0.0.0:mdns            0.0.0.0:*                           avahi      15712      355/avahi-daemon: r 
udp6       0      0 [::]:53666              [::]:*                              avahi      15715      355/avahi-daemon: r 
udp6       0      0 [::]:dhcpv6-client      [::]:*                              root       14241      582/dhcpcd          
udp6       0      0 [::]:mdns               [::]:*                              avahi      15713      355/avahi-daemon: r 

I'm not very familiar with snap, hence I do not really know how to debug that further. I can provide additional information if you tell me what you need.

  • Version of AdGuard Home server:

    • Latest snap version as of writing this

  • How did you setup DNS configuration:

    • Not yet, since the service won't start

  • If it's a router or IoT, please write device model:

    • Raspberry Pi 4

  • Operating system and version:

    • Raspberry Pi OS 32-bit latest

question

Most helpful comment

Turns out, I had to issue snap install core before installing adguard-home. I missed this while doing the first installation.

I am sorry for this inconvenience and thank you guys for the quick interaction, I really appreciate the spirit! 👍

All 5 comments

I wonder could it be a bug of Snapcraft on RPi.

@ainar-g please check on one of RPis (there's one with snap installed).

@ameshkov, I couldn't reproduce the issue on our Pi. Judging by the fact that in @b52's case AdGuardHome can't even bind to port 3000, which should generally be allowed, perhaps Snap doesn't give the binary any permissions? Or could this be a SELinux issue?

Concerning my setup, this was a fresh installation of Raspberry Pi OS Lite 32-bit. After updating all packages, I went further and simply installed snap (apt install snapd), after which I rebooted. Once the RPI was up again, I installed adguard-home (snap install adguard-home), which resulted in the above shown error.

@b52 just in case, try snap connect adguard-home:network-control

Turns out, I had to issue snap install core before installing adguard-home. I missed this while doing the first installation.

I am sorry for this inconvenience and thank you guys for the quick interaction, I really appreciate the spirit! 👍

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xiaofengcod picture xiaofengcod  ·  3Comments

hl2guide picture hl2guide  ·  3Comments

Iconology picture Iconology  ·  3Comments

xenio picture xenio  ·  4Comments

ammnt picture ammnt  ·  3Comments