Error while creating "dhcpv4" and no registering of the handlers
Prerequisites
-
[X] I have checked the Wiki and Discussions and found no answer
-
[X] I have searched other issues and found no duplicates
-
[X] I want to report a bug and not ask a question
Operating system type
FreeBSD
CPU architecture
AMD64
Installation
GitHub releases or script from README
Setup
On a router, DHCP is handled by the router
AdGuard Home version
v0.108.0-b.15
Description
What did you do? I installed AdGuard Home on an OPNsense router that currently runs FreeBSD 13.1-RELEASE-p2. I am able to start AdGuard Home but there is no webserver starting. The console shows that necessary permissions are existing and right after that there is an error shown
creating dhcpv4 srv: dhcpv4: nil is not an IP address
Right after that the auth and web modules are initialized, redirect for first launch is shown and all internal IPs and IPs of the wan-gateways are shown
Expected result Opening first launch assistant using port 3000 for configuration
Actual result No webpage published, no listening on ports 3000 and 3001
Screenshots (if applicable)
Additional information Seems to be a problem registering the IPv4 dhcp server while first start. Found some code in "package dhcpd" that could be responsible for that. There is already a running IPv4 dhcp server on that device.
s.registerHandlers()
v4conf := conf.Conf4 v4conf.InterfaceName = s.conf.InterfaceName v4conf.notify = s.onNotify v4conf.Enabled = s.conf.Enabled && len(v4conf.RangeStart) != 0
_s.srv4, err = v4Create(&v4conf) if err != nil { if v4conf.Enabled { return nil, fmt.Errorf("creating dhcpv4 srv: %w", err) }
log.Error("creating dhcpv4 srv: %s", err) }_
Same issue 11/7
I also have the same issue:-
"creating dhcpv4 srv: dhcpv4: invalid IP is not an IPv4 address" in log and can no longer access the frontend.
i also have the same issue, has anyone figured out a fix?
@GH-USER2022, hello and sorry for the late response. Unfortunately, we can't reproduce the web page availability issue. Could you please send us the whole log AdGuard Home generates, preferably with option -v (verbose logging) specified? You may send it to [email protected].
I'd suppose there is actually another error, since the mentioned one shouldn't affect the web part of AGH.
I can reproduce the issue (cannot access the front end). Here's the log with option -v.
root@OPNsense:~/opt/AdGuardHome # ./AdGuardHome -v 2022/12/04 03:37:18.291642 844#1 [info] AdGuard Home, version v0.107.19 2022/12/04 03:37:18.291716 844#1 [debug] current working directory is /root/opt/AdGuardHome 2022/12/04 03:37:18.291737 844#1 [info] This is the first time AdGuard Home is launched 2022/12/04 03:37:18.292341 844#1 [info] Checking if AdGuard Home has necessary permissions 2022/12/04 03:37:18.292438 844#1 [info] AdGuard Home can bind to port 53 2022/12/04 03:37:18.293115 844#1 [debug] filtering: initialized 43 services 2022/12/04 03:37:18.294251 844#1 [error] creating dhcpv4 srv: dhcpv4: invalid IP is not an IPv4 address 2022/12/04 03:37:18.294317 844#1 [debug] clients: removed 0 client aliases 2022/12/04 03:37:18.294336 844#1 [debug] clients: added 0 client aliases from dhcp 2022/12/04 03:37:18.294355 844#1 [info] Initializing auth module: /root/opt/AdGuardHome/data/sessions.db 2022/12/04 03:37:18.294399 844#1 [info] auth: initialized. users:0 sessions:0 2022/12/04 03:37:18.294574 844#1 [info] web: initializing 2022/12/04 03:37:18.294615 844#1 [info] This is the first launch of AdGuard Home, redirecting everything to /install.html 2022/12/04 03:37:18.295284 844#1 [info] AdGuard Home is available at the following addresses: 2022/12/04 03:37:18.295432 844#1 [info] Go to http://[::1]:3000 2022/12/04 03:37:18.295469 844#1 [info] Go to http://[fe80::1%lo0]:3000 2022/12/04 03:37:18.295482 844#1 [info] Go to http://127.0.0.1:3000 2022/12/04 03:37:18.295495 844#1 [info] Go to http://192.168.1.138:3000 2022/12/04 03:37:18.295507 844#1 [info] Go to http://0.0.0.0:3000
And here is the log with an edge release.
root@OPNsense:/opt/AdGuardHome # ./AdGuardHome -v 2022/12/07 05:29:49.806195 55844#1 [info] AdGuard Home, version v0.108.0-a.393+6d1adf74 2022/12/07 05:29:49.806258 55844#1 [debug] current working directory is /opt/AdGuardHome 2022/12/07 05:29:49.806289 55844#1 [info] This is the first time AdGuard Home is launched 2022/12/07 05:29:49.806303 55844#1 [info] Checking if AdGuard Home has necessary permissions 2022/12/07 05:29:49.806393 55844#1 [info] AdGuard Home can bind to port 53 2022/12/07 05:29:49.806877 55844#1 [debug] filtering: initialized 43 services 2022/12/07 05:29:49.806954 55844#1 [debug] dhcpd: warning: creating dhcpv4 srv: dhcpv4: invalid IP is not an IPv4 address 2022/12/07 05:29:49.807009 55844#1 [debug] clients: removed 0 client aliases 2022/12/07 05:29:49.807026 55844#1 [debug] clients: added 0 client aliases from dhcp 2022/12/07 05:29:49.807079 55844#1 [info] Initializing auth module: /opt/AdGuardHome/data/sessions.db 2022/12/07 05:29:49.807207 55844#1 [info] auth: initialized. users:0 sessions:0 2022/12/07 05:29:49.807260 55844#1 [info] web: initializing 2022/12/07 05:29:49.807355 55844#1 [info] This is the first launch of AdGuard Home, redirecting everything to /install.html 2022/12/07 05:29:49.807376 55844#1 [info] AdGuard Home is available at the following addresses: 2022/12/07 05:29:49.807592 55844#1 [info] Go to http://[::1]:3000 2022/12/07 05:29:49.807627 55844#1 [info] Go to http://[::1]:3001 (BETA) 2022/12/07 05:29:49.807640 55844#1 [info] Go to http://[fe80::1%lo0]:3000 2022/12/07 05:29:49.807690 55844#1 [info] Go to http://[fe80::1%lo0]:3001 (BETA) 2022/12/07 05:29:49.807704 55844#1 [info] Go to http://127.0.0.1:3000 2022/12/07 05:29:49.807716 55844#1 [info] Go to http://127.0.0.1:3001 (BETA) 2022/12/07 05:29:49.807728 55844#1 [info] Go to http://192.168.1.102:3000 2022/12/07 05:29:49.807768 55844#1 [info] Go to http://192.168.1.102:3001 (BETA) 2022/12/07 05:29:49.807780 55844#1 [info] Go to http://0.0.0.0:3000 2022/12/07 05:29:49.807870 55844#1 [info] Go to http://0.0.0.0:3001 (BETA)
@GH-USER2022, is that reproduces in the newer releases? If yes, I'd like to clarify a few things.
Firstly, do you try to access the router with the printed addresses? Which one do you use exactly? What are the others?
Secondly, it appears that in some circumstances AGH silently doesn't bind to the addresses, it prints for accessing. Could you please show the output of lsof -i :3000 command on the router where AdGuard Home runs.
Same Issue HERE:
2023/06/15 00:17:23.292711 9107#1 [info] AdGuard Home, version v0.107.32 2023/06/15 00:17:23.293119 9107#1 [debug] current working directory is /home/onlyhard/AdGuardHome 2023/06/15 00:17:23.293457 9107#1 [debug] reading config file: /home/onlyhard/AdGuardHome/AdGuardHome.yaml 2023/06/15 00:17:23.298382 9107#1 [debug] github.com/AdguardTeam/AdGuardHome/internal/home.upgradeConfig(): got schema version 20 2023/06/15 00:17:23.298679 9107#1 [debug] reading config file: /home/myusername/AdGuardHome/AdGuardHome.yaml 2023/06/15 00:17:23.304663 9107#1 [info] tls: using default ciphers 2023/06/15 00:17:23.307126 9107#1 [debug] hosts container: starting 2023/06/15 00:17:23.307397 9107#1 [debug] hosts container: refreshing 2023/06/15 00:17:23.307997 9107#1 [debug] hosts container: added ip-host pair "127.0.0.1"-"localhost" 2023/06/15 00:17:23.308393 9107#1 [debug] hosts container: added ip-host pair "127.0.1.1"-"raspadguardserver" 2023/06/15 00:17:23.308845 9107#1 [debug] hosts container: added ip-host pair "::1"-"localhost" 2023/06/15 00:17:23.309210 9107#1 [debug] hosts container: added ip-host pair "::1"-"ip6-localhost" 2023/06/15 00:17:23.309571 9107#1 [debug] hosts container: added ip-host pair "::1"-"ip6-loopback" 2023/06/15 00:17:23.310019 9107#1 [debug] hosts container: added ip-host pair "ff02::1"-"ip6-allnodes" 2023/06/15 00:17:23.310394 9107#1 [debug] hosts container: added ip-host pair "ff02::2"-"ip6-allrouters" 2023/06/15 00:17:23.311736 9107#1 [debug] hosts container: sending upd 2023/06/15 00:17:23.317311 9107#1 [debug] filtering: initialized 64 services 2023/06/15 00:17:23.330175 9107#1 [info] safesearch default: reset 253 rules 2023/06/15 00:17:23.330636 9107#1 [debug] dhcpd: warning: creating dhcpv4 srv: dhcpv4: invalid IP is not an IPv4 address 2023/06/15 00:17:23.332768 9107#1 [debug] clients: removed 0 client aliases 2023/06/15 00:17:23.332997 9107#1 [debug] clients: added 0 client aliases from dhcp 2023/06/15 00:17:23.333285 9107#1 [debug] writing config file "/home/onlyhard/AdGuardHome/AdGuardHome.yaml" 2023/06/15 00:17:23.333448 9107#40 [debug] clients: removed 0 client aliases 2023/06/15 00:17:23.333860 9107#40 [debug] clients: added ::1 -> "localhost" [1] 2023/06/15 00:17:23.334101 9107#40 [debug] clients: added ff02::1 -> "ip6-allnodes" [2] 2023/06/15 00:17:23.334323 9107#40 [debug] clients: added ff02::2 -> "ip6-allrouters" [3] 2023/06/15 00:17:23.334612 9107#40 [debug] clients: added 127.0.0.1 -> "localhost" [4] 2023/06/15 00:17:23.334884 9107#40 [debug] clients: added 127.0.1.1 -> "raspadguardserver" [5] 2023/06/15 00:17:23.335127 9107#40 [debug] clients: added 5 client aliases from system hosts file 2023/06/15 00:17:23.348941 9107#1 [info] Initializing auth module: /home/myusername/AdGuardHome/data/sessions.db
My Version: Copyright © 2023 [AdGuard] Version: v0.107.32
There is any Fix for this ? Guys Some of you have faced the same issue and fixed it? @aerothan @MikeyBally @Roasty2793 @toopran ?
I have some Lists implemented
But no Logs or Statistics