[Pdns-users] pdns_recursor & Upstart
Daniel L. Miller
dmiller at amfes.com
Wed Dec 12 04:41:12 UTC 2012
I've made a pair of simple Upstart scripts for controlling pdns &
pdns-recursor. For pdns -
/etc/init/pdns.conf
start on started mysql
respawn
respawn limit 10 5
exec /usr/sbin/pdns_server --daemon=no --guardian=no
This works without issues. Since mysql activates extremely early in the
boot process this makes DNS available immediately. Then I also have the
recursor -
/etc/init/pdns-recursor.conf
start on started pdns
respawn
respawn limit 10 5
exec /usr/sbin/pdns_recursor
While occasionally this works on boot - I've found a problem more
usually occurs. My dmesg output:
[ 57.783902] init: pdns-recursor main process (1555) terminated with
status 1
[ 57.783925] init: pdns-recursor main process ended, respawning
[ 57.787758] init: pdns-recursor main process (1577) terminated with
status 1
[ 57.787782] init: pdns-recursor main process ended, respawning
[ 57.791525] init: pdns-recursor main process (1580) terminated with
status 1
[ 57.791548] init: pdns-recursor main process ended, respawning
[ 57.795029] init: pdns-recursor main process (1584) terminated with
status 1
[ 57.795052] init: pdns-recursor main process ended, respawning
[ 57.798537] init: pdns-recursor main process (1585) terminated with
status 1
[ 57.798561] init: pdns-recursor main process ended, respawning
[ 57.802003] init: pdns-recursor main process (1586) terminated with
status 1
[ 57.802026] init: pdns-recursor main process ended, respawning
[ 57.805420] init: pdns-recursor main process (1587) terminated with
status 1
[ 57.805441] init: pdns-recursor main process ended, respawning
[ 57.808947] init: pdns-recursor main process (1588) terminated with
status 1
[ 57.808970] init: pdns-recursor main process ended, respawning
[ 57.812523] init: pdns-recursor main process (1589) terminated with
status 1
[ 57.812545] init: pdns-recursor main process ended, respawning
[ 57.816099] init: pdns-recursor main process (1590) terminated with
status 1
[ 57.816120] init: pdns-recursor main process ended, respawning
[ 57.819635] init: pdns-recursor main process (1591) terminated with
status 1
[ 57.819657] init: pdns-recursor respawning too fast, stopped
I don't see why this is happening. A manual "start pdns-recursor" works
just fine - so the problem isn't the execution from Upstart, but there
must be some timing/event issue I'm not seeing. Any ideas?
--
Daniel
More information about the Pdns-users
mailing list