[Pdns-users] powerdns authoritative 4.0.0 alpha stops working from time to time

Oliver Peter lists at peter.de.com
Fri Nov 11 09:43:07 UTC 2016


On Fri, Nov 11, 2016 at 09:33:30AM +0000, Alejandro Adroher Mellado wrote:
> Hi Oliver, 
> 
> You are right, I did not because as is happening also on version 4.0.0, It had nothing to do with the local configuration and yes with the application code. 
> 
> My database is really small. The server has almost no load.
> Authoritative has been Upgraded: pdns-server:amd64 (3.3-2ubuntu0.1, 4.0.1-1pdns.trusty)
> The database is a replica from a pdns-server 3.3-2ubuntu0.1 (My master server)
> Maybe my problem is the versioning between my pdns-server 4 having a DB Replica coming from 3.3-2 database.
> 
> I updated to 4 version this server because is a new one, it has been sent far from the main office and also because the last "PowerDNS Security Advisory 2016-01".
> 
> Here we have the most relevant configuration I have set.
> ## Ubuntu 14.04 - amd64
> dnsdist                                    1.1.0~beta1-1pdns.trusty
> pdns-backend-mysql        4.0.1-1pdns.trusty
> pdns-recursor                      3.7.3-1
> pdns-server                          4.0.1-1pdns.trusty
> 
> ## Pdns.conf
> chroot=./
>  config-dir=/etc/powerdns
> daemon=yes
>  guardian=yes
> include-dir=/etc/powerdns/pdns.d
> local-port=53
> loglevel=7
> module-dir=/usr/local/lib/pdns
> out-of-zone-additional-processing=no
> query-logging=yes
> socket-dir=/var/run
> 
> ## pdns.local.gmysql.conf
> gmysql-host=127.0.0.1
> gmysql-port=3306
> gmysql-dbname=pdns
> 
> 
> So, from my point of view must be the version on the replica master-->slave, but I'm not sure.

If I get this right you are replicating from a MySQL database which is
still the schema from 3.3 but your server is 4.0.1.  This might lead to
some problems, look at the changes here:
	https://doc.powerdns.com/3/authoritative/upgrading/

Since your database is on localhost you could also try connecting to the
unix socket instead of TCP on port 3306, e.g.:
	gmysql-socket=/var/lib/mysql/mysql.sock

(caution, might cause problems with your chroot option)


