[Bind-dlz-testers] Error: dns_rdata_fromtext: buffer-0x413fe440:1: near 'www': bad dotted quad
Brought to you by:
crodster
|
From: Todd L. <tl...@iv...> - 2008-02-14 17:12:36
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Problem Summary: I'm getting this error when I do a host lookup: dns_rdata_fromtext: buffer-0x413fe440:1: near 'www': bad dotted quad 1. Googling shows that it's receiving text where it expected a dotted quad answer. 2. I don't see _where_ it is expecting the data to be unless I have my host and data fields reversed... 3. Or the it's complaining that it isn't returning any NS fields. Setting the host to @ allows it to find them, but then it complains about them too with: dns_rdata_fromtext: buffer-0x413fe090:1: near 'ns1.ivenue.com.': extra input text Detail: I have this dns server configured not to be recursive, and have commented out the hints, so it can only do local lookups. Here is my test data for my zone 'mrball.net', along with the full query to get all of it (line wrapping turned off for pastes) : mysql> SELECT '86400' AS ttl,domain_record_type.type,domain_record.name AS host, -> case when lower(domain_record_type.type) = 'mx' then domain_record.value end AS mx_priority, -> case when lower(domain_record_type.type) != 'mx' then domain_record.value end AS data, -> 'ns1.ivenue.com' AS primary_ns, 'hostmaster.ivenue.com' AS resp_person, -> 2008021400 AS serial, 36000 AS refresh, 1800 AS retry, 3600000 AS expire, 86400 AS minimum -> FROM domain_record,domain,domain_record_type -> WHERE domain.name='mrball.net' AND domain_record_type.id=domain_record.type_id; +-------+--------+------+-------------+-----------------+----------------+-----------------------+------------+---------+-------+---------+---------+ | ttl | type | host | mx_priority | data | primary_ns | resp_person | serial | refresh | retry | expire | minimum | +-------+--------+------+-------------+-----------------+----------------+-----------------------+------------+---------+-------+---------+---------+ | 86400 | A | www | NULL | 22.22.22.22 | ns1.ivenue.com | hostmaster.ivenue.com | 2008021400 | 36000 | 1800 | 3600000 | 86400 | | 86400 | A | mail | NULL | 22.22.22.22 | ns1.ivenue.com | hostmaster.ivenue.com | 2008021400 | 36000 | 1800 | 3600000 | 86400 | | 86400 | NS | @ | NULL | ns1.ivenue.com. | ns1.ivenue.com | hostmaster.ivenue.com | 2008021400 | 36000 | 1800 | 3600000 | 86400 | | 86400 | NS | @ | NULL | ns2.ivenue.com. | ns1.ivenue.com | hostmaster.ivenue.com | 2008021400 | 36000 | 1800 | 3600000 | 86400 | | 86400 | MX | mail | 10 | NULL | ns1.ivenue.com | hostmaster.ivenue.com | 2008021400 | 36000 | 1800 | 3600000 | 86400 | | 86400 | CNAME | tp | NULL | www | ns1.ivenue.com | hostmaster.ivenue.com | 2008021400 | 36000 | 1800 | 3600000 | 86400 | +-------+--------+------+-------------+-----------------+----------------+-----------------------+------------+---------+-------+---------+---------+ 6 rows in set (0.00 sec) I don't have any SOA records because it returns the SOA info for every lookup (argv[4]). Unless I'm misreading, I avoid needing the SOA specific lines because I return that SOA info on every lookup with the big benefit being that it saves me an additional lookup against the database. When I do a 'host www.mrball.net', I see the dns_rdata_fromtext error in the logs. The initial queries my database receives are: 080214 8:11:49 14 Query SELECT name AS zone FROM domain WHERE name = 'www.mrball.net' 14 Query SELECT name AS zone FROM domain WHERE name = 'mrball.net' At this point, it knows it is authoritative for the zone. Then it does the 4 long queries as per the dlz config (below), using: domain_record.name="BLAH"' looking for 'www', '*', '@', then '*', in that order. The errors that occur as a result of the lookups with the data above are: Feb 14 09:01:25 ivdns52 named[13993]: dns_rdata_fromtext: buffer-0x413fe440:1: near 'www': bad dotted quad Feb 14 09:01:25 ivdns52 named[13993]: dns_sdlz_putrr returned error. Error code was: bad dotted quad Feb 14 09:01:25 ivdns52 named[13993]: dns_rdata_fromtext: buffer-0x413fe090:1: near 'ns1.ivenue.com.': extra input text Feb 14 09:01:25 ivdns52 named[13993]: dns_sdlz_putrr returned error. Error code was: extra input text My dlz config is the same as yesterday's mail post, but I'll post it here again: dlz "Mysql zone" { database "mysql {host=127.0.0.1 user=root dbname=ivenue ssl=false} {SELECT name AS zone FROM domain WHERE name = '%zone%'} {SELECT '86400' AS ttl,domain_record_type.type,domain_record.name AS host, case when lower(domain_record_type.type) = 'mx' then domain_record.value end AS mx_priority, case when lower(domain_record_type.type) != 'mx' then domain_record.value end AS data, 'ns1.ivenue.com' AS primary_ns, 'hostmaster.ivenue.com' AS resp_person, 2008021400 AS serial, 36000 AS refresh, 1800 AS retry, 3600000 AS expire, 86400 AS minimum FROM domain_record,domain,domain_record_type WHERE domain.name='%zone%' AND domain_record_type.id=domain_record.type_id AND domain_record.name='%record%'}"; }; (Extra note: My searches do use indexes completely as evidenced by 'explain' on the query.) Does anyone see anything wrong with the data? With the queries? With anything? I can post the table schemas if anybody thinks it is worth seeing that. It's very close to working, there is just some mundane detail that is causing me problems that I've not yet been able to locate. TIA! - -- Regards... Todd Exponential problems need logarithmic solutions. --Eddy Dreger Linux kernel 2.6.22-14-generic 7 users, load average: 0.00, 0.03, 0.00 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHtHaFY2VBGxIDMLwRAuo+AJ4nA6HjLj63D3w/GHhXcy+EWo7umwCfcmqb c7y0JTJrb23Aue4US2QPOoQ= =uVf7 -----END PGP SIGNATURE----- |