ISC BIND 拒绝启动:“退出(由于致命错误)”

ISC BIND 拒绝启动:“退出(由于致命错误)”

在 IBM X 服务器上的 CentOS 6.4 x64 上绑定 9.8.2。

来自官方 Centos 更新 repo 的 Bind 9.8.2 曾经运行良好,但后来我需要通过从源代码编译来调整它(这里没有什么疯狂的——只是使用与 CentOS RPM 中提供的不同选项进行编译。请注意,我使用的是来自 bind-9.9.4 的源代码,而不是 9.8.x,所以这可能是问题所在?我对此表示怀疑,但这是可能的)。
最近,我决定重新从 RPM 安装,但现在,我无法启动 Bind。

我收到的唯一信息没有告诉我任何信息:

# named -g -c /etc/named.conf
01-Dec-2013 15:46:57.899 starting BIND 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6_4.6 -g -c /etc/named.conf
01-Dec-2013 15:46:57.899 built with '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-libtool' '--localstatedir=/var' '--enable-threads' '--enable-ipv6' '--with-pic' '--disable-static' '--disable-openssl-version-check' '--with-dlz-ldap=yes' '--with-dlz-postgres=yes' '--with-dlz-mysql=yes' '--with-dlz-filesystem=yes' '--with-gssapi=yes' '--disable-isc-spnego' '--with-docbook-xsl=/usr/share/sgml/docbook/xsl-stylesheets' '--enable-fixed-rrset' 'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-linux-gnu' 'target_alias=x86_64-redhat-linux-gnu' 'CFLAGS= -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' 'CPPFLAGS= -DDIG_SIGCHASE'
01-Dec-2013 15:46:57.899 ----------------------------------------------------
01-Dec-2013 15:46:57.899 BIND 9 is maintained by Internet Systems Consortium,
01-Dec-2013 15:46:57.899 Inc. (ISC), a non-profit 501(c)(3) public-benefit
01-Dec-2013 15:46:57.899 corporation.  Support and training for BIND 9 are
01-Dec-2013 15:46:57.899 available at https://www.isc.org/support
01-Dec-2013 15:46:57.899 ----------------------------------------------------
01-Dec-2013 15:46:57.899 adjusted limit on open files from 4096 to 1048576
01-Dec-2013 15:46:57.899 found 24 CPUs, using 24 worker threads
01-Dec-2013 15:46:57.900 using up to 4096 sockets
01-Dec-2013 15:46:57.907 loading configuration: failure
01-Dec-2013 15:46:57.907 exiting (due to fatal error)

named.conf 中的语法错误和文件权限错误通常在loading configuration: failure日志行之前列出,但在这种情况下没有错误,所以我不知道发生了什么。

有趣的是,如果我从源编译 (make install) 重新安装 bind,bind 就可以正常工作。现在我只使用标准默认的 named.conf。我不会费心在这里发布它,因为我知道它是有效的——这不是这里的问题。我觉得我在摆弄的过程中可能不小心删除了一个共享库或类似的东西……手指粘糊糊的?累的时候还在工作?谁知道呢。

下面是我编译 bind 时使用的选项,希望有帮助:

./configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --target=x86_64-redhat-linux-gnu --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-libtool --localstatedir=/var --enable-threads --with-dlz-filesystem=yes --with-gssapi=/usr/include/gssapi --enable-fixed-rrset --with-dlopen=yes

好的,我直接说吧。我不需要有人指导我完成这个过程,但我确实需要一个方向。我不知道如何进一步调试这个问题。例如,我如何监控一个进程(例如命名的进程)是否正在查询不存在的共享库或资源?除了“-g”之外,Bind 没有用于额外详细程度的标志。“-d”标志不会为这个错误提供更多详细程度。如何进一步排除故障?Ktrace,还是其他调试工具?我很困惑,希望得到一些建议。

我尝试过的事情:

  • yum reinstallrepoquery --requires --recursive --resolve bind在列出的每个repoquery --requires --recursive --resolve bind-utils软件包中repoquery --requires --recursive --resolve bind-libs
  • yum remove bind bind-utils bind-libs,然后手动删除所有剩余的 tidbits,然后重新安装这三个包
  • 从 RPM 重新安装 bind 后运行ldconfig(完全冗余,但不管怎样)
  • SElinux 已禁用,并且未安装 App Armor

我真的希望 ISC 开发人员能制作一个uninstallmake 目标,因为从源代码编译后确实没有简单的方法(据我所知)来卸载 bind。(请随时给我指点迷津)。

谢谢您的指点,如果您需要更多信息,请告诉我。

*** 编辑

输出自su - named -c "/usr/sbin/named -d 9 -g -c /etc/named.conf" -s /bin/bash

