{"record":{"id":"6a15789fbad93874","repo":"prometheus/node_exporter","slug":"could-not-get-arp-entries-w","errorCode":null,"errorMessage":"could not get ARP entries: %w","messagePattern":"could not get ARP entries: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"collector/arp_linux.go","lineNumber":112,"sourceCode":"\tfor _, n := range neighbors {\n\t\t// Skip entries which have state NUD_NOARP to conform to output of /proc/net/arp.\n\t\tif n.State&unix.NUD_NOARP == 0 {\n\t\t\tentries[n.Interface.Name]++\n\t\t}\n\t}\n\n\treturn entries, nil\n}\n\nfunc (c *arpCollector) Update(ch chan<- prometheus.Metric) error {\n\tvar enumeratedEntry map[string]uint32\n\n\tif *arpNetlink {\n\t\tvar err error\n\n\t\tenumeratedEntry, err = getTotalArpEntriesRTNL()\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"could not get ARP entries: %w\", err)\n\t\t}\n\t} else {\n\t\tentries, err := c.fs.GatherARPEntries()\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"could not get ARP entries: %w\", err)\n\t\t}\n\n\t\tenumeratedEntry = getTotalArpEntries(entries)\n\t}\n\n\tfor device, entryCount := range enumeratedEntry {\n\t\tif c.deviceFilter.ignored(device) {\n\t\t\tcontinue\n\t\t}\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tarpEntries, prometheus.GaugeValue, float64(entryCount), device)\n\t}\n","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/prometheus/node_exporter/blob/17ddd77c59ba27e1508e9f7894b1e55b44d6aed3/collector/arp_linux.go#L94-L130","documentation":"Update wraps failures from the netlink ARP enumeration path with 'could not get ARP entries: %w'. When --collector.arp.netlink is enabled, getTotalArpEntriesRTNL failed (netlink socket or dump error) so no ARP entry counts could be gathered.","triggerScenarios":"arpCollector.Update with --collector.arp.netlink=true when getTotalArpEntriesRTNL returns an error — e.g., netlink socket creation failure or a failed RTM_GETNEIGH dump.","commonSituations":"Restricted containers/netns lacking NETLINK_ROUTE permissions; SELinux/AppArmor denials on netlink sockets; kernel-level netlink errors under heavy load.","solutions":["Disable the netlink path (omit --collector.arp.netlink) to fall back to /proc/net/arp parsing via procfs.","Grant the exporter process CAP_NET_ADMIN / permission to open NETLINK_ROUTE sockets.","Check LSM (SELinux/AppArmor) denials and adjust policy.","Inspect the wrapped error (%w) for the underlying errno."],"exampleFix":"// before\nnode_exporter --collector.arp.netlink\n// after\nnode_exporter   # uses /proc/net/arp instead","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := c.Update(ch); err != nil {\n    var unwrapped error = err\n    for errors.Unwrap(unwrapped) != nil { unwrapped = errors.Unwrap(unwrapped) }\n    logger.Error(\"ARP collection failed\", \"root\", unwrapped)\n}","preventionTips":["Grant netlink (NETLINK_ROUTE) permissions to the exporter.","Drop --collector.arp.netlink if /proc/net/arp suffices.","Review LSM policies (SELinux/AppArmor) for socket denials."],"tags":["go","linux","arp","netlink"],"backgroundTag":"network-request-failed","analyzedSha":"17ddd77c59ba27e1508e9f7894b1e55b44d6aed3","analyzedAt":"2026-09-07T17:54:06.211Z","contentChangedAt":"2026-09-07T17:54:06.211Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}