AdguardTeam / AdGuardHome

Network-wide ads & trackers blocking DNS server
https://adguard.com/adguard-home.html
GNU General Public License v3.0
25.46k stars 1.83k forks source link

"Fix" button missing for address already in use issue #6469

Open ghost opened 11 months ago

ghost commented 11 months ago

Prerequisites

Platform (OS and CPU architecture)

Linux, AMD64 (aka x86_64)

Installation

GitHub releases or script from README

Setup

On one machine

AdGuard Home version

0.107.41

Action

  1. Install AGH via automated script on Ubuntu & Fedora (latest stable)
  2. Access setup instructions (Step 2/5)
  3. Experience the 0.0.0.0:53: bind: address already in use message

Expected result

Usually I would expect to see the "Fix" button shown instead of manually having to disable systemd-resolved.

Actual result

"Fix" button not shown, forcing me to manually disable systemd-resolved.

Additional information and/or screenshots

I haven't seen this for quite some time now and figured I was on an incompatible version of Linux. I've been experiencing this on Ubuntu latest lts, macOS Sonoma, and Fedora 38/39.

EugeneOne1 commented 11 months ago

Hello, @kyjhoz-mikfip-goXci0. Which actions exactly do you expect the "Fix" button to perform? The thing is, this error is thorough enough to sign, there is a process that binds to the mentioned address, probably ran via systemd. I don't think AdGuard Home's responsibility scope includes interrupting such processes somehow and should leave it up to the user to decide what to do.

ghost commented 11 months ago

Less my expectation, but more of a curiosity as to what the 'Fix' button is meant to do if it doesn't show up at all.

I would have presumed that it would have shown up if the FAQ guide for resolving the issue could be followed. It seems this isn't the case.

If you would prefer AdGuard Home not take any responsibility for automatically resolving the issue (which is what it seems like), then why design a button that's meant to do just that?

It seems logical in this case to remove it altogether if that's the attitude towards it.

EugeneOne1 commented 11 months ago

@kyjhoz-mikfip-goXci0, oh, you're absolutely right indeed, I had completely forgotten about the "auto fix" feature.

As far as I know, the "Fix" button should appear if AdGuard Home detects the stub DNS resolver via CLI interface. Each step of this process is covered with logging, so it should shred some light to the issue. Could you please collect and share the log with us? You may send it to the devteam@adguard.com.

ghost commented 11 months ago

Too easy, the logs have been sent.

EugeneOne1 commented 11 months ago

@kyjhoz-mikfip-goXci0, we received the log, thank you. Unfortunately I've made an incomplete request, sorry for that. Could you please also go through the 2nd installation step so that the actual check is performed and logged? It would also be nice if you could manually run AdGuard Home with the -v flag for verbose logging, as there is no configuration file to enable it yet.

ghost commented 11 months ago

The below is the final output after manually starting AGH with -v, and going all the way through to the Dashboard. To continue past the step 2, I had to manually carry out these instructions to get to the next page of the setup.

user@ubuntuvm:~/Downloads$ sudo /opt/AdGuardHome/AdGuardHome -v
2023/12/09 23:44:24.934708 15841#1 [info] AdGuard Home, version v0.107.42
2023/12/09 23:44:24.934784 15841#1 [debug] current working directory is /opt/AdGuardHome
2023/12/09 23:44:24.934818 15841#1 [info] This is the first time AdGuard Home is launched
2023/12/09 23:44:24.934848 15841#1 [info] Checking if AdGuard Home has necessary permissions
2023/12/09 23:44:24.935060 15841#1 [info] AdGuard Home can bind to port 53
2023/12/09 23:44:24.936197 15841#1 [debug] filtering: initialized 105 services
2023/12/09 23:44:24.936277 15841#1 [info] safesearch default: disabled
2023/12/09 23:44:24.936500 15841#1 [debug] dhcpd: warning: creating dhcpv4 srv: dhcpv4: invalid IP is not an IPv4 address
2023/12/09 23:44:24.937039 15841#1 [info] Initializing auth module: /opt/AdGuardHome/data/sessions.db