8000 network plugin: Client doesn't retry to resolve server. · Issue #627 · collectd/collectd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

network plugin: Client doesn't retry to resolve server. #627

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
yanosz opened this issue May 30, 2014 · 5 comments
Closed

network plugin: Client doesn't retry to resolve server. #627

yanosz opened this issue May 30, 2014 · 5 comments

Comments

@yanosz
Copy link
yanosz commented May 30, 2014

Version: 4.10
Distribution: OpenWRT

collectd stops transmittag data using the network-plugin, if longer outages occur. (Tested IPv6 only).

  • Eg. no IP-Addresse are available on boot. Connectivity is restored a few hours later -> collectd doesn't start to transmit
  • IP-connectivity is down for a few days -> collectd doesn't start to transmit the moment it's restored
@g3ntleman
Copy link

I'm suffering from the same issue.

@christf
Copy link
christf commented May 31, 2014

me too.

@octo
Copy link
Member
octo commented Sep 6, 2014

#609 has some additional information, namely:

Apr 30 07:30:50 host-c collectd:  network plugin: getaddrinfo (host-d.example.com, (null)) failed: Name or service not known
Apr 30 07:30:50 host-c collectd:  network plugin: network_config_add_server: sockent_open failed.
Apr 30 07:30:50 host-c collectd:  network plugin: getaddrinfo (host-d.example.com, (null)) failed: Name or service not known
Apr 30 07:30:50 host-c collectd:  network plugin: network_config_add_server: sockent_open failed.

This looks like a problem in DNS resolution. AfaIk the resolver will cache negative results, based on the SOA record of your nameserver. This doesn't really explain why it would work when restarting collectd, but it could explain those errors.

@octo
Copy link
Member
octo commented Sep 6, 2014

n/m, the problem is that network_config_add_server(), which is called at configure time, tries to open the socket – and fails. Opening the socket should of course be re-tried at runtime, i.e. when calls to write() determine that the opening the socket hasn't been tried for a while.

@octo octo changed the title network transmissions: Crash on network outages network plugin: Client doesn't retry to resolve server. Sep 6, 2014
octo added a commit that referenced this issue Sep 6, 2014
This moves the socket creation logic so it's called from
networt_send_buffer_plain(). This allows us to recover after network
failures or when collectd was started before the network was available.

Fixes: #627
@octo
Copy link
Member
octo commented Sep 6, 2014

This should fix it. It's currently sitting in collectd-5.3 and will be merged to the collectd-5.4 and master branches. This will not be fixed in 4.* though.

Best regards,
—octo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants
0