bind9启动不了???

這個版面主要討論 debian 在 server 端的應用問題, server 種類繁多..舉凡 Web Server 、 File Server、 DHCP Server..等等。

版主: 阿信

bind9启动不了???

文章coldcoffee » 週日 4月 23, 2006 9:19 pm

/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";
coldcoffee
可愛的小學生
可愛的小學生
 
文章: 47
註冊時間: 週五 5月 13, 2005 11:54 pm

文章yzcie » 週日 4月 23, 2006 10:09 pm

嗨, coldcoffee 兄,
您的情況好像是關不了, 而不是啟動不了.
您可以 top 看看 named 在不在(如果 restart 多次一點, 又都關不了, 可能會看到很多個 named)

問題好像出在 rndc. 下面兩篇的環境不在 debian, 不過您參考參考囉.
http://www.study-area.org/tips/rndc.htm
http://www.tn.edu.tw/sammy/dns/bind9_admin.htm
拿錯誤訊息(rndc: connect failed: connection refused)找 google 會找到不少東西

另外, restart 時, 您的 /var/log/message 裡有什麼錯誤訊息嗎?
yzcie
可愛的小學生
可愛的小學生
 
文章: 65
註冊時間: 週三 1月 26, 2005 3:19 pm
來自: 台灣

文章企鵝狂 » 週一 4月 24, 2006 12:02 am

coldcoffee 你好
不知道你是不是使用自己compile的kernel呢?

我的Ubuntu Bind 9如果kernel裡面沒有 Security options -> Default Linux Capabilities 這個東西的話..就會出現你上面說的情形喔...

而且你start的時候看起來是啟動成功了..但是好像還是不能查詢

重新compile kernel之後應該會有這兩個module
commoncap,capability
http://news.bbc.co.uk/1/hi/world/asia-pacific/country_profiles/1285915.stm


Country profile: Taiwan
Map of Taiwan
Taiwan is the island which has for all practical purposes been independent for half a century, but which China regards as a rebel region that must be reunited with the mainland - by force if necessary.
企鵝狂
活潑的高中生
活潑的高中生
 
文章: 477
註冊時間: 週三 3月 31, 2004 11:13 am
來自: 台灣共和國

文章coldcoffee » 週一 4月 24, 2006 4:38 pm

我发现问题所在了,只要在/etc/bind/named.conf里加入自己的区域,如:
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; };
};

就会有上面的错误,如果不入新zone区,用默认的文件,就不会有问题。但是还没有找到解决的办法。请再指点一下。
coldcoffee
可愛的小學生
可愛的小學生
 
文章: 47
註冊時間: 週五 5月 13, 2005 11:54 pm

文章yzcie » 週一 4月 24, 2006 5:21 pm

嗨, coldcoffee 兄,
請問您 /var/log/message 裡有什麼錯誤訊息嗎 ?
yzcie
可愛的小學生
可愛的小學生
 
文章: 65
註冊時間: 週三 1月 26, 2005 3:19 pm
來自: 台灣

文章coldcoffee » 週一 4月 24, 2006 6:18 pm

yzcie 寫:嗨, coldcoffee 兄,
請問您 /var/log/message 裡有什麼錯誤訊息嗎 ?


不好意思,上次就应该说明,什么都没有提示。
coldcoffee
可愛的小學生
可愛的小學生
 
文章: 47
註冊時間: 週五 5月 13, 2005 11:54 pm

文章企鵝狂 » 週一 4月 24, 2006 7:20 pm

直接執行 named -d 3 -f -g
這樣會在前景執行 把錯誤訊息印到stderr
http://news.bbc.co.uk/1/hi/world/asia-pacific/country_profiles/1285915.stm


Country profile: Taiwan
Map of Taiwan
Taiwan is the island which has for all practical purposes been independent for half a century, but which China regards as a rebel region that must be reunited with the mainland - by force if necessary.
企鵝狂
活潑的高中生
活潑的高中生
 
文章: 477
註冊時間: 週三 3月 31, 2004 11:13 am
來自: 台灣共和國

文章coldcoffee » 週一 4月 24, 2006 10:48 pm

