prometheus/node_exporter · error
couldn't get udp queued bytes
Error message
couldn't get udp queued bytes: %w
What it means
During Update, the UDP queues collector reads /proc/net/udp summary data via fs.NetUDP4Summary(). Errors other than os.ErrNotExist are wrapped as 'couldn't get udp queued bytes: %w'; a missing file is silently skipped (debug log) because that kernel may lack the file. Any other read/parse error aborts the scrape with this message.
Solutions
- Check /proc/net/udp is readable by the exporter process.
- Inspect the wrapped inner error to distinguish parse vs permission failures.
- Update node_exporter/procfs if the kernel emits an unexpected /proc/net/udp format.
- Remember os.ErrNotExist is expected on some kernels and is not this error.
Defensive patterns
Strategy: try-catch
Validate before calling
if _, err := os.Stat("/proc/net/udp"); err != nil {
if errors.Is(err, os.ErrNotExist) {
// expected on some kernels; udp queues metrics will be absent
}
} Try / catch
if err := c.Update(ch); err != nil {
if errors.Is(err, ErrNoData) { return }
if strings.Contains(err.Error(), "couldn't get udp queued bytes") {
logger.Warn("udp v4 queue metrics unavailable", "err", err)
return
}
return err
} Prevention
- Check /proc/net/udp readability before enabling udp_queues.
- Treat ErrNotExist as expected on kernels without the file.
- Update procfs library versions when kernels change /proc/net/udp formats.
- Audit LSM/seccomp policies that could block procfs reads.
When it happens
Trigger: udpQueuesCollector.Update when NetUDP4Summary() returns a non-ErrNotExist error — malformed /proc/net/udp contents, permission problems, or procfs parse failures.
Common situations: Kernel without /proc/net/udp (treated as no-data, not this error), LKMs or LSMs corrupting/limiting procfs reads, and unusual procfs content from hardened kernels tripping the parser.
Understand the failure class
Background: "failed to read file", EACCES, ENOENT and "could not read <path>" errors: when a program can't read a file from disk — this error's family across 49 libraries.
Related errors
- failed to get IPv4 sockstat data
- failed to get IPv6 sockstat data
- failed to open procfs
- couldn't get udp6 queued bytes
- interrupts empty
AI-assisted analysis of prometheus/node_exporter@17ddd77c59 (2026-09-07).
Data as JSON: /api/errors/6ab6de9ce6911cca.
Report an issue: GitHub.
Appendix: source
Thrown at collector/udp_queues_linux.go:67
prometheus.BuildFQName(namespace, "udp", "queues"),
"Number of allocated memory in the kernel for UDP datagrams in bytes.",
[]string{"queue", "ip"}, nil,
),
logger: logger,
}, nil
}
func (c *udpQueuesCollector) Update(ch chan<- prometheus.Metric) error {
s4, errIPv4 := c.fs.NetUDPSummary()
if errIPv4 == nil {
ch <- prometheus.MustNewConstMetric(c.desc, prometheus.GaugeValue, float64(s4.TxQueueLength), "tx", "v4")
ch <- prometheus.MustNewConstMetric(c.desc, prometheus.GaugeValue, float64(s4.RxQueueLength), "rx", "v4")
} else {
if errors.Is(errIPv4, os.ErrNotExist) {
c.logger.Debug("not collecting ipv4 based metrics")
} else {
return fmt.Errorf("couldn't get udp queued bytes: %w", errIPv4)
}
}
s6, errIPv6 := c.fs.NetUDP6Summary()
if errIPv6 == nil {
ch <- prometheus.MustNewConstMetric(c.desc, prometheus.GaugeValue, float64(s6.TxQueueLength), "tx", "v6")
ch <- prometheus.MustNewConstMetric(c.desc, prometheus.GaugeValue, float64(s6.RxQueueLength), "rx", "v6")
} else {
if errors.Is(errIPv6, os.ErrNotExist) {
c.logger.Debug("not collecting ipv6 based metrics")
} else {
return fmt.Errorf("couldn't get udp6 queued bytes: %w", errIPv6)
}
}
if errors.Is(errIPv4, os.ErrNotExist) && errors.Is(errIPv6, os.ErrNotExist) {
return ErrNoData
}View on GitHub (pinned to 17ddd77c59)