AdguardTeam / AdGuardHome

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

AdGuardHome configuration fails with Error: control/install/configure #3987

Closed Jeffreyvanesch closed 2 years ago

Jeffreyvanesch commented 2 years ago

Issue Details

When trying to install AdGuard Home on RHEL 8 using the Curl script, configuration of the listen IP addresses is not possible due to the following error: Error| control/install/check_config | Network Error

This error message occurs while going through the initial configuration (Step 2/5 Setting up the admin interface and DNS server interface listen address).

I can continue to step 3, after step 3 the following error appears again: Error: control/install/configure | Network Error and I'm being set back to step 2. This is an infinite loop that I'm stuck in.

So far, I've uninstalled and reinstalled AGH (Both Stable and Beta) via the script, but keep getting stuck on these errors.

OS Version:

NAME="Red Hat Enterprise Linux"
VERSION="8.5 (Ootpa)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="8.5"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Red Hat Enterprise Linux 8.5 (Ootpa)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:8::baseos"
HOME_URL="https://www.redhat.com/"

AGH Version:

[root@adguard-OPS AdGuardHome]# ./AdGuardHome -v --version
AdGuard Home
Version: v0.107.0-b.17
Channel: beta
Go version: go1.16.12
Build time: 2021-12-21T12:44:58Z+0000
GOOS: linux
GOARCH: amd64
Race: false

Version of AdGuard Home server: v0.107.0-b.17 BETA

How did you install AdGuard Home: Github Curl script release

How did you setup DNS configuration: Low power Pluggable PC

CPU architecture: AMD64

Operating system and version: See OS version above.

Expected Behavior

Able to configure the Web interface and DNS listen interface without receiving the errors mentioned.

Actual Behavior

Able to set Listen interface and Admin interface IP, not able to continue to step 4 or 5.

Screenshots

Screenshot: ![Screenshot 2021-12-22 194636](https://user-images.githubusercontent.com/25173470/147143715-4e237d40-0482-4bdd-9ab3-d3756fe79552.png) ![Screenshot 2021-12-22 194541](https://user-images.githubusercontent.com/25173470/147143722-f7c6178e-8bf3-4cec-bbbe-0bd0396032d7.png)

Additional Information

At the point of installation, no network or DNS issues were present. Internal DNS set to 1.1.1.1 and 1.0.0.1 to disclose any network related issues.

hugo-brito commented 2 years ago

+1

amalcev commented 2 years ago

+1

Nabhan87 commented 2 years ago

same issue.. Error: control/install/check_config | Network Error Error: control/install/configure | Network Error

NAME="Ubuntu" VERSION="20.04.3 LTS (Focal Fossa)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Armbian 21.08.1 Focal" VERSION_ID="20.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=focal UBUNTU_CODENAME=focal

instalaltion im following curl -s -S -L https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -v

Lorkster commented 2 years ago

OS Version:

PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)" NAME="Raspbian GNU/Linux" VERSION_ID="9" VERSION="9 (stretch)" VERSION_CODENAME=stretch ID=raspbian ID_LIKE=debian

AGH Version:

AdGuard Home Version: v0.107.0 Channel: release Go version: go1.16.12 Build time: 2021-12-21T13:56:24Z+0000 GOOS: linux GOARCH: arm GOARM: v7se

How did you install AdGuard Home:

Following https://github.com/AdguardTeam/AdGuardHome/wiki/Raspberry-Pi

