Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Jeffreyvanesch opened this issue Dec 22, 2021 · 29 comments
Closed
Assignees
Milestone

Comments

@Jeffreyvanesch
Copy link

Jeffreyvanesch commented Dec 22, 2021

  • [ ☑️] I am running the latest version: Yes, version installed from the Curl script on the GitHub wiki page.
  • [ ☑️] I checked the documentation and found no answer: No documentation available for this specific issue, only an incomplete bug tracker.
  • [ ☑️] I checked to make sure that this issue has not already been filed: Yes.

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

Screenshot 2021-12-22 194541

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
Copy link

hugo-brito commented Dec 22, 2021

+1

1 similar comment
@amalcev
Copy link

amalcev commented Dec 23, 2021

+1

@Nabhan87
Copy link

Nabhan87 commented Dec 23, 2021

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
Copy link

Lorkster commented Dec 23, 2021

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
Copy link
Contributor

ainar-g commented Dec 23, 2021

@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.

@ainar-g ainar-g added bug needs investigation Needs to be reproduced reliably. waiting for data Waiting for users to provide more data. labels Dec 23, 2021
@Lorkster
Copy link

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
Copy link
Author

@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
Copy link

hristakiev commented Dec 23, 2021

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"

adguard pushed a commit that referenced this issue Dec 23, 2021
Merge in DNS/adguard-home from 3987-fix-nil-deref to master

Updates #3987.
Updates #2846.

Squashed commit of the following:

commit d653e09
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Thu Dec 23 20:08:51 2021 +0300

    all: log changes

commit c47a4ee
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Thu Dec 23 19:22:39 2021 +0300

    aghnet: fix windows tests

commit 9c91f14
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Thu Dec 23 19:09:49 2021 +0300

    aghnet: imp code readability, docs

commit d3df15d
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Thu Dec 23 18:47:28 2021 +0300

    aghnet: fix nil pointer dereference
@EugeneOne1
Copy link
Member

@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
Copy link

@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
Copy link

hristakiev commented Dec 23, 2021 via email

@ainar-g ainar-g added P2: High and removed needs investigation Needs to be reproduced reliably. waiting for data Waiting for users to provide more data. labels Dec 23, 2021
@ainar-g ainar-g added this to the v0.107.1 milestone Dec 23, 2021
@ainar-g ainar-g mentioned this issue Dec 23, 2021
3 tasks
@Jeffreyvanesch
Copy link
Author

@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
Copy link

Mytonn commented Dec 23, 2021

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
Copy link

amalcev commented Dec 24, 2021

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

@EugeneOne1
Copy link
Member

@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
Copy link
Author

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

AdGuard.log

@EugeneOne1
Copy link
Member

EugeneOne1 commented Dec 24, 2021

@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
Copy link
Author

@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
Copy link
Member

@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!

adguard pushed a commit that referenced this issue Dec 24, 2021
Merge in DNS/adguard-home from 3987-fix-nil-deref to master

Updates #3987.
Updates #2846.

Squashed commit of the following:

commit d653e09
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Thu Dec 23 20:08:51 2021 +0300

    all: log changes

commit c47a4ee
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Thu Dec 23 19:22:39 2021 +0300

    aghnet: fix windows tests

commit 9c91f14
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Thu Dec 23 19:09:49 2021 +0300

    aghnet: imp code readability, docs

commit d3df15d
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Thu Dec 23 18:47:28 2021 +0300

    aghnet: fix nil pointer dereference
@ppfeufer
Copy link

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
Copy link

amathews84 commented Dec 27, 2021

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
Copy link

ppfeufer commented Dec 27, 2021

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
Copy link

amathews84 commented Dec 27, 2021

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
Copy link

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
Copy link

Mastahh commented Mar 28, 2022

Is there fix for this issue?

@EugeneOne1
Copy link
Member

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

@thieryl
Copy link

thieryl commented Apr 2, 2022

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
Copy link
Contributor

ainar-g commented Apr 4, 2022

@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
Copy link

Mastahh commented Apr 4, 2022

@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.

heyxkhoa pushed a commit to heyxkhoa/AdGuardHome that referenced this issue Mar 20, 2023
Merge in DNS/adguard-home from 3987-fix-nil-deref to master

Updates AdguardTeam#3987.
Updates AdguardTeam#2846.

Squashed commit of the following:

commit d653e09
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Thu Dec 23 20:08:51 2021 +0300

    all: log changes

commit c47a4ee
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Thu Dec 23 19:22:39 2021 +0300

    aghnet: fix windows tests

commit 9c91f14
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Thu Dec 23 19:09:49 2021 +0300

    aghnet: imp code readability, docs

commit d3df15d
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Thu Dec 23 18:47:28 2021 +0300

    aghnet: fix nil pointer dereference
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests