LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-21-2010, 08:18 AM   #1
ddaas
Member
 
Registered: Oct 2004
Location: Romania
Distribution: Ubuntu server, FreeBsd
Posts: 474

Rep: Reputation: 30
BIND9 non logging


Hi,
I have ununtu 10.10 server with bind9.

In named.conf.options

Code:
logging { 
        channel my_log { 
                file "/var/log/bind.log" versions 10 size 5M; 
                severity info;
                print-time yes;
                print-category yes;
                print-severity yes; 
        };  

        category queries { my_log; };  
        category default { my_log; };  
};
The file /var/log/bind.log exists and belongs to bind.
Bind9 doesn't seem to run in chroot mode. It is the default instalation, named is in /usr/sbin and the config files are in /etc/bind

The problem is that it doesn't log a thing.

If I am using syslog under channel it logs.

Any ideea?
 
Old 12-21-2010, 09:13 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

Your configuration for logging looks ok. Check if the file is open by the bind user:
Code:
lsof|grep bind.log
Also what gives
Code:
rndc status|grep query
If it's set to OFF, run
Code:
rndc querylog
to set it to ON again

Regards
 
Old 12-21-2010, 09:51 AM   #3
ddaas
Member
 
Registered: Oct 2004
Location: Romania
Distribution: Ubuntu server, FreeBsd
Posts: 474

Original Poster
Rep: Reputation: 30
lsof doesn't return anything. I think here is the problem. But what?

But I have:
Code:
# rndc status
version: 9.7.1-P2
CPUs found: 2
worker threads: 2
number of zones: 33
debug level: 0
xfers running: 0
xfers deferred: 0
soa queries in progress: 0
query logging is ON
recursive clients: 0/0/1000
tcp clients: 0/100
server is up and running
then:
Code:
ls -l /var/log/bind.log 
-rw-r----- 1 bind bind 1 2010-12-21 15:31 /var/log/bind.log


and

Code:
 ps -ef  | grep named
bind      2723     1  0 15:58 ?        00:00:00 /usr/sbin/named -u bind
root      3502  3454  0 17:50 pts/0    00:00:00 grep --color=auto named
 
Old 12-21-2010, 10:17 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Since you're running ubuntu, it could be an apparmor problem.
Take a look at the last paragraph here

Regards
 
Old 12-21-2010, 01:43 PM   #5
ddaas
Member
 
Registered: Oct 2004
Location: Romania
Distribution: Ubuntu server, FreeBsd
Posts: 474

Original Poster
Rep: Reputation: 30
You are right.
I found this.
Quote:
apparmor_status
apparmor module is loaded.
6 profiles are loaded.
6 profiles are in enforce mode.
/sbin/dhclient3
/usr/lib/NetworkManager/nm-dhcp-client.action
/usr/lib/connman/scripts/dhclient-script
/usr/sbin/mysqld
/usr/sbin/named
/usr/sbin/tcpdump
0 profiles are in complain mode.
2 processes have profiles defined.
2 processes are in enforce mode :
/usr/sbin/mysqld (817)
/usr/sbin/named (806)
0 processes are in complain mode.
0 processes are unconfined but have a profile defined.
I'm not confident at the moment with AppArmor so I will learn about it first.
When I solve the problem I post the solution here.

Thank you
 
Old 12-21-2010, 02:12 PM   #6
ddaas
Member
 
Registered: Oct 2004
Location: Romania
Distribution: Ubuntu server, FreeBsd
Posts: 474

Original Poster
Rep: Reputation: 30
Solved

Here is the solution https://lists.isc.org/pipermail/bind...ry/078473.html

Thank you !
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
BIND9 help twlilinux Linux - Server 9 06-19-2008 03:14 PM
a little help with BIND9 rockmanchile Debian 3 05-22-2007 06:40 PM
Logging in and logging out of a server in a script frankie_DJ Linux - Newbie 4 01-27-2007 11:03 PM
Bind9 tandre Linux - Software 1 04-08-2003 09:29 AM
using red-carpet without logging out and logging as root. packman Linux - Software 1 12-09-2002 02:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration