collectd-mod-network: network plugin: getaddrinfo (0.0.0.0, 25826) failed: Name has no usable address
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 4.6k
- Forks
- 4k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 134
Description
On a GL.iNet GL-MT6000, collectd starts but when it is configured to listen on 0.0.0.0 with
config collectd_network_listen
option host '0.0.0.0'
option port '25826'
in /etc/config/luci_statistics, freshly after reboot it does not listen on the port -- netstat -uln does not show
Proto Recv-Q Send-Q Local Address Foreign Address State
udp 0 0 0.0.0.0:25826 0.0.0.0:*
and data from remote machines is not collected.
Restarting the service makes the daemon listen fine and peace is restored.
In logread there is
Mon Jan 20 10:34:05 2025 kern.info kernel: [ 12.455561] NET: Registered PF_PPPOX protocol family
Mon Jan 20 10:34:05 2025 user.info kernel: [ 12.462667] kmodloader: done loading kernel modules from /etc/modules.d/*
Mon Jan 20 10:34:05 2025 authpriv.info dropbear[1558]: Not backgrounding
Mon Jan 20 10:34:06 2025 user.notice : Added device handler type: bonding
Mon Jan 20 10:34:06 2025 user.notice : Added device handler type: 8021ad
Mon Jan 20 10:34:06 2025 user.notice : Added device handler type: 8021q
Mon Jan 20 10:34:06 2025 user.notice : Added device handler type: macvlan
Mon Jan 20 10:34:06 2025 user.notice : Added device handler type: veth
Mon Jan 20 10:34:06 2025 user.notice : Added device handler type: bridge
Mon Jan 20 10:34:06 2025 user.notice : Added device handler type: Network device
Mon Jan 20 10:34:06 2025 user.notice : Added device handler type: tunnel
Mon Jan 20 10:34:06 2025 daemon.notice procd: /etc/rc.d/S25packet_steering: pid 595's current affinity list: 0-3
Mon Jan 20 10:34:06 2025 daemon.notice procd: /etc/rc.d/S25packet_steering: pid 595's new affinity list: 0
Mon Jan 20 10:34:06 2025 daemon.notice procd: /etc/rc.d/S25packet_steering: pid 596's current affinity list: 0-3
Mon Jan 20 10:34:06 2025 daemon.notice procd: /etc/rc.d/S25packet_steering: pid 596's new affinity list: 0
Mon Jan 20 10:34:06 2025 daemon.notice wpa_supplicant[1714]: Successfully initialized wpa_supplicant
Mon Jan 20 10:34:06 2025 daemon.err collectd[2087]: configfile: stat (/etc/collectd/conf.d/*.conf) failed: No such file or directory
Mon Jan 20 10:34:06 2025 daemon.err collectd[2087]: plugin_load: plugin "cpu" successfully loaded.
Mon Jan 20 10:34:06 2025 daemon.err collectd[2087]: plugin_load: plugin "interface" successfully loaded.
Mon Jan 20 10:34:06 2025 daemon.err collectd[2087]: plugin_load: plugin "iwinfo" successfully loaded.
Mon Jan 20 10:34:06 2025 daemon.err collectd[2087]: plugin_load: plugin "load" successfully loaded.
Mon Jan 20 10:34:06 2025 daemon.err collectd[2087]: plugin_load: plugin "memory" successfully loaded.
Mon Jan 20 10:34:06 2025 daemon.err collectd[2087]: plugin_load: plugin "network" successfully loaded.
Mon Jan 20 10:34:06 2025 daemon.err collectd[2087]: network plugin: getaddrinfo (0.0.0.0, 25826) failed: Name has no usable address
Mon Jan 20 10:34:06 2025 daemon.err collectd[2087]: network plugin: network_config_add_listen: sockent_server_listen failed.
Mon Jan 20 10:34:06 2025 daemon.err collectd[2087]: network plugin: getaddrinfo (0.0.0.0, 25252) failed: Name has no usable address
Mon Jan 20 10:34:06 2025 daemon.err collectd[2087]: network plugin: network_config_add_listen: sockent_server_listen failed.
Mon Jan 20 10:34:06 2025 daemon.err collectd[2087]: plugin_load: plugin "ping" successfully loaded.
Mon Jan 20 10:34:06 2025 kern.info kernel: [ 14.264631] mtk_soc_eth 15100000.ethernet eth0: Link is Down
Mon Jan 20 10:34:06 2025 daemon.err collectd[2087]: plugin_load: plugin "rrdtool" successfully loaded.
Mon Jan 20 10:34:06 2025 daemon.err collectd[2087]: rrdtool plugin: RRASingle = true: creating only AVERAGE RRAs
Mon Jan 20 10:34:06 2025 daemon.err collectd[2087]: plugin_load: plugin "thermal" successfully loaded.
Mon Jan 20 10:34:06 2025 daemon.err collectd[2087]: ping plugin: ping_host_add (192.168.41.1) failed: getaddrinfo: Name has no usable address
Mon Jan 20 10:34:06 2025 daemon.err collectd[2087]: ping plugin: No host could be added to ping object. Giving up.
Mon Jan 20 10:34:06 2025 daemon.err collectd[2087]: Initialization complete, entering read-loop.
Mon Jan 20 10:34:06 2025 kern.info kernel: [ 14.283466] mtk_soc_eth 15100000.ethernet eth0: configuring for fixed/2500base-x link mode
Mon Jan 20 10:34:06 2025 kern.info kernel: [ 14.291978] mtk_soc_eth 15100000.ethernet eth0: Link is Up - 2.5Gbps/Full - flow control rx/tx
Mon Jan 20 10:34:06 2025 kern.info kernel: [ 14.294059] mt7530-mdio mdio-bus:1f lan1: configuring for phy/sgmii link mode
Mon Jan 20 10:34:06 2025 user.notice ucitrack: Setting up /etc/config/luci-splash reload dependency on /etc/config/firewall
Mon Jan 20 10:34:06 2025 user.notice ucitrack: Setting up /etc/config/qos reload dependency on /etc/config/firewall
Mon Jan 20 10:34:06 2025 user.notice ucitrack: Setting up /etc/config/miniupnpd reload dependency on /etc/config/firewall
Mon Jan 20 10:34:06 2025 kern.info kernel: [ 14.340797] br-lan: port 1(lan1) entered blocking state
Mon Jan 20 10:34:06 2025 kern.info kernel: [ 14.346030] br-lan: port 1(lan1) entered disabled state
Mon Jan 20 10:34:06 2025 kern.info kernel: [ 14.351325] mt7530-mdio mdio-bus:1f lan1: entered allmulticast mode
Mon Jan 20 10:34:06 2025 kern.info kernel: [ 14.357588] mtk_soc_eth 15100000.ethernet eth0: entered allmulticast mode
Mon Jan 20 10:34:06 2025 user.notice ucitrack: Setting up /etc/config/odhcpd reload dependency on /etc/config/dhcp
Mon Jan 20 10:34:06 2025 kern.info kernel: [ 14.367210] mt7530-mdio mdio-bus:1f lan1: entered promiscuous mode
Mon Jan 20 10:34:06 2025 daemon.notice netifd: Interface 'lan' is enabled
Mon Jan 20 10:34:06 2025 daemon.notice netifd: Interface 'lan' is setting up now
Mon Jan 20 10:34:06 2025 daemon.notice netifd: Interface 'lan' is now up
Mon Jan 20 10:34:06 2025 kern.info kernel: [ 14.385532] mt7530-mdio mdio-bus:1f lan2: configuring for phy/gmii link mode
Mon Jan 20 10:34:06 2025 kern.info kernel: [ 14.396279] br-lan: port 2(lan2) entered blocking state
Mon Jan 20 10:34:06 2025 kern.info kernel: [ 14.401623] br-lan: port 2(lan2) entered disabled state
So it seems like collectd does not wait for network to fully start up, or indeed even for getaddrinfo to be usable.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the collectd network plugin startup during boot, using the /etc/config/luci_statistics configuration and the ordering shown in logread. Reproduce the failure and compare boot-time startup with a service restart; done means the configured UDP listeners are present after reboot and remote data is collected.
Written by the indexing model from the issue text.
Assessment
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100