Re: zone transfer troubles

panman <[email protected]> Mon, 19 Jan 2009 09:13:25 -0800
Newsgroups gmane.network.dns.bind9.dlz
Message-ID <[email protected]>
Well I did follow the howto I want to see this work once before I switch 
to using a real database. There's a dlz example at the bottom of this page:
http://bind-dlz.sourceforge.net/mysql_example.html that is essentially 
an exact copy of what I posted as my dlz so the web pages may need some 
updating if this is the correct answer.

This query runs twice now, the first time it completes successfully the 
second I get the error. I have no idea what this error is telling me though.

select ttl, type, mx_priority, case when lower(type)='txt' then
concat('"', data, '"') when lower(type) = 'soa' then concat_ws(' ', data,
resp_person, serial, refresh, retry, expire, minimum) else data end from
dns_records where zone = 'nubjub.com' and host = '@'

'@'zone.c:2514: REQUIRE((((source) != ((void *)0)) &&
(((const isc__magic_t *)(source))->magic == ((('Z') << 24 | ('O') << 16 |
('N') << 8 | ('E')))))) failed
19-Jan-2009 16:37:22.899 exiting (due to assertion failure)

The query runs ok in mysql:
| ttl     | type     | mx_priority | concat_ws(' ', data, resp_person,
serial, refresh, retry, expire, minimum) else data
+------+-------+-------------+----------------------------------------
----+
| 3600 | SOA      | NULL         | ns1.purelithium.net. resp.person.email.
 2008082700 3600 3600 86400 3600                                     
    |
| 3600 | CNAME | NULL        | www.nubjub.com.                       
    |
| 3600 | MX        | 10              | 
nubjub.com.                           
    |

Todd Lyons wrote:
> On Sun, Jan 18, 2009 at 2:18 PM, nubjub <[email protected]> wrote:
>   
>> So this is the dlz config for my test setup, if there's anything else I can
>> provide please let me know. I'm completely stumped on the transfer troubles.
>>
>> dlz "Mysql zone" {
>>   database "mysql
>>   {host=127.0.0.1 dbname=dns port=3306 user=bind pass=password}
>>   {select zone from dns_records where zone = '%zone%'}
>>   {select ttl, type, mx_priority, case when lower(type)='txt' then
>>                concat('\"', data, '\"') when lower(type) = 'soa' then
>>                concat_ws(' ', data, resp_person, serial, refresh, retry, expire,
>>                minimum) else data end from dns_records where zone = '%zone%' and
>>                host = '%record%'}
>>   {}
>>   {select ttl, type, host, mx_priority, data, resp_person, serial, refresh,
>>                retry, expire, minimum from dns_records where zone = '%zone%'}
>>     
>
> Since you seem to have followed the HOWTO exactly, the above query
> looks to be your problem.  It's located at
> http://bind-dlz.sourceforge.net/mysql_driver.html.  Here is what the
> HOWTO has for this query:
>
> {select ttl, type, host, mx_priority, data, resp_person, serial,
> refresh, retry, expire, minimum from dns_records where zone = '%zone%'
> and not (type = 'SOA' or type = 'NS')}
>
> Note the exclusion of SOA and NS type records, which yours is not skipping.
>
>   
>>   {select zone from xfr_table where zone = '%zone%' and client = '%client%'}";
>> };
>>     
>
> I don't do XFERs with dlz, but just looking at config requirements,
> I'd guess that's what you are going to find as the problem.
>   

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword