Bug 201090 - named does not start because of missing /etc/named.conf
Summary: named does not start because of missing /etc/named.conf
Keywords:
Status: CLOSED DUPLICATE of bug 202593
Alias: None
Product: Fedora
Classification: Fedora
Component: bind
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Martin Stransky
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-08-02 19:16 UTC by Jurgen Kramer
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-08-17 11:03:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
named.conf was not found... (32.31 KB, image/png)
2006-11-03 08:26 UTC, Baif
no flags Details

Description Jurgen Kramer 2006-08-02 19:16:09 UTC
Description of problem:
Starting named fails because of missing config /etc/named.conf

Version-Release number of selected component (if applicable):
bind-config-9.3.2-34.fc6
bind-9.3.2-34.fc6
bind-libs-9.3.2-34.fc6
bind-utils-9.3.2-34.fc6

How reproducible:
always

Steps to Reproduce:
1. start named
2.
3.
  
Actual results:
02-Aug-2006 21:22:02.262 starting BIND 9.3.2 -g
02-Aug-2006 21:22:02.263 found 2 CPUs, using 2 worker threads
02-Aug-2006 21:22:02.267 loading configuration from '/etc/named.conf'
02-Aug-2006 21:22:02.268 none:0: open: /etc/named.conf: file not found
02-Aug-2006 21:22:02.269 loading configuration: file not found
02-Aug-2006 21:22:02.269 exiting (due to fatal error)


Expected results:
working bind ;)

Additional info:
I did not intentionally install bind, I guess some other package requires it.
/etc/named.conf is not there, /etc/named.caching-nameserver.conf is though.
Should this file be renamed?

Comment 1 Jurgen Kramer 2006-08-02 19:23:20 UTC
renaming /etc/named.caching-nameserver.conf to /etc/named.conf and a chown
root:named /etc/named.conf does not seem to do the job. Starting named through
'service named start' fails, probably due to NetworkManager probs. Starting
named with 'named -u named -g' works though.

Aug  2 21:28:39 macbook named[3539]: starting BIND 9.3.2 -u named -D
Aug  2 21:28:39 macbook named[3539]: found 2 CPUs, using 2 worker threads
Aug  2 21:28:39 macbook named[3539]: loading configuration from '/etc/named.conf'
Aug  2 21:28:39 macbook named[3539]: listening on IPv6 interface lo, ::1#53
Aug  2 21:28:39 macbook named[3539]: listening on IPv4 interface lo, 127.0.0.1#53
Aug  2 21:28:39 macbook named[3539]: command channel listening on 127.0.0.1#953
Aug  2 21:28:39 macbook named[3539]: command channel listening on ::1#953
Aug  2 21:28:39 macbook named[3539]: zone 0.in-addr.arpa/IN/localhost_resolver:
loaded serial 42
Aug  2 21:28:39 macbook named[3539]: zone
0.0.127.in-addr.arpa/IN/localhost_resolver: loaded serial 1997022700
Aug  2 21:28:39 macbook named[3539]: zone
255.in-addr.arpa/IN/localhost_resolver: loaded serial 42
Aug  2 21:28:39 macbook named[3539]: zone
0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN/localhost_resolver:
loaded serial 1997022700
Aug  2 21:28:39 macbook named[3539]: zone localdomain/IN/localhost_resolver:
loaded serial 42
Aug  2 21:28:39 macbook named[3539]: zone localhost/IN/localhost_resolver:
loaded serial 42
Aug  2 21:28:39 macbook NetworkManager: <WARNING>        add_ip4_config_to_named
(): Could not set forwarders for zone '.'.  Error: 'Message did not receive a
reply (timeout by message bus)'. 


Comment 2 Martin Stransky 2006-08-03 11:08:45 UTC
Do you have the caching-nameserver package installed?

Comment 3 Jurgen Kramer 2006-08-03 17:24:53 UTC
The caching-nameserver package is not installed:

