歡迎您光臨本站 註冊首頁

chroot()后logging問題

←手機掃碼閱讀     火星人 @ 2014-03-05 , reply:0

chroot()后logging問題

我用了chroot(),bind9可以正常啟動,但總一個日誌存在於/var/log/messages如下:
Nov 30 10:17:45 dns1 named: logging channel 'audit_log' file 'log/named.log': file not found

我的相關配置文件和許可權設置如下:
logging {
channel default_syslog { syslog daemon; severity info; };
channel audit_log { file "/var/log/named.log" versions 3 size 30m; severity info; print-time yes; };

root@dns1 log]#  ps aux | grep named
named    30169  0.3  1.5 38608 3864 ?        Ssl  18:13   0:01 /usr/local/named/sbin/named -c named/chroot/etc/named.conf /var/-u named -t /var/named/chroot

/var/named/chroot/var/log許可權設置如下:

# pwd
/var/named/chroot/var/log
# ll
總用量 0
-rw-r--r--  1 named named 0 11月 30 18:17 named.log
# cd ..
# ll
總用量 12
drwxr-xr-x  2 named named 4096 11月 30 18:17 log

實在不解。
請各位幫我看看錯誤在哪裡。
謝謝。

[ 本帖最後由 gaochong 於 2006-12-1 15:57 編輯 ]
《解決方案》

log文件夾應該在這個位置:
/var/named/chroot/log
而不是這個位置:
/var/named/chroot/var/log
《解決方案》

回復 2樓 llzqq 的帖子

謝謝樓主指點。

樓主的意思是這樣嗎?

1。---channel audit_log { file "/log/named.log" versions 3 size 30m; severity info; print-time yes; };

改為

channel audit_log { file "/log/named.log" versions 3 size 30m; severity info; print-time yes; };

2。---將log文件夾設在/var/named/chroot下。

是這樣嗎,樓主?

[ 本帖最後由 gaochong 於 2006-12-2 10:26 編輯 ]
《解決方案》

《解決方案》

回復 4樓 llzqq 的帖子

明天周一下午我再調試一下,希望能夠調試成功。
非常感謝樓主的幫助。
Studying ......
《解決方案》

回復 4樓 llzqq 的帖子

還要問樓主一個智能解析相關的問題,涉及帶view的master/slave架構,請問樓主可以幫我嗎?這個問題困惑我很久了.
謝謝。
《解決方案》

回復 4樓 llzqq 的帖子

我按照樓主的辦法,全部設置,但還有以上錯誤.
具體設置如下:

# pwd
/var/named/chroot
# ll
總用量 20
drwxr-xr--  2 named named 4096 12月  5 15:18 dev
drwxr-x---  2 named named 4096 12月  5 15:22 etc
drwxr-xr-x  2 named named 4096 12月  5 15:19 log
drwxr-xr-x  2 named named 4096 11月 19 13:15 proc
drwxr-xr-x  3 named named 4096 12月  5 13:10 var
#

但還有如下錯誤提示:
Dec  5 15:26:02 dns1 named: logging channel 'audit_log' file 'log/named.log': file not found我的named.conf如下:
logging {
channel default_syslog { syslog daemon; severity info; };
channel audit_log { file "log/named.log" versions 3 size 30m; severity info; print-time yes; };

請樓主幫忙。謝謝.

[ 本帖最後由 gaochong 於 2006-12-5 18:15 編輯 ]
《解決方案》

回復 7樓 gaochong 的帖子

已經解決.
問題原因:

將 named.conf如下:
logging {
channel default_syslog { syslog daemon; severity info; };
channel audit_log { file "log/named.log" versions 3 size 30m; severity info; print-time yes; };

改為

named.conf如下:

logging {
channel default_syslog { syslog daemon; severity info; };
channel audit_log { file "/log/named.log" versions 3 size 30m; severity info; print-time yes; };

bind9運行正常。

[ 本帖最後由 gaochong 於 2006-12-5 20:58 編輯 ]
《解決方案》

回復 2樓 llzqq 的帖子

現在我用的2台DNS均為master,其配置完全一致。

zone文件如下:

$TTL    600
@               IN      SOA             dns1.gouper.com.  root.goupper.com. (
                                                 2006120108      ; serial (d. adams)
                                                 60M             ; refresh
                                                 15M             ; retry
                                                 1W              ; expiry
                                                 1D )            ; minimum
                IN      NS              dns1.goupper.com.
                IN      NS              dns2.goupper.com.
dns1            IN      A               60.12.226.8
dns2            IN      A               222.46.18.12
。。。       。。。。          。。。。。。。

但dnsreport發現如下問題:
http://www.dnsreport.com/tools/dnsreport.ch?domain=goupper.com

但我用nslookup的查詢過程如下:

> set type=soa
> goupper.com
Server:  hzdns46.zjhzptt.net.cn
Address:  202.101.172.46

*** hzdns46.zjhzptt.net.cn can't find goupper.com: Server

> goupper.com
Server:  
Address:  218.75.110.174

Non-authoritative answer:
goupper.com
        primary name server = dns1.goupper.com
        responsible mail addr = root.goupper.com
        serial  = 2006120108
        refresh = 3600 (1 hour)
        retry   = 900 (15 mins)
        expire  = 604800 (7 days)
        default TTL = 86400 (1 day)

goupper.com     nameserver = dns2.goupper.com
goupper.com     nameserver = dns1.goupper.com
>


請問各位前輩如何解決其中問題。謝謝。

[ 本帖最後由 gaochong 於 2006-12-6 14:56 編輯 ]
《解決方案》

回復 4樓 llzqq 的帖子

希望斑竹能夠回答這個問題。。。
我困惑很久了。。。。。。。。。
謝謝!

[火星人 ] chroot()后logging問題已經有416次圍觀

http://coctec.com/docs/service/show-post-43452.html