Transfer to slave fails
"Stuart O'Reilly" <[email protected]>
| Newsgroups | gmane.network.dns.bind9.dlz |
|---|---|
| Message-ID | <[email protected]> |
Hi all, I have BIND-DLZ running quite nicely on my primary nameserver and am now trying to get transfer working to a non DLZ server. I know it's not recommended, but I don't own the server so until they implement BIND-DLZ, I'm left with flat files. Anyway, the transfers are failing. I have turned on debugging on the slave server and I am seeing this: 25-May-2008 22:51:24.450 zone tokenbay.com/IN: Transfer started. 25-May-2008 22:51:24.451 zone tokenbay.com/IN: no database exists yet, requesting AXFR of initial version from 217.155.123.103#53 25-May-2008 22:51:24.518 transfer of 'tokenbay.com/IN' from 217.155.123.103#53: connected using 82.69.229.91#49791 25-May-2008 22:51:24.518 transfer of 'tokenbay.com/IN' from 217.155.123.103#53: sent request length prefix 25-May-2008 22:51:24.518 transfer of 'tokenbay.com/IN' from 217.155.123.103#53: sent request data 25-May-2008 22:51:24.645 transfer of 'tokenbay.com/IN' from 217.155.123.103#53: received 226 bytes 25-May-2008 22:51:24.645 transfer of 'tokenbay.com/IN' from 217.155.123.103#53: got nonincremental response 25-May-2008 22:51:24.645 zone tokenbay.com/IN: has no NS records 25-May-2008 22:51:24.646 transfer of 'tokenbay.com/IN' from 217.155.123.103#53: failed while receiving responses: bad zone 25-May-2008 22:51:24.646 zone tokenbay.com/IN: zone transfer finished: bad zone 25-May-2008 22:51:24.646 transfer of 'tokenbay.com/IN' from 217.155.123.103#53: end of transfer What worries me is the line about no NS records. I have attached a .txt file with all my database information and the output to the SQL queries. >From looking at the debug messages, when the queries are run, they are not returning the NS records, however when I run them by hand, they do return NS records. Any help in solving the problem would be greatly appreciated. I've just spent the last couple of hours searching the archives without much luck. Regards, Stuart. No virus found in this outgoing message. Checked by AVG. Version: 8.0.100 / Virus Database: 269.24.1/1464 - Release Date: 24/05/2008 08:56 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Bind-dlz-testers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bind-dlz-testers
dlz-debug.txt
(text/plain, 11 KB)
## Transfers to slave nameserver failing
## Error: Slave server failing to transfer zone from BIND-DLZ master
mysql> select * from dns_records;
+----+--------------+-------+------+------+-------------+-----------------------------+----------------------------+------------+---------+-------+---------+---------+---------+---------------------+
| id | zone | ttl | host | type | mx_priority | data | contact | serial | refresh | retry | expire | minimum | dynamic | updated |
+----+--------------+-------+------+------+-------------+-----------------------------+----------------------------+------------+---------+-------+---------+---------+---------+---------------------+
| 11 | tokenbay.com | 21600 | @ | SOA | NULL | ns1.aurora-solutions.co.uk. | hostmaster.tokenbay.co.uk. | 2008052552 | 86400 | 7200 | 1209600 | 3600 | N | 2008-05-25 22:34:11 |
| 12 | tokenbay.com | 21600 | @ | NS | NULL | ns1.aurora-solutions.co.uk. | NULL | NULL | NULL | NULL | NULL | NULL | N | 2008-05-25 22:35:29 |
| 13 | tokenbay.com | 21600 | @ | NS | NULL | ns2.aurora-solutions.co.uk. | NULL | NULL | NULL | NULL | NULL | NULL | N | 2008-05-25 22:35:33 |
| 14 | tokenbay.com | 21600 | @ | MX | 10 | fogo.tokenbay.co.uk. | NULL | NULL | NULL | NULL | NULL | NULL | N | 2008-05-25 22:36:40 |
| 15 | tokenbay.com | 21600 | @ | MX | 20 | rhea.tokenbay.co.uk. | NULL | NULL | NULL | NULL | NULL | NULL | N | 2008-05-25 22:36:49 |
| 16 | tokenbay.com | 21600 | @ | A | NULL | 217.155.123.97 | NULL | NULL | NULL | NULL | NULL | NULL | N | 2008-05-25 22:37:16 |
| 17 | tokenbay.com | 21600 | www | A | NULL | 217.155.123.97 | NULL | NULL | NULL | NULL | NULL | NULL | N | 2008-05-25 22:37:21 |
+----+--------------+-------+------+------+-------------+-----------------------------+----------------------------+------------+---------+-------+---------+---------+---------+---------------------+
7 rows in set (0.00 sec)
mysql> select * from dns_xfers;
+--------------+--------------+
| zone | client |
+--------------+--------------+
| tokenbay.com | 82.69.229.93 |
| tokenbay.com | 82.69.229.91 |
+--------------+--------------+
2 rows in set (0.00 sec)
dlz "Mysql zone" {
database "mysql
{host=localhost dbname=dns user=xyz pass=xyz}
{select zone from dns_records where zone = '%zone%'}
{select ttl, type, mx_priority, case when lower(type)='txt' then concat('\"', data, '\"') else data end from dns_records where zone = '%zone%' and host = '%record%' and not (type = 'SOA' or type = 'NS')}
{select ttl, type, mx_priority, data, contact, serial, refresh, retry, expire, minimum from dns_records where zone = '%zone%' and (type = 'SOA' or type='NS')}
{select ttl, type, host, mx_priority, data, contact, serial, refresh, retry, expire, minimum from dns_records where zone = '%zone%' and not (type = 'SOA' or type = 'NS')}
{select zone from dns_xfers where zone = '%zone%' and client = '%client%'}
{}";
};
mysql> select zone from dns_records where zone = 'tokenbay.com';
+--------------+
| zone |
+--------------+
| tokenbay.com |
| tokenbay.com |
| tokenbay.com |
| tokenbay.com |
| tokenbay.com |
| tokenbay.com |
| tokenbay.com |
+--------------+
7 rows in set (0.00 sec)
mysql> select ttl, type, mx_priority, case when lower(type)='txt' then concat('\"', data, '\"') else data end from dns_records where zone = 'tokenbay.com' and host = '@' and not (type = 'SOA' or type = 'NS');
+-------+------+-------------+-------------------------------------------------------------------------+
| ttl | type | mx_priority | case when lower(type)='txt' then concat('\"', data, '\"') else data end |
+-------+------+-------------+-------------------------------------------------------------------------+
| 21600 | MX | 10 | fogo.tokenbay.co.uk. |
| 21600 | MX | 20 | rhea.tokenbay.co.uk. |
| 21600 | A | NULL | 217.155.123.97 |
+-------+------+-------------+-------------------------------------------------------------------------+
3 rows in set (0.00 sec)
mysql> select ttl, type, mx_priority, data, contact, serial, refresh, retry, expire, minimum from dns_records where zone = 'tokenbay.com' and (type = 'SOA' or type='NS');
+-------+------+-------------+-----------------------------+----------------------------+------------+---------+-------+---------+---------+
| ttl | type | mx_priority | data | contact | serial | refresh | retry | expire | minimum |
+-------+------+-------------+-----------------------------+----------------------------+------------+---------+-------+---------+---------+
| 21600 | SOA | NULL | ns1.aurora-solutions.co.uk. | hostmaster.tokenbay.co.uk. | 2008052552 | 86400 | 7200 | 1209600 | 3600 |
| 21600 | NS | NULL | ns1.aurora-solutions.co.uk. | NULL | NULL | NULL | NULL | NULL | NULL |
| 21600 | NS | NULL | ns2.aurora-solutions.co.uk. | NULL | NULL | NULL | NULL | NULL | NULL |
+-------+------+-------------+-----------------------------+----------------------------+------------+---------+-------+---------+---------+
3 rows in set (0.00 sec)
mysql> select ttl, type, host, mx_priority, data, contact, serial, refresh, retry, expire, minimum from dns_records where zone = 'tokenbay.com' and not (type = 'SOA' or type = 'NS');
+-------+------+------+-------------+----------------------+---------+--------+---------+-------+--------+---------+
| ttl | type | host | mx_priority | data | contact | serial | refresh | retry | expire | minimum |
+-------+------+------+-------------+----------------------+---------+--------+---------+-------+--------+---------+
| 21600 | MX | @ | 10 | fogo.tokenbay.co.uk. | NULL | NULL | NULL | NULL | NULL | NULL |
| 21600 | MX | @ | 20 | rhea.tokenbay.co.uk. | NULL | NULL | NULL | NULL | NULL | NULL |
| 21600 | A | @ | NULL | 217.155.123.97 | NULL | NULL | NULL | NULL | NULL | NULL |
| 21600 | A | www | NULL | 217.155.123.97 | NULL | NULL | NULL | NULL | NULL | NULL |
+-------+------+------+-------------+----------------------+---------+--------+---------+-------+--------+---------+
4 rows in set (0.00 sec)
## The following is the error message produced during debugging on the primary (mysql) server when trying to transfer the zone:
25-May-2008 23:05:32.268 client 82.69.229.93#49796: AXFR request
25-May-2008 23:05:32.268
Query String: select zone from dns_records where zone = 'tokenbay.com'
25-May-2008 23:05:32.269
Query String: select zone from dns_xfers where zone = 'tokenbay.com' and client = '82.69.229.93'
25-May-2008 23:05:32.269 client 82.69.229.93#49796: transfer of 'tokenbay.com/IN': AXFR question section OK
25-May-2008 23:05:32.269 client 82.69.229.93#49796: transfer of 'tokenbay.com/IN': AXFR authority section OK
25-May-2008 23:05:32.269
Query String: select ttl, type, mx_priority, case when lower(type)='txt' then concat('"', data, '"') else data end from dns_records where zone = 'tokenbay.com' and host = '@' and not (type = 'SOA' or type = 'NS')
25-May-2008 23:05:32.270
Query String: select ttl, type, mx_priority, data, contact, serial, refresh, retry, expire, minimum from dns_records where zone = 'tokenbay.com' and (type = 'SOA' or type='NS')
25-May-2008 23:05:32.270
Query String: select ttl, type, host, mx_priority, data, contact, serial, refresh, retry, expire, minimum from dns_records where zone = 'tokenbay.com' and not (type = 'SOA' or type = 'NS')
25-May-2008 23:05:32.271
Query String: select ttl, type, mx_priority, case when lower(type)='txt' then concat('"', data, '"') else data end from dns_records where zone = 'tokenbay.com' and host = '@' and not (type = 'SOA' or type = 'NS')
25-May-2008 23:05:32.271
Query String: select ttl, type, mx_priority, data, contact, serial, refresh, retry, expire, minimum from dns_records where zone = 'tokenbay.com' and (type = 'SOA' or type='NS')
25-May-2008 23:05:32.272 client 82.69.229.93#49796: transfer of 'tokenbay.com/IN': AXFR started
25-May-2008 23:05:32.272 tokenbay.com. 21600 IN SOA ns1.aurora-solutions.co.uk. hostmaster.tokenbay.co.uk. 2008052552 86400 7200 1209600 3600
25-May-2008 23:05:32.272 tokenbay.com. 21600 IN MX 10 fogo.tokenbay.co.uk.
25-May-2008 23:05:32.272 tokenbay.com. 21600 IN MX 20 rhea.tokenbay.co.uk.
25-May-2008 23:05:32.272 tokenbay.com. 21600 IN A 217.155.123.97
25-May-2008 23:05:32.272 www.tokenbay.com. 21600 IN A 217.155.123.97
25-May-2008 23:05:32.273 tokenbay.com. 21600 IN SOA ns1.aurora-solutions.co.uk. hostmaster.tokenbay.co.uk. 2008052552 86400 7200 1209600 3600
25-May-2008 23:05:32.273 client 82.69.229.93#49796: transfer of 'tokenbay.com/IN': sending TCP message of 226 bytes
25-May-2008 23:05:32.273 client 82.69.229.93#49796: transfer of 'tokenbay.com/IN': AXFR ended
25-May-2008 23:05:32.273 client 82.69.229.93#49796: next
25-May-2008 23:05:32.273 client 82.69.229.93#49796: endrequest
25-May-2008 23:05:32.273 client 82.69.229.93#49796: read
25-May-2008 23:05:32.374 client 82.69.229.93#49796: next
25-May-2008 23:05:32.374 client 82.69.229.93#49796: request failed: end of file
## The following is the error message produced during debugging on the slave server when trying to retrieve the zone:
25-May-2008 23:05:45.598 zone tokenbay.com/IN: Transfer started.
25-May-2008 23:05:45.599 zone tokenbay.com/IN: no database exists yet, requesting AXFR of initial version from 217.155.123.103#53
25-May-2008 23:05:45.680 transfer of 'tokenbay.com/IN' from 217.155.123.103#53: connected using 82.69.229.91#49793
25-May-2008 23:05:45.681 transfer of 'tokenbay.com/IN' from 217.155.123.103#53: sent request length prefix
25-May-2008 23:05:45.681 transfer of 'tokenbay.com/IN' from 217.155.123.103#53: sent request data
25-May-2008 23:05:45.798 transfer of 'tokenbay.com/IN' from 217.155.123.103#53: received 226 bytes
25-May-2008 23:05:45.798 transfer of 'tokenbay.com/IN' from 217.155.123.103#53: got nonincremental response
25-May-2008 23:05:45.799 zone tokenbay.com/IN: has no NS records
25-May-2008 23:05:45.799 transfer of 'tokenbay.com/IN' from 217.155.123.103#53: failed while receiving responses: bad zone
25-May-2008 23:05:45.800 zone tokenbay.com/IN: zone transfer finished: bad zone
25-May-2008 23:05:45.800 transfer of 'tokenbay.com/IN' from 217.155.123.103#53: end of transfer