AdguardTeam/AdGuardHome · error
collecting dns addresses: %w
Error message
collecting dns addresses: %w
What it means
The status handler could not build the list of DNS server addresses because expanding bind hosts failed (typically the wrapped network-interface error from appendDNSAddrsWithIfaces).
Source
Thrown at internal/home/control.go:79
dst = appendDNSAddrs(dst, iface.Addresses...)
}
ifacesAdded = true
}
return dst, nil
}
// collectDNSAddresses returns the list of DNS addresses the server is listening
// on, including the addresses on all interfaces in cases of unspecified IPs.
// extTLSConf must not be nil.
func collectDNSAddresses(extTLSConf *aghtls.ExtendedTLSConfig) (addrs []string, err error) {
if hosts := config.DNS.BindHosts; len(hosts) == 0 {
addrs = appendDNSAddrs(addrs, netutil.IPv4Localhost())
} else {
addrs, err = appendDNSAddrsWithIfaces(addrs, hosts)
if err != nil {
return nil, fmt.Errorf("collecting dns addresses: %w", err)
}
}
de := getDNSEncryption(extTLSConf)
if de.https != "" {
addrs = append(addrs, de.https)
}
if de.tls != "" {
addrs = append(addrs, de.tls)
}
if de.quic != "" {
addrs = append(addrs, de.quic)
}
return addrs, nil
}View on GitHub (pinned to b41aefbe51)
Solutions
- Resolve the underlying interface enumeration error (see wrapped message)
- Change dns.bind_hosts from wildcards to explicit interface IPs
- Verify host networking health (ip link) and restart if transient
Defensive patterns
Strategy: fallback
Try / catch
// Surface a partial status instead of failing the whole endpoint
addrs, err := collectDNSAddresses(tlsConf)
if err != nil { addrs = nil /* omit addresses in response */ } Prevention
- Avoid wildcard bind hosts on hosts with flaky interface state
- Monitor net.Interfaces health in restricted environments
When it happens
Trigger: GET /control/status with wildcard DNS bind hosts when interface enumeration errors, propagated from collectDNSAddresses's inner call.
Common situations: Same as the underlying interface enumeration failure: restricted containers, netns oddities, transient interface state.
Related errors
- cannot get network interfaces: %w
- creating dns server: %w
- starting dnssvc: %w
- parsing json time: %w
- json time is nil
AI-assisted analysis of AdguardTeam/AdGuardHome@b41aefbe51 (2026-08-27).
Data as JSON: /api/errors/1c272485e3a5de04.
Report an issue: GitHub.