AdguardTeam/AdGuardHome · critical
validating udp ports: %w
Error message
validating udp ports: %w
What it means
The UDP port set (DNS-over-QUIC and implicitly other UDP listeners) failed validation — duplicate or invalid port values. Companion of the TCP port validation.
Source
Thrown at internal/home/config.go:783
addPorts(udpPorts, udpPort(config.DNS.Port))
if config.TLS.Enabled {
addPorts(
tcpPorts,
tcpPort(config.TLS.PortHTTPS),
tcpPort(config.TLS.PortDNSOverTLS),
tcpPort(config.TLS.PortDNSCrypt),
)
// TODO(e.burkov): Consider adding a udpPort with the same value when
// we add support for HTTP/3 for web admin interface.
addPorts(udpPorts, udpPort(config.TLS.PortDNSOverQUIC))
}
if err = tcpPorts.Validate(); err != nil {
return fmt.Errorf("validating tcp ports: %w", err)
} else if err = udpPorts.Validate(); err != nil {
return fmt.Errorf("validating udp ports: %w", err)
}
if !filtering.ValidateUpdateIvl(config.Filtering.FiltersUpdateIntervalHours) {
config.Filtering.FiltersUpdateIntervalHours = 24
}
if len(config.Users) == 0 {
l.WarnContext(ctx, "no users in the configuration file; authentication is disabled")
}
if config.Language != "" && !allowedLanguages.Has(config.Language) {
l.WarnContext(ctx, "unsupported language", "lang", config.Language)
// Clear the language so the frontend can use the client's browser
// language.
config.Language = ""
}
View on GitHub (pinned to b41aefbe51)
Solutions
- Set port_dns_over_quic to a valid unused UDP port (default 853/784)
- Ensure it doesn't duplicate other UDP services in the config
- Restart and confirm the wrapped validation error is gone
Example fix
# before port_dns_over_quic: 99999 # after port_dns_over_quic: 853
Defensive patterns
Strategy: validation
Validate before calling
if cfg.TLS.PortDNSOverQUIC < 1 || cfg.TLS.PortDNSOverQUIC > 65535 {
return errors.New("invalid quic port")
} Prevention
- Keep DoQ distinct from other UDP listeners
- Validate config changes with `AdGuardHome --check-config` style tooling where available
When it happens
Trigger: port_dns_over_quic set to an invalid value (0, >65535) or colliding with another UDP listener per udpPorts.Validate().
Common situations: Hand-edited config with a bad port_dns_over_quic, copying configs between instances without adjusting ports, typos.
Related errors
- validating tcp ports: %w
- dns.bind_hosts at index %d is not a valid ip address
- networksetup failed to set dns servers: %w
- found no dns servers in %s
- writing conf: %w
AI-assisted analysis of AdguardTeam/AdGuardHome@b41aefbe51 (2026-08-27).
Data as JSON: /api/errors/2d322557b8d48729.
Report an issue: GitHub.