Nothing to speak of in the service logs: Dec 23 13:35:16 raspberrypi systemd[1]: Starting AdGuard Home: Network-level blocker... Dec 23 13:35:16 raspberrypi systemd[1]: Started AdGuard Home: Network-level blocker. Dec 23 13:35:16 raspberrypi AdGuardHome[25529]: 2021/12/23 13:35:16 [info] service: control action: run Dec 23 13:35:16 raspberrypi AdGuardHome[25529]: 2021/12/23 13:35:16.983705 [info] AdGuard Home, version v0.107.0 Dec 23 13:35:16 raspberrypi AdGuardHome[25529]: 2021/12/23 13:35:16.983751 [info] AdGuard Home is running as a service Dec 23 13:35:16 raspberrypi AdGuardHome[25529]: 2021/12/23 13:35:16.983782 [info] This is the first time AdGuard Home is Dec 23 13:35:16 raspberrypi AdGuardHome[25529]: 2021/12/23 13:35:16.983800 [info] Checking if AdGuard Home has necessary Dec 23 13:35:16 raspberrypi AdGuardHome[25529]: 2021/12/23 13:35:16.984321 [info] AdGuard Home can bind to port 53 Dec 23 13:35:16 raspberrypi AdGuardHome[25529]: 2021/12/23 13:35:16.988665 [info] Initializing auth module: /home/pi/AdG Dec 23 13:35:16 raspberrypi AdGuardHome[25529]: 2021/12/23 13:35:16.999103 [info] auth: initialized. users:0 sessions: Dec 23 13:35:16 raspberrypi AdGuardHome[25529]: 2021/12/23 13:35:16.999179 [info] Initialize web module Dec 23 13:35:17 raspberrypi AdGuardHome[25529]: 2021/12/23 13:35:16.999272 [info] This is the first launch of AdGuard Ho Dec 23 13:35:17 raspberrypi AdGuardHome[25529]: 2021/12/23 13:35:16.999421 [info] AdGuard Home is available at the follo Dec 23 13:35:17 raspberrypi AdGuardHome[25529]: 2021/12/23 13:35:17.000200 [info] Go to http://127.0.0.1:3000 Dec 23 13:35:17 raspberrypi AdGuardHome[25529]: 2021/12/23 13:35:17.000249 [info] Go to http://[::1]:3000 Dec 23 13:35:17 raspberrypi AdGuardHome[25529]: 2021/12/23 13:35:17.000270 [info] Go to http://192.168.1.173:3000

ainar-g commented 2 years ago

@Jeffreyvanesch, thanks for the report! Are there any permission denied errors in the logs of the AdGuardHome service? Have you tried this solution from our Wiki? Fedora / RHEL will often have restrictive firewall and filesystem rules.

If that is the case, we must update the installation script to detect that and try to perform some of the setting, as well as informing the user about this.

Everyone who has similar issues, please consider adding the relevant information about your OS and installation procedure to your posts and use thumbs-up reactions on the original message instead of “+1” messages. Thanks.

Lorkster commented 2 years ago

I found the issue for me at least: It was the default port 80 used in the setup. Changing that made the rest of the setup work correctly. Would've helped to see a better error message or something in the logs!

Jeffreyvanesch commented 2 years ago

@Jeffreyvanesch, thanks for the report! Are there any permission denied errors in the logs of the AdGuardHome service? Have you tried this solution from our Wiki? Fedora / RHEL will often have restrictive firewall and filesystem rules.

If that is the case, we must update the installation script to detect that and try to perform some of the setting, as well as informing the user about this.

Everyone who has similar issues, please consider adding the relevant information about your OS and installation procedure to your posts and use thumbs-up reactions on the original message instead of “+1” messages. Thanks.

Hey @ainar-g Thanks for the prompt reply, The logfile did not contain any 'Permission Denied' rules that would indicate problems with user rights.

As a precaution, I've successfully moved the whole AdGuardHome working directory from '/opt' to '/usr/local/bin', executed the command to change the security context, and disabled the entire Firewall. Unfortunately, this did not resolve it. Also, following the script in the wiki page didn't do the trick.

It should also be mentioned that one needs to adapt the AdGuardHome.service file to the new location of AGH, if it's not changed the service fails to start.

hristakiev commented 2 years ago

same issue ... After stopping web server its go normal and works, if change port different than 80 still not works The same happened if port 53 is used

PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)" NAME="Raspbian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)" VERSION_CODENAME=bullseye ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

EugeneOne1 commented 2 years ago

@Jeffreyvanesch, @Nabhan87, @hristakiev, we suspect there is a bug introduced in #3835. We've just pushed the latest edge build that should fix the server crash and recover the error message. Could you please check if AGH installs properly now?

Nabhan87 commented 2 years ago

@Jeffreyvanesch , @Nabhan87 , @hristakiev , kami menduga ada bug yang diperkenalkan di #3835 . Kami baru saja mendorong versi edge terbaru yang akan memperbaiki kerusakan server dan kesalahan pesan. Bisakah Anda memeriksa apakah AGH terpasang dengan benar sekarang?

yes, now AGH runs normally on Armbian OS 20.10 (tested buster and focal) the case I experienced was on Armbian OS 21.08.1 Focal, because AGH couldn't run properly so I used Armbian OS version 20.10. there seems to be a problem with the system os version 21.08.1

hristakiev commented 2 years ago

Yes, its working now. Thank you

On Thu, 23 Dec 2021 09:50:42 -0800 Nabhan87 @.***> wrote:

@Jeffreyvanesch , @Nabhan87 , @hristakiev , kami menduga ada bug yang diperkenalkan di #3835 . Kami baru saja mendorong versi edge terbaru yang akan memperbaiki kerusakan server dan kesalahan pesan. Bisakah Anda memeriksa apakah AGH terpasang dengan benar sekarang?

