[Pdns-users] mysql backend and bind backend

Mark Watts m.watts at eris.qinetiq.com
Mon Mar 5 14:32:33 UTC 2007


> Hi,
>
> I'm running powerdns with the mysql backend.
>
> i'm verry happy with it, but i have one small problem. When i restart
> mysql the pdns server just stops working is there a fix to solve this?
>
> I was wondering is it useful to run pdns with the mysql-backend and with
> the bind-backend
> so that when the mysql-backend fails he runs with the bind backend and
> is it possible to do this?
>
> thanks.
>
>
> _______________________________________________
> Pdns-users mailing list
> Pdns-users at mailman.powerdns.com
> http://mailman.powerdns.com/mailman/listinfo/pdns-users

You probably want to be running it with "Guardian": 
/usr/sbin/pdns_server --daemon --guardian=yes

This is what I see in /var/log/messages when I restart MySQL:


Mar  5 14:27:54 ns2 pdns[19810]: Backend error: Failed to execute mysql_query, perhaps connection died? Err=1: Lost connection to MySQL server during query
Mar  5 14:27:54 ns2 pdns[19810]: Backend error: Failed to execute mysql_query, perhaps connection died? Err=1: Lost connection to MySQL server during query
Mar  5 14:27:55 ns2 pdns[19810]: Communicator thread died because of error: GSQLBackend unable to retrieve list of slave domains: Failed to execute mysql_query, perhaps connection died? Err=1: Lost connection to MySQL server during query
Mar  5 14:27:56 ns2 pdns[19810]: gmysql Connection failed: Unable to connect to database: Can't connect to MySQL server on '127.0.0.1' (111)
Mar  5 14:27:56 ns2 pdns[19810]: Backend error: Failed to execute mysql_query, perhaps connection died? Err=1: Lost connection to MySQL server during query
Mar  5 14:27:56 ns2 pdns[19810]: Caught an exception instantiating a backend, cleaning up
Mar  5 14:27:56 ns2 pdns[19810]: Backend error: Failed to execute mysql_query, perhaps connection died? Err=1: Lost connection to MySQL server during query
Mar  5 14:27:56 ns2 mysqld: Stopping :  succeeded
Mar  5 14:27:57 ns2 pdns[19808]: Our pdns instance exited with code 0
Mar  5 14:27:57 ns2 pdns[19808]: Respawning
Mar  5 14:27:57 ns2 mysqld: Starting MySQL:  succeeded
Mar  5 14:27:58 ns2 pdns[10642]: Guardian is launching an instance
Mar  5 14:27:58 ns2 pdns[10642]: This is module gmysqlbackend.so reporting
Mar  5 14:27:58 ns2 pdns[10642]: This is a guarded instance of pdns
Mar  5 14:27:58 ns2 pdns[10642]: It is advised to bind to explicit addresses with the --local-address option
Mar  5 14:27:58 ns2 pdns[10642]: UDP server bound to 0.0.0.0:53
Mar  5 14:27:58 ns2 pdns[10642]: TCP server bound to 0.0.0.0:53
Mar  5 14:27:58 ns2 pdns[10642]: PowerDNS 2.9.20 (C) 2001-2006 PowerDNS.COM BV (Jul 26 2006, 12:13:27, gcc 4.0.1 (4.0.1-5mdk for Mandriva Linux release 2006.0)) starting up
Mar  5 14:27:58 ns2 pdns[10642]: PowerDNS comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it according to the terms of the GPL version 2.
Mar  5 14:27:58 ns2 pdns[10642]: Set effective group id to 72
Mar  5 14:27:58 ns2 pdns[10642]: Set effective user id to 72
Mar  5 14:27:58 ns2 pdns[10642]: DNS Proxy launched, local port 47968, remote 127.0.0.1:5300
Mar  5 14:27:58 ns2 pdns[10642]: Creating backend connection for TCP
Mar  5 14:27:58 ns2 pdns[10642]: Master/slave communicator launching
Mar  5 14:27:58 ns2 pdns[10642]: gmysql Connection succesful
Mar  5 14:27:58 ns2 pdns[10642]: gmysql Connection succesful
Mar  5 14:27:58 ns2 pdns[10642]: About to create 3 backend threads for UDP
Mar  5 14:27:58 ns2 pdns[10642]: gmysql Connection succesful
Mar  5 14:27:58 ns2 pdns[10642]: All slave domains are fresh
Mar  5 14:27:58 ns2 pdns[10642]: gmysql Connection succesful
Mar  5 14:27:58 ns2 pdns[10642]: gmysql Connection succesful


-- 
Mark Watts BSc RHCE MBCS
Senior Systems Engineer
QinetiQ Trusted Information Management
Trusted Solutions and Services Group
GPG Public Key ID: 455420ED

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20070305/f73253c2/attachment-0001.sig>


More information about the Pdns-users mailing list