[collectd] Bug#535787: collectd: powerdns monitoring hangs on the pdns socket (pdns 2.9.22)

Luke Heberling collectd at c-ware.com
Sun Aug 30 21:37:47 CEST 2009


On Sunday 30 August 2009 05:34:00 Sebastian Harl wrote:
> I do not expect it to collect any values either as I suspect that the
> protocol has been changed in pdns 2.9.22.
>

Found the time to investigate more thoroughly. Powerdns is wanting a newline 
character at the end of the input. My guess is that it's enforcing an existing 
protocol, not changing it. The attached patch provides the newline and also 
adds the timeout to the pdns-server socket. (The previous patch applied it 
only to the recursor).

The patch is against the git.tokkee.org source and does not include the patch 
from earlier in the bug report.

Tested successfully all permutations of
pdns-server 2.9.21.2-1 / pdns-server 2.9.22-1~bpo50+1 / pdns-recursor 3.1.7-1, 
default/specific collect commands, 
chroot/non-chroot.

It should be noted that the recursor requires special attention if chrooted. 
Because it uses a datagram socket it must see the collectd socket at the same 
path that the collectd binary does. So, for instance if the pdns recursor is 
chrooted at /var/spool/pdns-recursor, then collectd's LocalSocket would be 
/var/spool/pdns-recursor/collectd.socket and you'd have symlinks to . named 
var, spool and pdns-recursor in the /var/spool/pdns-recursor directory. This 
can't be fixed cleanly without changes to pdns-recursor, and even their own 
rec_control program is broken when pdns-recursor is chrooted.

Luke Heberling




More information about the collectd mailing list