pdns-server 4.0.0 alpha2 mysql query errors

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

pdns-server 4.0.0 alpha2 mysql query errors

Brian Candler
We have just installed a pair of servers with Ubuntu 16.04, with the
pdns packages from the default Ubuntu repositories, which contain 4.0.0
alpha 2 [^1]

Unfortunately I am hitting a problem which was already reported back in
March:

May 17 08:33:50 ns1 pdns[1420]: 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

The original report was here:

https://mailman.powerdns.com/pipermail/pdns-users/2016-March/024085.html

However it doesn't show any resolution to the problem, other than to
restart the servers. This does fix the problem, but for how long?

These servers had been up for 23 hours before I started testing them
with dig, and those tests consistently gave SERVFAIL. But logs show the
first mysql error first occured just under 6 hours after the server started:

May 16 09:26:26 ns1 systemd[1]: Started PowerDNS Authoritative Server.
May 16 09:26:26 ns1 pdns[1420]: PowerDNS Authoritative Server
4.0.0-alpha2 (C) 2001-2016 PowerDNS.COM BV
May 16 09:26:26 ns1 pdns[1420]: 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.
...
May 16 15:24:08 ns1 pdns[1420]: 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

Notice that was a different error ("Lost connection to MySQL server
during query" rather than "Attempt to bind more parameters than query has")

This rings a bell. Mysql times out idle connections:
http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_wait_timeout
However this is after 8 hours, not 6 hours, so this is almost certainly
a red herring.

mysql> select @@wait_timeout;
+----------------+
| @@wait_timeout |
+----------------+
|          28800 |
+----------------+
1 row in set (0.00 sec)

Unfortunately we have only limited time to help debug this, as the name
service needs to be up and running ASAP. I'll probably have to replace
with the 3.4.8 packages from https://www.powerdns.com/downloads.html

Regards,

Brian Candler.

[^1] Why does a long term support OS have an alpha version of pdns?
Presumably they expect 4.0.0 to become stable very soon.

_______________________________________________
Pdns-users mailing list
[hidden email]
https://mailman.powerdns.com/mailman/listinfo/pdns-users
Reply | Threaded
Open this post in threaded view
|

Re: pdns-server 4.0.0 alpha2 mysql query errors

Brian Candler
On 17/05/2016 10:10, Brian Candler wrote:
> Unfortunately we have only limited time to help debug this, as the
> name service needs to be up and running ASAP. I'll probably have to
> replace with the 3.4.8 packages from
> https://www.powerdns.com/downloads.html

Questions:

1. Does the monolithic package pdns-static_3.4.8-1_amd64.deb include
mysql support?

2. Has there been any mysql schema change between 3.4.8 and 4.0.0? That
is, can I just point 3.4.8 at the schema which I already installed?

I checked the release notes at
https://doc.powerdns.com/md/changelog/#powerdns-authoritative-server-400 
and it didn't say whether or not the schema had changed.

poweradmin seems happy with this database though.

Regards,

Brian.

_______________________________________________
Pdns-users mailing list
[hidden email]
https://mailman.powerdns.com/mailman/listinfo/pdns-users
Reply | Threaded
Open this post in threaded view
|

Re: pdns-server 4.0.0 alpha2 mysql query errors

Pieter Lexis-2
Hi Brian,

On Tue, 17 May 2016 10:28:12 +0100
Brian Candler <[hidden email]> wrote:

> On 17/05/2016 10:10, Brian Candler wrote:
> > Unfortunately we have only limited time to help debug this, as the
> > name service needs to be up and running ASAP. I'll probably have to
> > replace with the 3.4.8 packages from
> > https://www.powerdns.com/downloads.html 
>
> Questions:
>
> 1. Does the monolithic package pdns-static_3.4.8-1_amd64.deb include
> mysql support?

Yes.

> 2. Has there been any mysql schema change between 3.4.8 and 4.0.0? That
> is, can I just point 3.4.8 at the schema which I already installed?

Yes, 4.0.0 will use prepared statements instead of string expansion for queries. Your specific issue is fixed in the alpha3 release[1] of last week. Packages are available from our repo[2].

Best regards,

Pieter Lexis

1 - https://doc.powerdns.com/md/changelog/#powerdns-authoritative-server-400-alpha3
2 - https://repo.powerdns.com/

--
Pieter Lexis
PowerDNS.COM BV -- https://www.powerdns.com
_______________________________________________
Pdns-users mailing list
[hidden email]
https://mailman.powerdns.com/mailman/listinfo/pdns-users
Reply | Threaded
Open this post in threaded view
|

Re: pdns-server 4.0.0 alpha2 mysql query errors

Brian Candler
On 17/05/2016 10:41, Pieter Lexis wrote:
Yes.

> 2. Has there been any mysql schema change between 3.4.8 and 4.0.0? That 
> is, can I just point 3.4.8 at the schema which I already installed?
Yes

That's excellent news, and thank you for the prompt response!

Your specific issue is fixed in the alpha3 release[1] of last week.
1 - https://doc.powerdns.com/md/changelog/#powerdns-authoritative-server-400-alpha3
I don't see a mention of this issue in the changelog?

We'll go with 3.4.8 for now, rather than 4.0.0a3, for a less exciting life.

Regards,

Brian.

_______________________________________________
Pdns-users mailing list
[hidden email]
https://mailman.powerdns.com/mailman/listinfo/pdns-users
Reply | Threaded
Open this post in threaded view
|

Re: pdns-server 4.0.0 alpha2 mysql query errors

Brian Candler
In reply to this post by Pieter Lexis-2
On 17/05/2016 10:41, Pieter Lexis wrote:
> 2. Has there been any mysql schema change between 3.4.8 and 4.0.0? That 
> is, can I just point 3.4.8 at the schema which I already installed?
Yes, 4.0.0 will use prepared statements instead of string expansion for queries. Your specific issue is fixed in the alpha3 release[1] of last week. Packages are available from our repo[2].

We are now up and running on 3.4.9, thank you.

Supplementary question: could I take pdnsutil out of 4.0.0 and run it with 3.4.9 ? Does it only talk to the database and do nothing else?

Thanks,

Brian.

_______________________________________________
Pdns-users mailing list
[hidden email]
https://mailman.powerdns.com/mailman/listinfo/pdns-users
Reply | Threaded
Open this post in threaded view
|

Re: pdns-server 4.0.0 alpha2 mysql query errors

Pieter Lexis-2
Hi Brian,

On Wed, 18 May 2016 10:53:27 +0100
Brian Candler <[hidden email]> wrote:

> Supplementary question: could I take pdnsutil out of 4.0.0 and run it
> with 3.4.9 ? Does it only talk to the database and do nothing else?

Yes you could, pdnsutil just talks to the database. What features from pdnsutil do you need that are not in the 3.4.9's pdnssec? If you create a ticket on github[1] about these, we might backport these functions.

Best regards,

Pieter

1 - https://github.com/PowerDNS/pdns/issues

--
Pieter Lexis
PowerDNS.COM BV -- https://www.powerdns.com
_______________________________________________
Pdns-users mailing list
[hidden email]
https://mailman.powerdns.com/mailman/listinfo/pdns-users
Reply | Threaded
Open this post in threaded view
|

Re: pdns-server 4.0.0 alpha2 mysql query errors

Brian Candler
On 18/05/2016 11:20, Pieter Lexis wrote:
> Yes you could, pdnsutil just talks to the database. What features from pdnsutil do you need that are not in the 3.4.9's pdnssec? If you create a ticket on github[1] about these, we might backport these functions.

I just like the CLI for creating zones and records. Much simpler than
having to build INSERT... statements.


_______________________________________________
Pdns-users mailing list
[hidden email]
https://mailman.powerdns.com/mailman/listinfo/pdns-users