[root@macbook ~]# rpm -qa "cach*"
[root@macbook ~]# yum list "caching*"
Setting up repositories
development               100% |=========================| 1.1 kB    00:00     
livna                     100% |=========================|  951 B    00:00     
extras-development        100% |=========================| 1.1 kB    00:00     
Reading repository metadata in from local files
primary.xml.gz            100% |=========================| 820 kB    00:04     
################################################## 2225/2225
primary.xml.gz            100% |=========================| 997 kB    00:05     
################################################## 3112/3112

The package can not even be found (I also checked a mirror FTP site). Did the
name of the package change?

Comment 4 Martin Stransky 2006-08-04 13:30:17 UTC
Could you please attach output of "rpm -qa | grep bind"?
Do you have /etc/named.caching-nameserver.conf and /etc/named.rfc1912.zones
symlinks?

Comment 5 Jurgen Kramer 2006-08-04 14:18:25 UTC
OK, but this is the same list as listed in the initial report:

[root@macbook ~]# rpm -qa "bind*"
bind-config-9.3.2-34.fc6
bind-9.3.2-34.fc6
bind-libs-9.3.2-34.fc6
bind-utils-9.3.2-34.fc6

[root@macbook ~]# ls -al /etc/named.*
-rw-r----- 1 root named 1086 Jul 24 21:01 /etc/named.caching-nameserver.conf
-rw-r----- 1 root named 1086 Aug  2 21:25 /etc/named.conf
-rw-r----- 1 root named  948 Jul 24 21:01 /etc/named.rfc1912.zones

The named.conf is a copy of named.caching-namesever.conf made by me trying to
get things working.

