Problems with powerdns

This entry was posted by on Sunday, 7 June, 2009 at

We’ve been having some real problems recently with powerdns with
gmysql backend seeming to just suddenly die at random times. The
version we’re using is the current debian lenny version 2.9.21.2. The
only errors in the logs have been things like the below which then
results in the server just dying until restart.

Parsing record content: Data field in DNS should start with quote" on
TXT/SPF records

 I have tried various things but I think that the following conf file
has made it work and not die.

 
# Autogenerated configuration file template
#################################
# allow-axfr-ips If enabled, restrict zonetransfers to originate from these
# IP addresses
#
# allow-axfr-ips=
 
#################################
# allow-recursion List of netmasks that are allowed to recurse
#
allow-recursion=127.0.0.1
 
#################################
# allow-recursion-override Local data even about hosts that don't exist will
# override the internet. (on/off)
#
# allow-recursion-override=
 
#################################
# cache-ttl Seconds to store packets in the PacketCache
#
 cache-ttl=20
 
#################################
# chroot If set, chroot to this directory for more security
#
# chroot=/var/spool/powerdns
 
#################################
# config-dir Location of configuration directory (pdns.conf)
#
config-dir=/etc/powerdns
 
#################################
# config-name Name of this virtual configuration - will rename the binary image
#
# config-name=
 
#################################
# control-console Debugging switch - don't use
#
# control-console=no
 
#################################
# daemon Operate as a daemon
#
daemon=yes
 
#################################
# default-soa-name name to insert in the SOA record if none set in the backend
#
# default-soa-name=a.misconfigured.powerdns.server
 
#################################
# disable-axfr Disable zonetransfers but do allow TCP queries
#
disable-axfr=yes
 
#################################
# disable-tcp Do not listen to TCP queries
#
# disable-tcp=no
 
#################################
# distributor-threads Default number of Distributor (backend) threads to start
#
 distributor-threads=10
 
#################################
# fancy-records Process URL and MBOXFW records
#
 fancy-records=no
 
#################################
# guardian Run within a guardian process
#
guardian=yes
 
#################################
# launch Which backends to launch and order to query them in
#
# launch=
launch=gmysql
 
 
#################################
# lazy-recursion Only recurse if question cannot be answered locally
#
lazy-recursion=yes
 
#################################
# load-modules Load this module - supply absolute or relative path
#
# load-modules=
 
#################################
# local-address Local IP address to which we bind
#
local-address=YOURIPADDRESS
 
#################################
# local-ipv6 Local IP address to which we bind
#
# local-ipv6=
 
#################################
# local-port The port on which we listen
#
local-port=53
 
#################################
# log-dns-details If PDNS should log failed update requests
#
 log-dns-details=yes
 
#################################
# log-failed-updates If PDNS should log failed update requests
#
 log-failed-updates=yes
 
#################################
# logfile Logfile to use
#
 logfile=/var/log/pdns.log
 
#################################
# logging-facility Log under a specific facility
#
 logging-facility=0
 
#################################
# loglevel Amount of logging. Higher is more. Do not set below 3
#
 loglevel=6
 
#################################
# master Act as a master
#
# master=no
 
#################################
# max-queue-length Maximum queuelength before considering situation lost
#
# max-queue-length=5000
 
#################################
# max-tcp-connections Maximum number of TCP connections
#
# max-tcp-connections=10
 
#################################
# module-dir Default directory for modules
#
module-dir=/usr/lib/powerdns
 
#################################
# negquery-cache-ttl Seconds to store packets in the PacketCache
#
# negquery-cache-ttl=60
 
#################################
# out-of-zone-additional-processing Do out of zone additional processing
#
# out-of-zone-additional-processing=no
 
#################################
# query-cache-ttl Seconds to store packets in the PacketCache
#
# query-cache-ttl=20
 
#################################
# query-logging Hint backends that queries should be logged
#
# query-logging=no
 
#################################
# queue-limit Maximum number of milliseconds to queue a query
#
# queue-limit=1500
 
#################################
# query-local-address The IP address to use as a source address for sending
# queries.
# query-local-address=
 
#################################
# receiver-threads Number of receiver threads to launch
#
# receiver-threads=1
 
#################################
# recursive-cache-ttl Seconds to store packets in the PacketCache
#
# recursive-cache-ttl=10
 
#################################
# recursor If recursion is desired, IP address of a recursing nameserver
#
# recursor=
 
#################################
# setgid If set, change group id to this gid for more security
#
setgid=pdns
 
#################################
# setuid If set, change user id to this uid for more security
#
setuid=pdns
 
#################################
# skip-cname Do not perform CNAME indirection for each query
#
# skip-cname=no
 
#################################
# slave Act as a slave
#
# slave=no
 
#################################
# slave-cycle-interval Reschedule failed SOA serial checks once every .. seconds
#
# slave-cycle-interval=60
 
#################################
# smtpredirector Our smtpredir MX host
#
# smtpredirector=a.misconfigured.powerdns.smtp.server
 
#################################
# soa-minimum-ttl Default SOA mininum ttl
#
# soa-minimum-ttl=3600
 
#################################
# soa-refresh-default Default SOA refresh
#
# soa-refresh-default=10800
 
#################################
# soa-retry-default Default SOA retry
#
# soa-retry-default=3600
 
#################################
# soa-expire-default Default SOA expire
#
# soa-expire-default=604800
 
#################################
# soa-serial-offset Make sure that no SOA serial is less than this number
#
# soa-serial-offset=0
 
#################################
# socket-dir Where the controlsocket will live
#
socket-dir=/var/run
 
#################################
# strict-rfc-axfrs Perform strictly rfc compliant axfrs (very slow)
#
# strict-rfc-axfrs=no
 
#################################
# urlredirector Where we send hosts to that need to be url redirected
#
# urlredirector=127.0.0.1
 
#################################
# use-logfile Use a log file
#
 use-logfile=yes
 
#################################
# webserver Start a webserver for monitoring
#
 webserver=no
 
#################################
# webserver-address IP Address of webserver to listen on
#
# webserver-address=127.0.0.1
 
#################################
# webserver-password Password required for accessing the webserver
#
# webserver-password=
 
#################################
# webserver-port Port of webserver to listen on
#
# webserver-port=8081
 
#################################
# webserver-print-arguments If the webserver should print arguments
#
# webserver-print-arguments=no
 
#################################
# wildcard-url Process URL and MBOXFW records
#
# wildcard-url=no
 
#################################
# wildcards Honor wildcards in the database
#
# wildcards=
 
#################################
# version-string What should PowerDNS return for version
# allowed methods are anonymouse / powerdns / full / custom
version-string=powerdns
 
include=/etc/powerdns/pdns.d

 I think the critical thing is the number of distributor threads(but
not 100% sure tbh). The other error I have seen is that the
pdns_control is unable to connect to the instance which is running and
you receive the following error:

 
servername:/home/blah#pdns_control version
servername:/home/blah#pdns_control Unable to connect to remote
'/var/run/pdns.controlsocket'

 To fix this – run the following:

 
servername:/home/blah#/etc/init.d/pdns stop
servername:/home/blah#mv /var/run/pdns.controlsocket
/var/run/pdns.controlsocket.old
servername:/home/blah#/etc/init.d/pdns start
servername:/home/blah#pdns_control version
2.9.21.2