BIND - logging file not found
I'm setting up BIND following the guidelines in the book Fedora Core 3 Unleashed. There is suggested a logging section in /etc/named.conf. I have the following
Code:
logging { [root@larsdell ~]# tail /var/log/messages Apr 29 21:17:53 localhost named[12102]: no longer listening on 129.241.151.90#53 Apr 29 21:17:58 localhost named[12198]: starting BIND 9.2.5 -u named -t /var/named/chroot Apr 29 21:17:58 localhost named[12198]: using 1 CPU Apr 29 21:17:58 localhost named[12198]: loading configuration from '/etc/named.conf' Apr 29 21:17:58 localhost named[12198]: listening on IPv4 interface lo, 127.0.0.1#53 Apr 29 21:17:58 localhost named[12198]: listening on IPv4 interface eth0, 129.241.151.90#53 Apr 29 21:17:58 localhost named[12198]: command channel listening on 127.0.0.1#953 Apr 29 21:17:58 localhost named[12198]: logging channel 'custom' file '/tmp/named.log': file not found Apr 29 21:17:58 localhost named[12198]: isc_log_open '/tmp/named.log' failed: file not found Apr 29 21:17:58 localhost named: named startup succeeded I have created the file as shown: [root@larsdell ~]# ls -l /tmp/named.log -rwxr--r-- 1 named named 0 Apr 29 20:28 /tmp/named.log The status of the service reports 'query logging is OFF'. Does anyone have a suggestion? |
Don't put it in /tmp, put it in /var/log/named, make sure /var/log/named is owned by the process that runs named.
|
I had the same problem with FC3, here is what I use:
logging { channel "logfile" { file "named.log" versions 5 size 5m; print-time yes; print-severity yes; print-category yes; }; category "default" { "logfile"; }; category "general" { "logfile"; }; category "update" { "logfile"; }; category "queries" { "logfile"; }; }; The log file ends up in /var/named/chroot/var/named due to the chroot. I still haven't been able to get the dump-file and statistics-file working though. |
This is strange. I use a mix of your suggestions in the logging section:
Code:
logging { Code:
[root@larsdell named]# ls -al /var/log/named Code:
[root@larsdell ~]# tail -n 500 /var/log/messages | grep named I think I've tried both, but anyway: 2. Should I 'touch', 'chown' and 'chmod' manually to create the file or will named create the file itself if necessary? 3. Just to be sure, the user 'named' is always running the process 'named', no matter which user is logged in? The service named starts automatically in runlevel 5. Code:
[root@larsdell named]# ps aux | grep named |
try specifying the log file like this:
Code:
file "named.log" versions 5 size 5m; |
Quote:
|
bind9 query log path change
I am able to write query.log under /var/named/chroot/var/named. The below is my configuration file which is working perfectly.
logging { channel query { file "/var/log/bind/query.log"; print-time yes; severity info; }; category queries { query; }; }; Additional Info i have disabled the apparmor.service I want to change the path to write the query example of path is /home/user1/query.log Facing the error isc_stdio_open '/home/user1/query.log' failed: file not found. Tried by changing the file permission and ownership but no luck logging { channel query { file "/home/user1/query.log"; print-time yes; severity info; }; category queries { query; }; }; |
All times are GMT -5. The time now is 03:55 AM. |