Comment 6 Martin Stransky 2006-08-04 15:01:43 UTC
Plase remove the /etc/named.conf file (it isn't necessary), run "service named
start" and attach output from /var/log/messages. Bind is configured by default
to use the /etc/named.caching-nameserver.conf config file.

There should be somethink like "starting BIND 9.3.2 -u named -c
/etc/named.caching-nameserver.conf -t /var/named/chroot"

btw. You may install the bind-chroot package.

Comment 7 Jurgen Kramer 2006-08-04 17:00:06 UTC
Aug  4 19:00:15 macbook named[3827]: starting BIND 9.3.2 -u named -c
/etc/named.caching-nameserver.conf -D
Aug  4 19:00:15 macbook named[3827]: found 2 CPUs, using 2 worker threads
Aug  4 19:00:15 macbook named[3827]: loading configuration from
'/etc/named.caching-nameserver.conf'
Aug  4 19:00:15 macbook named[3827]: listening on IPv6 interface lo, ::1#53
Aug  4 19:00:15 macbook named[3827]: listening on IPv4 interface lo, 127.0.0.1#53
Aug  4 19:00:15 macbook named[3827]: command channel listening on 127.0.0.1#953
Aug  4 19:00:15 macbook named[3827]: command channel listening on ::1#953
Aug  4 19:00:15 macbook named[3827]: zone 0.in-addr.arpa/IN/localhost_resolver:
loaded serial 42
Aug  4 19:00:15 macbook named[3827]: zone
0.0.127.in-addr.arpa/IN/localhost_resolver: loaded serial 1997022700
Aug  4 19:00:15 macbook named[3827]: zone
255.in-addr.arpa/IN/localhost_resolver: loaded serial 42
Aug  4 19:00:15 macbook named[3827]: zone
0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN/localhost_resolver:
loaded serial 1997022700
Aug  4 19:00:15 macbook named[3827]: zone localdomain/IN/localhost_resolver:
loaded serial 42
Aug  4 19:00:15 macbook named[3827]: zone localhost/IN/localhost_resolver:
loaded serial 42
Aug  4 19:00:15 macbook NetworkManager: <WARNING>        add_ip4_config_to_named
(): Could not set forwarders for zone '.'.  Error: 'Message did not receive a
reply (timeout by message bus)'. 

OK, starting /etc/named.caching-nameserver.conf works at first but it dies at
the end. Installing bind-chroot did not solve the problem.

Is this a NetworkManager problem? I will try again without NetworkManager being
started.


Comment 8 Jurgen Kramer 2006-08-04 17:05:01 UTC
Alright, I tried again with NetworkManager disabled:

Aug  4 19:10:25 macbook named[4155]: starting BIND 9.3.2 -u named -c
/etc/named.caching-nameserver.conf -D -t /var/named/chroot
Aug  4 19:10:25 macbook named[4155]: found 2 CPUs, using 2 worker threads
Aug  4 19:10:25 macbook named[4155]: loading configuration from
'/etc/named.caching-nameserver.conf'
Aug  4 19:10:25 macbook named[4155]: listening on IPv6 interface lo, ::1#53
Aug  4 19:10:25 macbook named[4155]: listening on IPv4 interface lo, 127.0.0.1#53
Aug  4 19:10:25 macbook named[4155]: command channel listening on 127.0.0.1#953
Aug  4 19:10:25 macbook named[4155]: command channel listening on ::1#953
Aug  4 19:10:25 macbook named[4155]: zone 0.in-addr.arpa/IN/localhost_resolver:
loaded serial 42
Aug  4 19:10:25 macbook named[4155]: zone
0.0.127.in-addr.arpa/IN/localhost_resolver: loaded serial 1997022700
Aug  4 19:10:25 macbook named[4155]: zone
255.in-addr.arpa/IN/localhost_resolver: loaded serial 42
Aug  4 19:10:25 macbook named[4155]: zone
0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN/localhost_resolver:
loaded serial 1997022700
Aug  4 19:10:25 macbook named[4155]: zone localdomain/IN/localhost_resolver:
loaded serial 42
Aug  4 19:10:25 macbook named[4155]: zone localhost/IN/localhost_resolver:
loaded serial 42
Aug  4 19:10:26 macbook named[4155]: D-BUS dhcdbd subscription enabled.
Aug  4 19:10:26 macbook named[4155]: D-BUS service enabled.
Aug  4 19:10:26 macbook named[4155]: running

NetworkManager bug of bind bug?
Starting NetworkManager after starting bind seems to kill bind again.


Comment 9 Jurgen Kramer 2006-08-04 17:09:20 UTC
The saga continues, with NetworkManager disabled, bind seems to be running ok
but....selinux prevents it from running correctly:

audit(1154711493.966:6): avc:  denied  { read } for  pid=4254 comm="rndc"
name="rndc.key" dev=dm-0 ino=6522775 scontext=user_u:system_r:ndc_t:s0
tcontext=system_u:object_r:dnssec_t:s0 tclass=lnk_file
audit(1154711504.971:7): avc:  denied  { read } for  pid=4277 comm="rndc"
name="rndc.key" dev=dm-0 ino=6522775 scontext=user_u:system_r:ndc_t:s0
tcontext=system_u:object_r:dnssec_t:s0 tclass=lnk_file
audit(1154711722.572:8): avc:  denied  { read } for  pid=4379 comm="rndc"
name="rndc.key" dev=dm-0 ino=6522775 scontext=user_u:system_r:ndc_t:s0
tcontext=system_u:object_r:dnssec_t:s0 tclass=lnk_file
audit(1154711744.454:9): avc:  denied  { read } for  pid=4417 comm="rndc"
name="rndc.key" dev=dm-0 ino=6522775 scontext=user_u:system_r:ndc_t:s0
tcontext=system_u:object_r:dnssec_t:s0 tclass=lnk_file
audit(1154711746.766:10): avc:  denied  { read } for  pid=4440 comm="rndc"
name="rndc.key" dev=dm-0 ino=6522775 scontext=user_u:system_r:ndc_t:s0
tcontext=system_u:object_r:dnssec_t:s0 tclass=lnk_file
audit(1154711751.318:11): avc:  denied  { read } for  pid=4502 comm="rndc"
name="rndc.key" dev=dm-0 ino=6522775 scontext=user_u:system_r:ndc_t:s0
tcontext=system_u:object_r:dnssec_t:s0 tclass=lnk_file

I will file a separate bug for this.

[root@macbook ~]# service named status
rndc: neither /etc/rndc.conf nor /etc/rndc.key was found


Comment 10 Martin Stransky 2006-08-10 06:56:03 UTC
(In reply to comment #9)
> The saga continues, with NetworkManager disabled, bind seems to be running ok
> but....selinux prevents it from running correctly:
> 
> audit(1154711751.318:11): avc:  denied  { read } for  pid=4502 comm="rndc"
> name="rndc.key" dev=dm-0 ino=6522775 scontext=user_u:system_r:ndc_t:s0
> tcontext=system_u:object_r:dnssec_t:s0 tclass=lnk_file
> 
> I will file a separate bug for this.
> 
> [root@macbook ~]# service named status
> rndc: neither /etc/rndc.conf nor /etc/rndc.key was found

It looks like a problem in your configuration... I've just checked fresh devel
installation and bind works fine out of the box (with SE Linux targeted policy).
Do you have up-to-date selinux policies and which policy do you use?

You must have these files:

-rw-r-----  root named system_u:object_r:named_conf_t   /etc/rndc.conf
-rw-r-----  root named system_u:object_r:dnssec_t       /etc/rndc.key

I think you should reinstall your system....

Comment 11 Jurgen Kramer 2006-08-10 20:05:16 UTC
ls /etc/rndc.* -alZ
lrwxrwxrwx  root named system_u:object_r:dnssec_t       /etc/rndc.key ->
/var/named/chroot//etc/rndc.key

rndc.key is there.

I reinstalled all bind parts, same result. I will try a fresh install tomorrow.


Comment 12 Martin Stransky 2006-08-16 15:08:43 UTC
You're right, I can reproduce it.

Comment 13 Martin Stransky 2006-08-17 11:03:14 UTC

*** This bug has been marked as a duplicate of 202593 ***

Comment 14 Jurgen Kramer 2006-08-17 21:57:46 UTC
bug 201090 a duplicate of bug 202593???? probably the other way around. but alas...

 You are not authorized to access bug #202593.

nice :(

Comment 15 Martin Stransky 2006-08-18 05:33:47 UTC
Don't worry and feel free to add any comments here.

Comment 16 Baif 2006-11-03 08:22:42 UTC
named.conf???????
Where????????????


[root@xenfc601 etc]# ll /var/named/chroot/etc/named.conf
ls: /var/named/chroot/etc/named.conf: No such file or directory
[root@xenfc601 etc]# rpm -qf /var/named/chroot/etc/named.conf
bind-chroot-9.3.3-4.fc6
caching-nameserver-9.3.3-4.fc6
[root@xenfc601 etc]# rpm -ql bind-chroot
/var/named/chroot
/var/named/chroot/dev
/var/named/chroot/etc
/var/named/chroot/var
/var/named/chroot/var/named
/var/named/chroot/var/named/data
/var/named/chroot/var/named/slaves
/var/named/chroot/var/run
/var/named/chroot/var/run/named
/var/named/chroot/var/tmp
[root@xenfc601 etc]# rpm -ql caching-nameserver
/etc/named.caching-nameserver.conf
/etc/named.rfc1912.zones
/usr/share/doc/caching-nameserver-9.3.3
/usr/share/doc/caching-nameserver-9.3.3/Copyright
/usr/share/doc/caching-nameserver-9.3.3/rfc1912.txt
/var/named/localdomain.zone
/var/named/localhost.zone
/var/named/named.broadcast
/var/named/named.ca
/var/named/named.ip6.local
/var/named/named.local
/var/named/named.zero
[root@xenfc601 etc]#

Comment 17 Baif 2006-11-03 08:26:11 UTC
Created attachment 140224 [details]
named.conf was not found...

named.conf was not found...


Note You need to log in before you can comment on or make changes to this bug.