Linux – BIND9 failing to start

bindlinux

(resolved: AppArmor was the reason of that failure. I just run: aa-logprof and restarted bind)

I added second interface to my server

and after I restarted my server I have found out that BIND is not starting.

If I try: sudo /etc/init.d/bind9 restart
I'm. getting

 * Stopping domain name service... bind9
    rndc: connect failed: 127.0.0.1#953: connection refused
                                                               [ OK ]
 * Starting domain name service... bind9
                                                               [fail]

contents from /var/log/syslog:

Aug 12 15:50:36 server1 named[1127]: configuring TKEY: failure
Aug 12 15:50:36 server1 named[1127]: loading configuration: failure
Aug 12 15:50:36 server1 named[1127]: exiting (due to fatal error)
Aug 12 15:50:36 server1 kernel: [   38.746404] type=1400 audit(1313142636.718:15): apparmor="DENIED" operation="file_lock" parent=1126 profile="/usr/sbin/named" name="/usr/local/samba/private/dns.keytab" pid=1128 comm="named" requested_mask="k" denied_mask="k" fsuid=103 ouid=103

However I think the problem is not coming from the second interface as I removed it and rebooted. Having the same issue.

Best Answer

AppArmor was the reason of that failure. He just ran: aa-logprof and restarted bind.

(Blatently stolen from the Question, but he didn't post it as an answer)