Ticket #218 (closed defect: fixed)
Default schema too short for valid DNS records, plus bad behavior when a record too long found
| Reported by: | anon | Owned by: | somebody |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | component1 | Version: | 2.0 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
We did some tests with a very long SOA record, and PowerDNS died and could not restart.
/var/log/messages showed:
Jan 16 16:30:18 cory pdns[3609]: Initiating transfer of 'name' from remote '207.219.45.37:51014' Jan 16 16:30:18 cory pdns[3609]: gpgsql Connection succesful Jan 16 16:30:18 cory pdns[3609]: AXFR started for 'name', transaction started Jan 16 16:30:18 cory pdns[3609]: Communicator thread died because of error: PostgreSQL failed to execute command: ERROR: value too long for type character varying(255) Jan 16 16:30:18 cory pdns[3609]: gpgsql Connection succesful Jan 16 16:30:19 cory pdns[3606]: Our pdns instance exited with code 0 Jan 16 16:30:19 cory pdns[3606]: Respawning
After respawning PowerDNS did not answer any queries at all. :(
The problem was a very long SOA record. The record in question was an SOA like this:
. abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijj.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijj.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijj.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefgh. 11 300 604500 604800 600
I changed the schema to have 1023 instead of 255 characters for the "content" column in the "records" table, restarted PowerDNS, and now everything is happy.
So, there are two problems:
- The default schema should be tweaked to allow larger records. I don't know what the DNS maximum record size is, but clearly 255 is not enough.
- PowerDNS needs to handle this failure better. Preferably not restarting, but if so at least doing so without error.
Shane Kerr
shane@…
Change History
Note: See
TracTickets for help on using
tickets.