> Anyone has something to add?
> 
> Thanks a lot, 
> Alejandro.
> 
> 
> 
> -----Original Message-----
> From: Oliver Peter [mailto:lists at peter.de.com] 
> Sent: jueves, 10 de noviembre de 2016 15:37
> To: Alejandro Adroher Mellado <alejandro.adroher at omniaccess.com>
> Cc: pdns-users at mailman.powerdns.com
> Subject: Re: [Pdns-users] powerdns authoritative 4.0.0 alpha stops working from time to time
> 
> Hi Alejandro,
> 
> On Thu, Nov 10, 2016 at 10:48:18AM +0000, Alejandro Adroher Mellado wrote:
> > Morning!! 
> > 
> > I'm having the same issue with Authoritative 4.0.1-1pdns.trusty.
> > 
> > In my case, there is no a SERVFAIL response.
> > 
> > Backend reported permanent error which prevented lookup (GSQLBackend 
> > lookup query:Could not execute mysql statement: SELECT 
> > content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE 
> > disabled=0 and type=? and name=?: Lost connection to MySQL server 
> > during query), aborting
> > 
> > I'm also added to may config the loglevel=7 and the query-logging=yes so I will wait for the Warning message again.
> 
> The people here probably need some more information about your setup;  pdns.conf, my.cnf / Information about Operating system etc would be very helpful.
> Furthermore information about the workload would be nice, too (size of your database, queries per second, etc).
> Is it a fresh setup or did you upgrade from a previous powerdns / centos / mysql version?
> 
> 	
> Cheers
> Oliver
> 
> 
> > 
> > Kind Regards,
> > Ale.
> > 
> > 
> > -----Original Message-----
> > From: Pdns-users [mailto:pdns-users-bounces at mailman.powerdns.com] On 
> > Behalf Of Radoslaw Piliszek
> > Sent: lunes, 7 de marzo de 2016 13:49
> > To: pdns-users at mailman.powerdns.com
> > Subject: Re: [Pdns-users] powerdns authoritative 4.0.0 alpha stops 
> > working from time to time
> > 
> > Hello,
> > 
> > I am having the same problem using PowerDNS Authoritative Server
> > 4.0.0-alpha2 from CentOS 7 repository and the MySQL backend.
> > 
> > I enabled the highest level of logging (9).
> > 
> > And here are the results...
> > 
> > First failed queries (e.g. three times for three connections to the backend):
> > 
> > Remote 127.0.0.1 wants '...', do = 0, bufsize = 512: packetcache MISS
> > Query: SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=0 and type=? and name=?
> > Backend reported condition which prevented lookup (GSQLBackend lookup
> > query: Could not execute mysql statement: SELECT 
> > content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE
> > disabled=0 and type=? and name=?: Lost connection to MySQL server 
> > during query) sending out servfail
> > 
> > All following queries:
> > 
> > Remote 127.0.0.1 wants '...', do = 0, bufsize = 512: packetcache MISS 
> > Backend reported condition which prevented lookup (GSQLBackend lookup
> > query: Attempt to bind more parameters than query has: SELECT 
> > content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE
> > disabled=0 and type=? and name=?) sending out servfail
> > 
> > There are no other log messages in between these.
> > 
> > After the connection is lost, the "Attempt to bind more parameters than query has" (as already mentioned here) appears until the PowerDNS server is restarted...
> > 
> > Also, in my setup the connection is lost due to timeout because in this test environment queries appear very rarely. I think PowerDNS should handle timeouted sessions more gracefully like trying to restart the connection instead of failing the DNS request...
> > 
> > In summary, two problems:
> > 1) Connection to backend lost = queries stuck on error.
> > 2) Session timeouts are not handled gracefully.
> > 
> > C
> > Radosław Piliszek
> > 
> > > On 26 Feb 2016, at 15:18, Pieter Lexis <pieter.lexis at powerdns.com> wrote:
> > >
> > > Hi Peter,
> > >
> > > On Fri, 26 Feb 2016 14:49:16 +0200
> > > Keresztes Péter-Zoltán <zozo at z0z0.tk> wrote:
> > >
> > >> I have installed the new 4.0 version of the pdns. It works great however from time to time it suddenly stops working. In the logs I see lots of these:
> > >
> > > By "stops working", do you mean that the process dies or it just stops responding or it only sends out SERVFAILs?
> > >
> > >> Feb 26 07:42:34 dns1 pdns[6514]: Backend reported condition which 
> > >> prevented lookup (GSQLBackend lookup query: Attempt to bind more 
> > >> parameters than query has: SELECT 
> > >> content,ttl,prio,type,domain_id,disabled,name,auth FROM records 
> > >> WHERE
> > >> disabled=0 and type=? and name=?) sending out servfail
> > >
> > > This is the `basic-query`, interesting that it gives this error, as we never bind more than 2 elements in the code.
> > >
> > > If your server is not stressed for resources could you set `query-logging=yes` in the pdns.conf (with possibly `loglevel=7` as well if no queries show up in syslog) to identify the query that causes this and share the results with us?
> > >
> > > Secondly, could you share your pdns.conf (without passwords)?
> > >
> > > Best regards,
> > >
> > > Pieter
> > >
> > > --
> > > Pieter Lexis
> > > PowerDNS.COM BV -- https://www.powerdns.com 
> > > _______________________________________________
> > > Pdns-users mailing list
> > > Pdns-users at mailman.powerdns.com
> > > http://mailman.powerdns.com/mailman/listinfo/pdns-users
> > _______________________________________________
> > Pdns-users mailing list
> > Pdns-users at mailman.powerdns.com
> > http://mailman.powerdns.com/mailman/listinfo/pdns-users
> > _______________________________________________
> > Pdns-users mailing list
> > Pdns-users at mailman.powerdns.com
> > https://mailman.powerdns.com/mailman/listinfo/pdns-users
> 
> -- 
> Oliver PETER       oliver at gfuzz.de       0x456D688F

-- 
Oliver PETER       oliver at gfuzz.de       0x456D688F
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20161111/16d889a9/attachment-0001.sig>


More information about the Pdns-users mailing list