我偶然发现了绑定主从configuration中的一个奇怪的错误。
这个区域在主人身上工作得很好,但是在奴隶身上我却遇到了这样的错误:
21-May-2014 19:06:07.573 general: info: zone example.com/IN: refresh: failure trying master 1.2.3.4#53 (source 0.0.0.0#0): unexpected end of input
这是我的绑定文件的样子:
@ IN SOA ns1.example.com. admin.example.com. ( 2014052116 ; Serial 28800 ; Refresh 180 ; Retry 604800 ; Expire 21600 ) ; Minimum 86400 IN A 1.2.3.4 86400 IN MX 10 mail.example.com. 86400 IN MX 20 mail2.example.com. 86400 IN NS ns1.example.com. 86400 IN NS ns2.example.com. 86400 IN NS ns3.example.com. 86400 IN NS ns1.example.net. 86400 IN NS ns2.example.net. 86400 IN NS ns3.example.net. 86400 IN NS ns1.example.org. ; until here it works -- if I uncomment the below here, I'll get "end of input" failures. ; 86400 IN NS ns2.example.org. ; 86400 IN NS ns3.example.org. * 86400 IN A 1.2.3.4 [...]
如果我取消评论的两条NS线,我会得到“input结束”错误。 如果我保持他们的评论,一切工作正常。
是否有最大数量的NS或文件大小导致它崩溃?
谢谢。
编辑:
命名checkzone:
master # named-checkzone example.com example.com. zone example.com/IN: example.com/MX 'mail.example.com' is a CNAME (illegal) zone example.com/IN: example.com/MX 'mail2.example.com' is a CNAME (illegal) zone example.com/IN: loaded serial 2014052105 OK
全球select:
options { directory "/var/cache/bind"; auth-nxdomain no; # conform to RFC1035 listen-on-v6 { any; }; listen-on { any; }; dnssec-enable yes; recursion no; statistics-file "/var/log/named.stats"; try-tcp-refresh yes; };
版本(在所有三台服务器上相同):
# named -v BIND 9.8.4-rpz2+rl005.12-P1
我想你正在运行的最大UDP数据包大小为512字节。 在发出预期的AXFR请求之前(以TCP模式运行;没有大小限制),从属服务器也将进行SOA查询以确认主机认为自己对该区域具有权威性。
您遇到的问题是, SOA响应将包含的不仅仅是QUESTION和ANSWER部分:
A和AAAAlogging。 这就是为什么调整您的NSlogging或其相关的A / AAAAlogging对整个区域传输成功有影响的原因,但添加其他loggingtypes没有任何影响。 您的组合权限数据对于通过UDP传输的数据来说太大了。
不幸的是,我不知道任何解决方法。 BINDpipe理员参考手册确实引用了一个try-tcp-refresh选项,但是默认为yes,并且在你的选项中没有被禁用。 我不确定区域转移是你的问题的尽头。 即使要成功,这也会给任何客户带来问题,而客户又会提出任何请求,包括您的AUTHORITY和ADDITIONAL部分。 EDNS0旨在解决这样的问题,但我认为 AUTHORITY膨胀function太低,因此无法启动。
希望我的分析在某种程度上是错误的。 我认为你有一个非常有趣的问题,我希望看到有人提供一个更好的答案,因为我也可以从中学习。