我正在尝试在本地机器上设置一个testing环境,并试图启动一个DNS守护进程,从named.conf.custom文件加载该configuration文件。
只要该文件的大小是3-4区域,bind9守护进程加载正常,但是当我inputconfiguration文件我需要(像10000行长),绑定无法启动,并在系统日志中,我发现此消息:
starting BIND 9.7.0-P1 -u bind Jun 14 17:06:06 cibionte-pc named[9785]: 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=' Jun 14 17:06:06 cibionte-pc named[9785]: adjusted limit on open files from 1024 to 1048576 Jun 14 17:06:06 cibionte-pc named[9785]: found 1 CPU, using 1 worker thread Jun 14 17:06:06 cibionte-pc named[9785]: using up to 4096 sockets Jun 14 17:06:06 cibionte-pc named[9785]: loading configuration from '/etc/bind/named.conf' Jun 14 17:06:06 cibionte-pc named[9785]: /etc/bind/named.conf.saferinternet:1: unknown option 'zone' Jun 14 17:06:06 cibionte-pc named[9785]: loading configuration: failure Jun 14 17:06:06 cibionte-pc named[9785]: exiting (due to fatal error)
有没有限制文件的大小bind9被允许加载?
我没有意识到任何限制特定于BIND(我运行BIND上的许多DNS服务器与包含数以千计的区域的conf文件)。 从错误看来,分号可能会在后续区域语句(或其他一些破坏configuration分析过程的小格式错误)前丢失。
BIND日志说/etc/bind/named.conf.saferinternet有错误。 你确认这个文件加载正确,如果它是唯一一个加载?
如果没有那个文件,检查文件正确加载前的文件语法(没有丢失尾随分号等)。
确保生成脚本不会编写非常长的行。 一个常见的问题是忘记换行符,并且有一个内部的最大行缓冲区长度有时会咬人。 这也通常显示为第1行上的错误,或任何行太长。
如果您将文件写在不同的行上,则可能需要从文件中粘贴几行文件。