Open jangrewe opened 6 years ago
Today i also noticed errors like this in my syslog:
Nov 12 11:41:41 hades pdns_recursor[320]: Nov 12 11:41:41 Error dealing with control socket request: Unable to send message over control channel '/tmp/lsock181545485': No such file or directory
The recursor uses Unix datagrams which are kind of weird. The exporter and recursor both need to run as the same user so that the recursor can talk to the reply socket (that name you see in recursor syslog)
Hi @wrouesnel, I've got the same issue as @jangrewe
Both pdns_recursor (0.0.3) and pdns_exporter (4.1.1) runs with the same user but the issue is still there. ps output:
UID PID PPID C STIME TTY TIME CMD
pdns-re+ 3331 1 0 14:40 ? 00:00:00 /usr/sbin/pdns_recursor --daemon=no --write-pid=no --disable-syslog --log-timestamp=no
pdns-re+ 3336 1821 0 14:40 pts/0 00:00:00 ./pdns_exporter.x86_64 -collector.powerdns.socket recursor:unixgram:/var/run/pdns_recursor.controlsocket -web.listen-address :9121
pdns_exporter stdout:
INFO[0000] PowerDNS Exporter: v0.0.3 source=pdns_exporter.go:502
ERRO[0001] timeout waiting for powerdns response source=pdns_exporter.go:436
INFO[0001] Registered new exporter for recursor at unixgram:/var/run/pdns_recursor.controlsocket source=pdns_exporter.go:521
INFO[0001] Starting pdns_exporter v0.0.3 at :9121 source=pdns_exporter.go:539
ERRO[0001] read: read unixgram /tmp/lsock220475158->/var/run/pdns_recursor.controlsocket: use of closed network connection source=pdns_exporter.go:393
syslog:
Mar 18 14:40:57 test-host pdns_recursor: Error dealing with control socket request: Unable to send message over control channel '/tmp/lsock220475158': No such file or directory
Just wanted to note that I'm having the same issue, with the same configs: socket is 777, users match between exporter and recursor
+1 - the same issue. PDNS version 4.1.3, Ubuntu 18.04.
Found some solution. Need:
recursor.conf
define socket-mode=0660
. Restart recursor./etc/powerdns
with pdns
owner and run exporter with parameters:
sudo -u pdns /usr/bin/prometheus-pdns-exporter -collector.powerdns.socket=recursor:unixgram:/var/run/pdns_recursor.controlsocket -collector.tempdir.prefix=/etc/powerdns/lsocks
Hi, i'm running your exporter successfully to monitor my authorative daemon, but i can't get it to work for the recursor. The command line i'm using is:
Which results in this error:
The control socket has already mode 777 (for testing), but it still doesn't work...