QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1670|回复: 3

bind9启动不了???

[复制链接]
发表于 2006-4-23 21:12:50 | 显示全部楼层 |阅读模式
/etc/init.d/bind9 restart
Stopping domain name service...:rndc: connect failed: connection refused
.
Starting domain name service...:.

怎么回事?

我的named.conf如下:
include "/etc/bind/named.conf.options";

zone "." {
type hint;
file "/etc/bind/db.root";
};


zone "localhost" {
type master;
file "/etc/bind/db.local";
};

zone "127.in-addr.arpa" {
type master;
file "/etc/bind/db.127";
};

zone "0.in-addr.arpa" {
type master;
file "/etc/bind/db.0";
};

zone "255.in-addr.arpa" {
type master;
file "/etc/bind/db.255";
};

zone "lygg.org" IN {
type master;
file "lygg.org.zone"
allow-update { none; };
};

zone "0.168.192.in-addr.arpa" IN {
type master;
file "0.168.192.arpa";
allow-update { none; };
};

include "/etc/bind/named.conf.local";
发表于 2006-4-23 22:50:34 | 显示全部楼层
[code:1]
rndc: connect failed: connection refused
After starting named with the command /etc/init.d/named start you get an OK but the named server is not running.

The problem could be that named tries to write to the file /var/run/named.pid . On most Linux/UNIX systems the user named is not allowed to write to that file. Instead the user named should write to /var/run/named/named.pid

Solution
Open /etc/named.conf and add pid-file "/var/run/named/named.pid" to the "options" section.

If you run rndc-confgen you should add the pid-file section yourself.

# Use with the following in named.conf, adjusting the allow list as needed:
options {
        pid-file "/var/run/named/named.pid";
}
key "rndc-key" {
      algorithm hmac-md5;
      secret "DTKqPmkyorw5dFYCyz6Fiw==";
};

controls {
      inet 127.0.0.1 port 953
              allow { 127.0.0.1; } keys { "rndc-key"; };
};
# End of named.conf

[/code:1]
回复

使用道具 举报

 楼主| 发表于 2006-4-23 23:45:07 | 显示全部楼层
[quote:804604d986="linky_fan"][code:1]
rndc: connect failed: connection refused
After starting named with the command /etc/init.d/named start you get an OK but the named server is not running.

The problem could be that named tries to write to the file /var/run/named.pid . On most Linux/UNIX systems the user named is not allowed to write to that file. Instead the user named should write to /var/run/named/named.pid

Solution
Open /etc/named.conf and add pid-file "/var/run/named/named.pid" to the "options" section.

If you run rndc-confgen you should add the pid-file section yourself.

# Use with the following in named.conf, adjusting the allow list as needed:
options {
        pid-file "/var/run/named/named.pid";
}
key "rndc-key" {
      algorithm hmac-md5;
      secret "DTKqPmkyorw5dFYCyz6Fiw==";
};

controls {
      inet 127.0.0.1 port 953
              allow { 127.0.0.1; } keys { "rndc-key"; };
};
# End of named.conf

[/code:1][/quote]

不行呀,毛病一旧,再帮帮我。
回复

使用道具 举报

发表于 2006-4-24 19:08:32 | 显示全部楼层
named那几个目录的权限有没有问题?(包括pid的?)
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-10-1 23:56 , Processed in 0.080131 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表