参见日志:
pdns (master) server /var/log/messages 错误信息提示:
Jan 30 10:08:08 kylezhuang-hh-qa-dns-crguy pdns[6363]: AXFR of domain '199.10.in-addr.arpa' initiated by 10.199.132.168
Jan 30 10:08:08 kylezhuang-hh-qa-dns-crguy pdns[6363]: AXFR of domain '199.10.in-addr.arpa' allowed: client IP 10.199.132.168 is in allow-axfr-ips
Jan 30 10:08:08 kylezhuang-hh-qa-dns-crguy pdns[6363]: Exception: All data was not consumed
Jan 30 10:08:08 kylezhuang-hh-qa-dns-crguy pdns[6363]: TCP Connection Thread died because of STL error: All data was not consumed
Jan 30 10:08:28 kylezhuang-hh-qa-dns-crguy pdns[6363]: AXFR of domain '199.10.in-addr.arpa' initiated by 10.199.132.168
.....
Jan 30 09:59:06 kylezhuang-hh-qa-dns-crguy pdns[23658]: AXFR of domain '199.10.in-addr.arpa' allowed: client IP 10.199.132.168 is in allow-axfr-ips
Jan 30 09:59:06 kylezhuang-hh-qa-dns-crguy pdns[23658]: Exception: All data was not consumed
Jan 30 09:59:06 kylezhuang-hh-qa-dns-crguy pdns[23658]: TCP Connection Thread died because of STL error: All data was not consumed
bind (slave) server /var/log/messages 错误信息提示:
Jan 30 03:45:48 hh-yun-puppet-129021 named[100639]: transfer of '199.10.in-addr.arpa/IN' from 10.199.132.152#53: connected using 10.199.129.21#60474
Jan 30 03:45:48 hh-yun-puppet-129021 named[100639]: transfer of '199.10.in-addr.arpa/IN' from 10.199.132.152#53: failed while receiving responses: end of file
Jan 30 03:45:48 hh-yun-puppet-129021 named[100639]: transfer of '199.10.in-addr.arpa/IN' from 10.199.132.152#53: Transfer completed: 23 messages, 2201 records, 96020 bytes, 0.027 secs (3556296 bytes/sec)
原因: master 服务器上具有不合法的语法解析, 导致 bind 无法主从同步获取完整的数据信息
解决方法, 检测主服务器数据库上的 records 表中 name 与 content 字段, 细心找到不合法的字段, 然后修复则可解决.
如:
mysql> select * from records where name='21.130.199.10.in-addr.arpa'; (不符合规范语法, 不知道谁埋的雷)
+----+-----------+----------------------------+------+---------------------------------------------------------------------------------+------+------+-------------+----------+-----------+------+
| id | domain_id | name | type | content | ttl | prio | change_date | disabled | ordername | auth |
+----+-----------+----------------------------+------+---------------------------------------------------------------------------------+------+------+-------------+----------+-----------+------+
| 4 | 2 | 21.130.199.10.in-addr.arpa | PTR | pdns.199.10.in-addr.arpa admin.pdns.199.10.in-addr.arpa 7 1200 7200 64800 86400 | 360 | NULL | NULL | 0 | NULL | 1 |
+----+-----------+----------------------------+------+---------------------------------------------------------------------------------+------+------+-------------+----------+-----------+------+
1 row in set (0.00 sec)
mysql> delete from records where id=4;
Query OK, 1 row affected (0.00 sec)
mysql> select * from records where type='SOA' and domain_id=2; (正确语法参考)
+----+-----------+---------------------+------+------------------------------------------------------------+------+------+-------------+----------+-----------+------+
| id | domain_id | name | type | content | ttl | prio | change_date | disabled | ordername | auth |
+----+-----------+---------------------+------+------------------------------------------------------------+------+------+-------------+----------+-----------+------+
| 2 | 2 | 199.10.in-addr.arpa | SOA | dns.vclound.com admin.pdns.vclound.com 555 1200 7200 64800 | 360 | NULL | NULL | 0 | NULL | 1 |
+----+-----------+---------------------+------+------------------------------------------------------------+------+------+-------------+----------+-----------+------+