24-Apr-2006 22:41:17.679 starting BIND 9.3.2 -d 3 -f -g
24-Apr-2006 22:41:17.680 found 1 CPU, using 1 worker thread
24-Apr-2006 22:41:17.688 loading configuration from '/etc/bind/named.conf'
24-Apr-2006 22:41:17.691 set maximum stack size to 4294967295: success
24-Apr-2006 22:41:17.691 set maximum data size to 4294967295: success
24-Apr-2006 22:41:17.691 set maximum core size to 4294967295: success
24-Apr-2006 22:41:17.691 set maximum open files to 1024: success
24-Apr-2006 22:41:17.692 listening on IPv4 interface lo, 127.0.0.1#53
24-Apr-2006 22:41:17.692 clientmgr @0x80a1388: create
24-Apr-2006 22:41:17.693 clientmgr @0x80a1388: createclients
24-Apr-2006 22:41:17.693 clientmgr @0x80a1388: create new
24-Apr-2006 22:41:17.693 client @0x80cbf28: create
24-Apr-2006 22:41:17.694 clientmgr @0x80a1388: createclients
24-Apr-2006 22:41:17.694 clientmgr @0x80a1388: create new
24-Apr-2006 22:41:17.694 client @0x80cdd80: create
24-Apr-2006 22:41:17.694 listening on IPv4 interface eth1, 192.168.0.39#53
24-Apr-2006 22:41:17.694 clientmgr @0x80cfb58: create
24-Apr-2006 22:41:17.694 clientmgr @0x80cfb58: createclients
24-Apr-2006 22:41:17.695 clientmgr @0x80cfb58: create new
24-Apr-2006 22:41:17.695 client @0x80cff70: create
24-Apr-2006 22:41:17.695 clientmgr @0x80cfb58: createclients
24-Apr-2006 22:41:17.695 clientmgr @0x80cfb58: create new
24-Apr-2006 22:41:17.695 client @0x80d1e08: create
24-Apr-2006 22:41:17.695 listening on IPv4 interface vmnet8, 172.16.125.1#53
24-Apr-2006 22:41:17.695 clientmgr @0x80d3be0: create
24-Apr-2006 22:41:17.695 clientmgr @0x80d3be0: createclients
24-Apr-2006 22:41:17.696 clientmgr @0x80d3be0: create new
24-Apr-2006 22:41:17.696 client @0x80d3ff8: create
24-Apr-2006 22:41:17.697 clientmgr @0x80d3be0: createclients
24-Apr-2006 22:41:17.697 clientmgr @0x80d3be0: create new
24-Apr-2006 22:41:17.697 client @0x80d5e90: create
24-Apr-2006 22:41:17.697 listening on IPv4 interface vmnet1, 192.168.107.1#53
24-Apr-2006 22:41:17.698 clientmgr @0x80d7c68: create
24-Apr-2006 22:41:17.698 clientmgr @0x80d7c68: createclients
24-Apr-2006 22:41:17.775 clientmgr @0x80d7c68: create new
24-Apr-2006 22:41:17.776 client @0x80d8080: create
24-Apr-2006 22:41:17.776 clientmgr @0x80d7c68: createclients
24-Apr-2006 22:41:17.776 clientmgr @0x80d7c68: create new
24-Apr-2006 22:41:17.776 client @0x80d9f18: create
24-Apr-2006 22:41:17.776 listening on IPv4 interface ppp0, 61.49.249.214#53
24-Apr-2006 22:41:17.776 clientmgr @0x80dbcf0: create
24-Apr-2006 22:41:17.776 clientmgr @0x80dbcf0: createclients
24-Apr-2006 22:41:17.776 clientmgr @0x80dbcf0: create new
24-Apr-2006 22:41:17.778 client @0x80dc108: create
24-Apr-2006 22:41:17.778 clientmgr @0x80dbcf0: createclients
24-Apr-2006 22:41:17.778 clientmgr @0x80dbcf0: create new
24-Apr-2006 22:41:17.778 client @0x80ddfa0: create
24-Apr-2006 22:41:17.782 res 0x80e5730: create
24-Apr-2006 22:41:17.783 dns_requestmgr_create
24-Apr-2006 22:41:17.783 dns_requestmgr_create: 0x80e6de8
24-Apr-2006 22:41:17.783 dns_requestmgr_whenshutdown
24-Apr-2006 22:41:17.786 res 0x8102258: create
24-Apr-2006 22:41:17.787 dns_requestmgr_create
24-Apr-2006 22:41:17.787 dns_requestmgr_create: 0x81197b0
24-Apr-2006 22:41:17.787 dns_requestmgr_whenshutdown
24-Apr-2006 22:41:17.788 command channel listening on 127.0.0.1#953
24-Apr-2006 22:41:17.789 command channel listening on ::1#953
24-Apr-2006 22:41:17.789 ignoring config file logging statement due to -g option24-Apr-2006 22:41:17.791 load_configuration: success
24-Apr-2006 22:41:17.876 zone 0.in-addr.arpa/IN: starting load
24-Apr-2006 22:41:17.884 zone 0.in-addr.arpa/IN: number of nodes in database: 1
24-Apr-2006 22:41:17.884 zone 0.in-addr.arpa/IN: loaded
24-Apr-2006 22:41:17.936 no journal file, but that's OK
24-Apr-2006 22:41:17.936 zone 0.in-addr.arpa/IN: journal rollforward completed successfully: no journal
24-Apr-2006 22:41:17.939 zone 0.in-addr.arpa/IN: loaded serial 1
24-Apr-2006 22:41:17.939 zone 127.in-addr.arpa/IN: starting load
24-Apr-2006 22:41:17.940 zone 127.in-addr.arpa/IN: number of nodes in database: 2
24-Apr-2006 22:41:17.941 zone 127.in-addr.arpa/IN: loaded
24-Apr-2006 22:41:17.941 no journal file, but that's OK
24-Apr-2006 22:41:17.941 zone 127.in-addr.arpa/IN: journal rollforward completed successfully: no journal
24-Apr-2006 22:41:17.941 zone 127.in-addr.arpa/IN: loaded serial 1
24-Apr-2006 22:41:17.941 zone 0.168.192.in-addr.arpa/IN: starting load
24-Apr-2006 22:41:17.942 /etc/bind/0.168.192.arpa:2: ignoring out-of-zone data (0.168.192.arpa)
24-Apr-2006 22:41:17.943 zone 0.168.192.in-addr.arpa/IN: number of nodes in database: 2
24-Apr-2006 22:41:17.944 zone 0.168.192.in-addr.arpa/IN: loaded
24-Apr-2006 22:41:17.944 no journal file, but that's OK
24-Apr-2006 22:41:17.944 zone 0.168.192.in-addr.arpa/IN: journal rollforward completed successfully: no journal
24-Apr-2006 22:41:17.944 zone 0.168.192.in-addr.arpa/IN: has 0 SOA records
24-Apr-2006 22:41:17.944 zone 0.168.192.in-addr.arpa/IN: has no NS records
24-Apr-2006 22:41:17.944 calling free_rbtdb(0.168.192.in-addr.arpa)
24-Apr-2006 22:41:17.944 done free_rbtdb(0.168.192.in-addr.arpa)
24-Apr-2006 22:41:17.945 zone 255.in-addr.arpa/IN: starting load
24-Apr-2006 22:41:17.950 zone 255.in-addr.arpa/IN: number of nodes in database: 1
24-Apr-2006 22:41:17.950 zone 255.in-addr.arpa/IN: loaded
24-Apr-2006 22:41:17.950 no journal file, but that's OK
24-Apr-2006 22:41:17.951 zone 255.in-addr.arpa/IN: journal rollforward completed successfully: no journal
24-Apr-2006 22:41:17.951 zone 255.in-addr.arpa/IN: loaded serial 1
24-Apr-2006 22:41:17.951 zone test.com/IN: starting load
24-Apr-2006 22:41:17.952 zone test.com/IN: number of nodes in database: 3
24-Apr-2006 22:41:17.953 zone test.com/IN: loaded
24-Apr-2006 22:41:17.953 no journal file, but that's OK
24-Apr-2006 22:41:17.953 zone test.com/IN: journal rollforward completed successfully: no journal
24-Apr-2006 22:41:17.953 zone test.com/IN: loaded serial 2006042301
24-Apr-2006 22:41:17.953 zone localhost/IN: starting load
24-Apr-2006 22:41:17.954 zone localhost/IN: number of nodes in database: 1
24-Apr-2006 22:41:17.955 zone localhost/IN: loaded
24-Apr-2006 22:41:17.956 no journal file, but that's OK
24-Apr-2006 22:41:17.956 zone localhost/IN: journal rollforward completed successfully: no journal
24-Apr-2006 22:41:17.956 zone localhost/IN: loaded serial 1
24-Apr-2006 22:41:18.039 zone authors.bind/CH: starting load
24-Apr-2006 22:41:18.046 zone authors.bind/CH: number of nodes in database: 0
24-Apr-2006 22:41:18.046 zone authors.bind/CH: loaded
24-Apr-2006 22:41:18.047 zone hostname.bind/CH: starting load
24-Apr-2006 22:41:18.047 zone hostname.bind/CH: number of nodes in database: 0
24-Apr-2006 22:41:18.047 zone hostname.bind/CH: loaded
24-Apr-2006 22:41:18.047 zone version.bind/CH: starting load
24-Apr-2006 22:41:18.047 zone version.bind/CH: number of nodes in database: 0
24-Apr-2006 22:41:18.047 zone version.bind/CH: loaded
24-Apr-2006 22:41:18.048 zone id.server/CH: starting load
24-Apr-2006 22:41:18.050 zone id.server/CH: number of nodes in database: 0
24-Apr-2006 22:41:18.050 zone id.server/CH: loaded
24-Apr-2006 22:41:18.050 dns_zone_maintenance: zone localhost/IN: enter
24-Apr-2006 22:41:18.050 dns_zone_maintenance: zone 127.in-addr.arpa/IN: enter
24-Apr-2006 22:41:18.050 dns_zone_maintenance: zone 0.in-addr.arpa/IN: enter
24-Apr-2006 22:41:18.050 dns_zone_maintenance: zone 255.in-addr.arpa/IN: enter
24-Apr-2006 22:41:18.051 dns_zone_maintenance: zone test.com/IN: enter
24-Apr-2006 22:41:18.051 dns_zone_maintenance: zone 0.168.192.in-addr.arpa/IN: enter
24-Apr-2006 22:41:18.051 dns_zone_maintenance: zone version.bind/CH: enter
24-Apr-2006 22:41:18.051 dns_zone_maintenance: zone hostname.bind/CH: enter
24-Apr-2006 22:41:18.051 dns_zone_maintenance: zone authors.bind/CH: enter
24-Apr-2006 22:41:18.051 dns_zone_maintenance: zone id.server/CH: enter
24-Apr-2006 22:41:18.051 running
24-Apr-2006 22:41:18.144 client @0x80cbf28: udprecv
24-Apr-2006 22:41:18.144 client @0x80cdd80: accept
24-Apr-2006 22:41:18.144 client @0x80cff70: udprecv
24-Apr-2006 22:41:18.145 client @0x80d1e08: accept
24-Apr-2006 22:41:18.145 client @0x80d3ff8: udprecv
24-Apr-2006 22:41:18.145 client @0x80d5e90: accept
24-Apr-2006 22:41:18.145 client @0x80d8080: udprecv
24-Apr-2006 22:41:18.145 client @0x80d9f18: accept
24-Apr-2006 22:41:18.145 client @0x80dc108: udprecv
24-Apr-2006 22:41:18.145 client @0x80ddfa0: accept
24-Apr-2006 22:41:18.145 zone_timer: zone 0.in-addr.arpa/IN: enter
24-Apr-2006 22:41:18.146 zone_maintenance: zone 0.in-addr.arpa/IN: enter
24-Apr-2006 22:41:18.146 zone_timer: zone localhost/IN: enter
24-Apr-2006 22:41:18.146 zone_maintenance: zone localhost/IN: enter
24-Apr-2006 22:41:18.146 zone_timer: zone 127.in-addr.arpa/IN: enter
24-Apr-2006 22:41:18.146 zone_maintenance: zone 127.in-addr.arpa/IN: enter
24-Apr-2006 22:41:18.146 zone_timer: zone 255.in-addr.arpa/IN: enter
24-Apr-2006 22:41:18.146 zone_maintenance: zone 255.in-addr.arpa/IN: enter
24-Apr-2006 22:41:18.146 zone_timer: zone id.server/CH: enter
24-Apr-2006 22:41:18.146 zone_maintenance: zone id.server/CH: enter
24-Apr-2006 22:41:18.146 zone_timer: zone test.com/IN: enter
24-Apr-2006 22:41:18.147 zone_maintenance: zone test.com/IN: enter
24-Apr-2006 22:41:18.147 zone_timer: zone version.bind/CH: enter
24-Apr-2006 22:41:18.147 zone_maintenance: zone version.bind/CH: enter
24-Apr-2006 22:41:18.147 zone_timer: zone hostname.bind/CH: enter
24-Apr-2006 22:41:18.147 zone_maintenance: zone hostname.bind/CH: enter
24-Apr-2006 22:41:18.147 zone_timer: zone authors.bind/CH: enter
24-Apr-2006 22:41:18.147 zone_maintenance: zone authors.bind/CH: enter
coldcoffee
可愛的小學生
可愛的小學生
 
