slackhq/nebula · error
LocalAddr returned invalid IP address: %s
Error message
LocalAddr returned invalid IP address: %s
What it means
Type-guard failure in GenericConn.LocalAddr: the local address's IP slice failed netip.AddrFromSlice conversion (invalid length), so it cannot become a netip.AddrPort. Indicates corrupt address data from the runtime rather than user error.
Source
Thrown at udp/udp_generic.go:67
written := 0
for i, b := range bufs {
if _, err := u.UDPConn.WriteToUDPAddrPort(b, addrs[i]); err == nil {
written++
} else {
u.l.Debug("failed to write packet in batch", "udpAddr", addrs[i], "error", err)
}
}
return written, nil
}
func (u *GenericConn) LocalAddr() (netip.AddrPort, error) {
a := u.UDPConn.LocalAddr()
switch v := a.(type) {
case *net.UDPAddr:
addr, ok := netip.AddrFromSlice(v.IP)
if !ok {
return netip.AddrPort{}, fmt.Errorf("LocalAddr returned invalid IP address: %s", v.IP)
}
return netip.AddrPortFrom(addr, uint16(v.Port)), nil
default:
return netip.AddrPort{}, fmt.Errorf("LocalAddr returned: %#v", a)
}
}
func (u *GenericConn) ReloadConfig(c *config.C) {
}
func NewUDPStatsEmitter(udpConns []Conn) func() {
// No UDP stats for non-linux
return func() {}
}
type rawMessage struct {View on GitHub (pinned to dd8f660c0a)
Solutions
- netip.AddrFromSlice failed on the UDPAddr.IP, which is nil or not 4/16 bytes — usually means the socket is bound to an invalid or unspecified address; set a concrete valid listen.host in the nebula config
- Check for inherited/activated sockets (systemd, container) with no bound address; bind explicitly instead
- Restart nebula after fixing the listen address; the local address is resolved once during NewListener via LocalAddr
- If persistent across valid configs, report with Go version — this would indicate unexpected *net.UDPAddr behavior
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at udp/udp_generic.go:67 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of slackhq/nebula@dd8f660c0a (2026-09-03).
Data as JSON: /api/errors/59577b76c0034faf.
Report an issue: GitHub.