Score:2

powerdns recursor logging not working

cn flag

i am trying to setup a powerdns recursor with query logging to specific log file with rsyslog. When I set it up and try to query some address and look in the query log file, every line is doubled, it also happens in the journal. I don't know what to do can somebody help me?

This is my configuration files summarized:

/etc/pdns-recursor/recursor.conf -

allow-from=192.168.4.0/24
forward-zones-recurse=.=8.8.8.8
local-address=192.168.4.102
log-timestamp=no
logging-facility=0
loglevel=5
quiet=no
security-poll-suffix=
setgid=pdns-recursor
setuid=pdns-recursor

/etc/rsyslog.conf -

/etc/rsyslog.conf section 2

in /usr/lib/systemd/system/pdns-recursor.service set execstart to:

ExecStart=/usr/sbin/pdns_recursor --daemon=no --write-pid=no --disable-syslog=no --log-timestamp=no
Score:1
my flag

You are logging everything twice because logging is configured twice.

In particular, the PowerDNS unit by default doesn't log to syslog:

Additionally, the Recursor can log to syslog on these systems. Logging to syslog is disabled in the unit file to prevent double logging

Source: https://doc.powerdns.com/recursor/running.html

whereas you set --disable-syslog=no, which means it's enabled.

Disable syslog at the unit level and restart the service.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.