文章: 47
註冊時間: 週五 5月 13, 2005 11:54 pm

文章企鵝狂 » 週一 4月 24, 2006 10:57 pm

ㄜ...好吧..看不出甚麼...

最後..我遇過的..rndc connection refused..
最後可能的問題是..

lo 127.0.0.1 根本沒有on
或是iptables INPUT擋掉了

man rndc 可以看到..bind9預設會在 tcp 953 listen rndc 進來的控制連線

對了..你這樣啟動之後...應該可以查詢吧?

dig @127.0.0.1 www.google.com.tw
最後由 企鵝狂 於 週一 4月 24, 2006 11:01 pm 編輯,總共編輯了 1 次。
http://news.bbc.co.uk/1/hi/world/asia-pacific/country_profiles/1285915.stm


Country profile: Taiwan
Map of Taiwan
Taiwan is the island which has for all practical purposes been independent for half a century, but which China regards as a rebel region that must be reunited with the mainland - by force if necessary.
企鵝狂
活潑的高中生
活潑的高中生
 
文章: 477
註冊時間: 週三 3月 31, 2004 11:13 am
來自: 台灣共和國

文章coldcoffee » 週一 4月 24, 2006 11:00 pm

我又试了一下,named -d 3 -f -g 可以把bind9起来,用/etc/init.d/bind9 start 就起不来???
coldcoffee
可愛的小學生
可愛的小學生
 