yes, now AGH runs normally on Armbian OS 20.10 (tested buster and focal) the case I experienced was on Armbian OS 21.08.1 Focal, because AGH couldn't run properly so I used Armbian OS version 20.10. there seems to be a problem with the system os version 21.08.1

-- Reply to this email directly or view it on GitHub: https://github.com/AdguardTeam/AdGuardHome/issues/3987#issuecomment-1000449001 You are receiving this because you were mentioned.

Message ID: @.***>

-- Поздрави, Николай Христакиев Almus.net Ltd. Лом 3600 ул. "Пристанищна 2" mobile: +359 887 392 217 e-mail: @.*** https://www.almus.net

PGP key: https://almus.net/pgp/almus.key.asc Key fingerprint 8B95 1854 100D 71AB 2792 4AE4 A442 671C 9703 5AEA

Jeffreyvanesch commented 2 years ago

@EugeneOne1 Unfortunately for RHEL 8 it's not working. It still shows the "Network error" fault message, this is regardless of what the installation directory is (/usr/local/bin/AdGuardHome or /opt/AdGuardHome). image

Mytonn commented 2 years ago

Same issue with Debian 11. There was not any issue with Debian 10 but I faced this issue right after upgrade Deb 10 to Deb 11.

image

amalcev commented 2 years ago

Same issue while installing on Synology NAS (DSM 7) in Docker.

EugeneOne1 commented 2 years ago

@Jeffreyvanesch, that's interesting. Could you please help us a bit more? Please run the AGH binary manually (not as a service) with -v flag, reproduce the , and sent us the log's output, either here or to the devteam@adguard.com.

Jeffreyvanesch commented 2 years ago

@EugeneOne1 Output of ' sudo /opt/AdGuardHome/AdGuardHome -l /opt/AdGuardHome/AdGuard.log --verbose' attached to this reply.

AdGuard.log

EugeneOne1 commented 2 years ago

@Jeffreyvanesch, well, judging by the first line of the log ([info] AdGuard Home, version v0.107.0), I can tell for sure you are using not the latest edge build. However, the actual bug the log expresses is just the one we've fixed yesterday, so I believe you need to update the AGH properly.

Here you can find the instructions on how to install the edge build via curl+sh. There you may also download the binary manually.

Could you please try it? To ensure the version of the build is the correct one, the first line of the log should be something like:

[info] AdGuard Home, version v0.108.0-a.12+201ef10d
Jeffreyvanesch commented 2 years ago

@EugeneOne1 I might have somehow overlooked the update script 😅 Removed the old AdGuard installation and replaced it with the Edge build, disabled the internal DNS as well as the virbridge interface because it was occupying port 53.

I can confirm that the edge build does not have this problem and is successfully running atm..

Let me know if you need anything else. If not consider this issue as resolved.

EugeneOne1 commented 2 years ago

@Jeffreyvanesch, that's great! I'll close the issue for now. We're also plan to release a patch version containing the fix in the next week or two.

Thanks everyone for testing!

ppfeufer commented 2 years ago

Same issue with Debian 11. There was not any issue with Debian 10 but I faced this issue right after upgrade Deb 10 to Deb 11.

Had that as well after upgrading to Deb 11. Check if connman is running, it blocks port 53. Seems to be some new stuff with Deb 11. I had to stop and deactivate it, restart the machine and AdGuard was working again.

You can check which packages are listening on port 53 with:

sudo netstat -pna | grep :53
amathews84 commented 2 years ago

I found the issue for me at least: It was the default port 80 used in the setup. Changing that made the rest of the setup work correctly. Would've helped to see a better error message or something in the logs!

Hello, what port did you change it to? My port 80 is used by my Reolink NVR. When I try to change to a different port I still get the same error.

For additional context here is what I'm seeing for port 53 and Port 80. Looks like Adguard is binding to Port 53 but another service is using Port 80 (I assume this is my NVR based on my router port forwarding settings) image

For context here is the error that I continually get: image

Attempting to set up on Raspberry pi 3b+.

ppfeufer commented 2 years ago

You already have a webserver (lighttpd) listening on port 80, so AdGuardHome can't listen there. Got the same issue with Apache for me, so I did set AGH's port to 8100 and proxied it with an Apache vhost config.

You don't have to proxy it, but then you need to add the port to the web address to open the web interface.

amathews84 commented 2 years ago

Thank you! This worked for me perfectly. I am able to access the web dashboard interface now. Just a couple of questions:

1) When I assign the IP address of my pi as the DNS server in my router do I need to include the port number there as well?

