加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

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

发布时间:2020-12-14 02:45:50 所属栏目:Linux 来源:网络整理
导读:我正在尝试在Ubuntu Server计算机上设置DNS服务器(10.04).我在named.conf.local中配置了一个条目来测试它,但是当我尝试重新启动bind9时,我收到以下错误: * Starting domain name service... bind9 [fail] 所以我检查了syslog的输出,这就是我得到的. May 20
我正在尝试在Ubuntu Server计算机上设置DNS服务器(10.04).我在named.conf.local中配置了一个条目来测试它,但是当我尝试重新启动bind9时,我收到以下错误:
* Starting domain name service... bind9                                 [fail]

所以我检查了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)

所以它认为我在默认的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";

解决方法

假设第10行是named.conf的最后一行,那么这个错误可能是由于named.conf.local中最后一个选项缺少分号引起的.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读