文章: 47
註冊時間: 週五 5月 13, 2005 11:54 pm

文章企鵝狂 » 週二 4月 25, 2006 12:20 am

看了一下/etc/init.d/bind9
"可能"有關系的...

# dirs under /var/run can go away on reboots.
mkdir -p /var/run/bind/run
chmod 775 /var/run/bind/run
chown root:bind /var/run/bind/run >/dev/null 2>&1 || true

確定一下你有/var/run/bind這個目錄
不然下面他要存pid 的時候就會失敗了
if start-stop-daemon --start --quiet --exec /usr/sbin/named \
--pidfile /var/run/bind/run/named.pid -- $OPTIONS;

blah..blah..blah..其他省略...
http://news.bbc.co.uk/1/hi/world/asia-pacific/country_profiles/1285915.stm


Country profile: Taiwan
Map of Taiwan
Taiwan is the island which has for all practical purposes been independent for half a century, but which China regards as a rebel region that must be reunited with the mainland - by force if necessary.
企鵝狂
活潑的高中生
活潑的高中生
 
文章: 477
註冊時間: 週三 3月 31, 2004 11:13 am
來自: 台灣共和國

文章coldcoffee » 週二 4月 25, 2006 4:25 pm

企鵝狂 寫:ㄜ...好吧..看不出甚麼...

最後..我遇過的..rndc connection refused..
最後可能的問題是..

lo 127.0.0.1 根本沒有on
或是iptables INPUT擋掉了

man rndc 可以看到..bind9預設會在 tcp 953 listen rndc 進來的控制連線

對了..你這樣啟動之後...應該可以查詢吧?

dig @127.0.0.1 www.google.com.tw


按你告诉我的方法,就可以查询了。
coldcoffee
可愛的小學生
可愛的小學生
 
文章: 47
註冊時間: 週五 5月 13, 2005 11:54 pm


回到 debian server

誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 1 位訪客

cron