2) Is 8100 an arbitrary number? I tried several other port numbers before that but it didn't work. The difference when I tried 8100 is I also restarted my Raspberry Pi so not sure if that made a difference. I ask because I want to create a second instance of Adguard Home to be my secondary DNS server and I don't know which port number I should use for it.

ppfeufer commented 2 years ago

When I assign the IP address of my pi as the DNS server in my router do I need to include the port number there as well?

No, just the IP. The DNS server is listening on port 53, which is the default.

Is 8100 an arbitrary number? I tried several other port numbers before that but it didn't work. The difference when I tried 8100 is I also restarted my Raspberry Pi so not sure if that made a difference. I ask because I want to create a second instance of Adguard Home to be my secondary DNS server and I don't know which port number I should use for it.

That's just a random port I threw in. It should work with pretty much every port you can come up with that is not already taken by any of the services. So a port in the higher range is usually good to use, something above 5000 is my general rule for custom ports.

Mastahh commented 2 years ago

Is there fix for this issue?

EugeneOne1 commented 2 years ago

@Mastahh, should be fixed since v0.107.1. Doesn't it work?

thieryl commented 2 years ago

this is that am getting from this page image

2022/04/02 17:06:33.801375 2058#29 [debug] GET /control/install/get_addresses 2022/04/02 17:06:38.404177 2058#29 [debug] POST /control/install/check_config 2022/04/02 17:06:38.407574 2058#29 [debug] web: plain: http: panic serving 192.168.100.53:49790: runtime error: invalid memory address or nil pointer dereference goroutine 29 [running]: net/http.(conn).serve.func1(0x40002eaaa0) net/http/server.go:1802 +0xe4 panic({0xba6da0, 0x254b1c0}) runtime/panic.go:1052 +0x2b4 github.com/AdguardTeam/AdGuardHome/internal/aghnet.closePortChecker(...) github.com/AdguardTeam/AdGuardHome/internal/aghnet/net_unix.go:14 github.com/AdguardTeam/AdGuardHome/internal/aghnet.CheckPort({0xc88d04, 0x3}, {0x4000333250, 0x10, 0x10}, 0x50) github.com/AdguardTeam/AdGuardHome/internal/aghnet/net.go:203 +0x140 github.com/AdguardTeam/AdGuardHome/internal/home.(Web).handleInstallCheckConfig(0x400038c0e0, {0x2058278, 0x40000341c0}, 0x400019ad00) github.com/AdguardTeam/AdGuardHome/internal/home/controlinstall.go:109 +0x254 github.com/AdguardTeam/AdGuardHome/internal/home.ensure.func1({0x2058278, 0x40000341c0}, 0x400019ad00) github.com/AdguardTeam/AdGuardHome/internal/home/control.go:219 +0x258 github.com/AdguardTeam/AdGuardHome/internal/home.preInstall.func1({0x2058278, 0x40000341c0}, 0x400019ad00) github.com/AdguardTeam/AdGuardHome/internal/home/control.go:254 +0x50 net/http.HandlerFunc.ServeHTTP(0x4000292ea0, {0x2058278, 0x40000341c0}, 0x400019ad00) net/http/server.go:2047 +0x40 net/http.(ServeMux).ServeHTTP(0x400028c040, {0x2058278, 0x40000341c0}, 0x400019ad00) net/http/server.go:2425 +0x18c github.com/AdguardTeam/AdGuardHome/internal/home.limitRequestBody.func1({0x2058278, 0x40000341c0}, 0x400019ac00) github.com/AdguardTeam/AdGuardHome/internal/home/middlewares.go:75 +0x344 net/http.HandlerFunc.ServeHTTP(0x40002b62e8, {0x2058278, 0x40000341c0}, 0x400019ac00) net/http/server.go:2047 +0x40 net/http.serverHandler.ServeHTTP({0x400038c2a0}, {0x2058278, 0x40000341c0}, 0x400019ac00) net/http/server.go:2879 +0x45c net/http.(conn).serve(0x40002eaaa0, {0x205ff30, 0x40003a8780}) net/http/server.go:1930 +0xb54 created by net/http.(*Server).Serve net/http/server.go:3034 +0x4ac 2022/04/02 17:06:38.416743 2058#8 [debug] POST /control/install/check_config

please help

Regards T10

ainar-g commented 2 years ago

@thieryl, please file a new issue and put all of the required information into the opening post. Especially your OS and the version of AdGuard Home.

Mastahh commented 2 years ago

@Mastahh, should be fixed since v0.107.1. Doesn't it work?

Openwrt is still on 0.107.0-1, will wait when they migrate new version, thank you.