01-Dec-2013 17:16:30.994 Registering DLZ_dlopen driver
01-Dec-2013 17:16:30.994 Registering SDLZ driver 'dlopen'
01-Dec-2013 17:16:30.994 Registering DLZ driver 'dlopen'
01-Dec-2013 17:16:30.996 decrement_reference: delete from rbt: 0x7ff208214068 .
01-Dec-2013 17:16:31.001 load_configuration: failure
01-Dec-2013 17:16:31.001 loading configuration: failure
01-Dec-2013 17:16:31.001 exiting (due to fatal error)

最后,多了一个线索!我一直在 bind 中使用“-d 10”,但显然它并不存在,所以难怪它没有给我任何额外的调试信息。上面的消息在谷歌上没有找到任何具体信息,但我会继续寻找。如果这有任何帮助,请告诉我。

答案1

尝试“named -d 9”,是的,这很不寻常,它没有告诉你原因......

答案2

解决了!原来是 /usr/lib 中的一堆 32 位共享库。它们一定是在我从源代码编译/安装时到达那里的,并且它们优先于 (?) /usr/lib64 中的库。事实上,现在我想起来,我敢打赌,我要么是为 i386 编译的,要么是将 64 位安装目标瞄准了 /usr/lib。

在我删除它们之后,然后从 centos repo 重新安装 bind,一切终于按预期工作。

如果有人感兴趣的话,以下是 /usr/lib 中的文件:

-rw-r--r--. 1 root root 10220682 Oct  8 00:42 libdns.a
-rw-r--r--. 1 root root     1010 Oct  8 00:42 libdns.la
lrwxrwxrwx. 1 root root       17 Oct 10 00:02 libdns.so.100 -> libdns.so.100.1.1
-rw-r--r--  1 root root  6026006 Oct  8 00:42 libdns.so.100.1.1
lrwxrwxrwx. 1 root root       17 Oct 10 00:02 libdns.so.122 -> libdns.so.122.1.0
-rw-r--r--. 1 root root  5761978 Oct  8 00:18 libdns.so.122.1.0
-rw-r--r--. 1 root root  2083570 Oct  8 00:42 libisc.a
-rw-r--r--. 1 root root   170672 Oct  8 00:42 libisccc.a
-rw-r--r--. 1 root root      971 Oct  8 00:42 libisccc.la
lrwxrwxrwx. 1 root root       18 Oct 10 00:02 libisccc.so.80 -> libisccc.so.80.0.4
-rw-r--r--. 1 root root   102388 Oct  8 00:18 libisccc.so.80.0.4
lrwxrwxrwx. 1 root root       18 Oct 10 00:02 libisccc.so.90 -> libisccc.so.90.0.4
-rw-r--r--. 1 root root   105996 Oct  8 00:42 libisccc.so.90.0.4
-rw-r--r--. 1 root root   432498 Oct  8 00:42 libisccfg.a
-rw-r--r--. 1 root root     1067 Oct  8 00:42 libisccfg.la
lrwxrwxrwx. 1 root root       19 Oct 10 00:02 libisccfg.so.82 -> libisccfg.so.82.0.7
-rw-r--r--. 1 root root   289960 Oct  8 00:18 libisccfg.so.82.0.7
lrwxrwxrwx. 1 root root       19 Oct 10 00:02 libisccfg.so.90 -> libisccfg.so.90.0.7
-rw-r--r--  1 root root   298219 Oct  8 00:42 libisccfg.so.90.0.7
-rw-r--r--. 1 root root      938 Oct  8 00:42 libisc.la
lrwxrwxrwx. 1 root root       16 Oct 10 00:02 libisc.so.84 -> libisc.so.84.5.1
-rw-r--r--. 1 root root  1150027 Oct  8 00:18 libisc.so.84.5.1
lrwxrwxrwx. 1 root root       16 Oct 10 00:02 libisc.so.95 -> libisc.so.95.2.1
-rw-r--r--. 1 root root  1178391 Oct  8 00:42 libisc.so.95.2.1
-rw-r--r--. 1 root root   431628 Oct  8 00:42 liblwres.a
-rw-r--r--. 1 root root      952 Oct  8 00:42 liblwres.la
lrwxrwxrwx. 1 root root       18 Oct 10 00:02 liblwres.so.80 -> liblwres.so.80.0.7
-rw-r--r--. 1 root root   239863 Oct  8 00:18 liblwres.so.80.0.7
lrwxrwxrwx. 1 root root       18 Oct 10 00:02 liblwres.so.90 -> liblwres.so.90.0.5
-rw-r--r--. 1 root root   243111 Oct  8 00:42 liblwres.so.90.0.5

相关内容