Bind9 named.conf 文件中的错误。绑定不会开始

TJ *_*J L 3 linux ubuntu bind

我正在尝试在 Ubuntu Server 机器 (10.04) 上设置 DNS 服务器。我在 named.conf.local 中配置了一个条目来测试它,但是在尝试重新启动 bind9 时出现以下错误:

 * Starting domain name service... bind9                                 [fail]
Run Code Online (Sandbox Code Playgroud)

所以我检查了 syslog 的输出,这就是我得到的。

May 20 18:11:13 empression-server1 named[4700]: starting BIND 9.7.0-P1 -u bind
May 20 18:11:13 empression-server1 named[4700]: built with '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--sysconfdir=/etc/bind' '--localstatedir=/var' '--enable-threads' '--enable-largefile' '--with-libtool' '--enable-shared' '--enable-static' '--with-openssl=/usr' '--with-gssapi=/usr' '--with-gnu-ld' '--with-dlz-postgres=no' '--with-dlz-mysql=no' '--with-dlz-bdb=yes' '--with-dlz-filesystem=yes' '--with-dlz-ldap=yes' '--with-dlz-stub=yes' '--with-geoip=/usr' '--enable-ipv6' 'CFLAGS=-fno-strict-aliasing -DDIG_SIGCHASE -O2' 'LDFLAGS=-Wl,-Bsymbolic-functions' 'CPPFLAGS='
May 20 18:11:13 empression-server1 named[4700]: adjusted limit on open files from 1024 to 1048576
May 20 18:11:13 empression-server1 named[4700]: found 4 CPUs, using 4 worker threads
May 20 18:11:13 empression-server1 named[4700]: using up to 4096 sockets
May 20 18:11:13 empression-server1 named[4700]: loading configuration from '/etc/bind/named.conf'
May 20 18:11:13 empression-server1 named[4700]: /etc/bind/named.conf:10: missing ';' before 'include'
May 20 18:11:13 empression-server1 named[4700]: loading configuration: failure
May 20 18:11:13 empression-server1 named[4700]: exiting (due to fatal error)
Run Code Online (Sandbox Code Playgroud)

所以它认为我在默认的named.conf 文件中有一个错误,这很荒谬。我浏览了它并删除了一个空行,只是为了它的地狱,但我看不出它是如何计算那里有错误的。请注意,在此之前,我在 named.conf.local 中确实有错误,但它在 syslog 中正确显示并修复了它,因此它报告了正确的文件。下面是named.conf的内容:

// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the 
// structure of BIND configuration files in Debian, *BEFORE* you customize 
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local
include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";
Run Code Online (Sandbox Code Playgroud)

Phi*_*oss 12

假设第 10 行是 的最后一行named.conf,那么此错误可能是由于named.conf.local.