can not get named started in CentOS5.4

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
seeRpea
Posts: 36
Joined: 2007/05/02 17:45:47
Contact:

can not get named started in CentOS5.4

Post by seeRpea » 2010/05/16 23:33:24

using bind-9.3.6-4.P1.el5_4.2
and bind-chroot-9.3.6-4.P1.el5_4.2
[code]
[root@rh5 etc]# /sbin/service named start
Starting named: [FAILED]
[root@rh5 etc]# tail /var/log/messages
May 16 16:13:05 rh5 named[4090]: using default UDP/IPv4 port range: [1024, 65535]
May 16 16:13:05 rh5 named[4090]: using default UDP/IPv6 port range: [1024, 65535]
May 16 16:13:05 rh5 named[4090]: listening on IPv4 interface lo, 127.0.0.1#53
May 16 16:13:05 rh5 named[4090]: listening on IPv4 interface virbr0, 192.168.122.1#53
May 16 16:13:05 rh5 named[4090]: binding TCP socket: address in use
May 16 16:13:05 rh5 named[4090]: listening on IPv4 interface eth0, 192.168.1.115#53
May 16 16:13:05 rh5 named[4090]: could not configure root hints from '/var/named/chroot/etc/db.cache': file not found
May 16 16:13:05 rh5 named[4090]: loading configuration: file not found
May 16 16:13:05 rh5 named[4090]: exiting (due to fatal error)
[/code]
huh? but ...
[code]
[root@rh5 etc]# locate db.cache
/usr/libexec/webmin/bind8/db.cache
/usr/libexec/webmin/dnsadmin/db.cache
/var/named/chroot/etc/db.cache
[root@rh5 etc]# ls -la /var/named/chroot/etc/db.cache
-rw-r--r-- 1 named named 2940 May 13 13:24 /var/named/chroot/etc/db.cache
[root@rh5 etc]# /sbin/service named configtest
[root@rh5 etc]#
[/code]
I also did a
[code]
[root@rh5 etc]# grep chroot /etc/init.d/named
[root@rh5 etc]#
[/code]
My CentOS is :
Linux rh5.afts.com 2.6.18-194.3.1.el5xen #1 SMP Thu May 13 13:49:53 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

So what is misconfigured?

if it helps, I also can not get spamd to start.
[code]
[root@rh5 etc]# /sbin/service spamd start
spamd: unrecognized service
[root@rh5 etc]# /sbin/service spamassassin start
Starting spamd: child process [4173] exited or timed out without signaling production of a PID file: exit 255 at /usr/bin/spamd line 2588.
[FAILED]
[/code]

chuina
Posts: 355
Joined: 2009/12/11 10:25:56

Re: can not get named started in CentOS5.4

Post by chuina » 2010/05/17 00:55:46

How did you configured named ? Webmin ?
The zone files are not loading. What is the permission and ownership of those files ?

seeRpea
Posts: 36
Joined: 2007/05/02 17:45:47
Contact:

Re: can not get named started in CentOS5.4

Post by seeRpea » 2010/05/17 16:10:37

I have not used webmin for named yet.

I followed the instructions in bugzilla and did a
[code]
cp /usr/share/doc/bind-9.3.6/sample/var/named/* /var/named/chroot/var/named
chown -R named:named /var/named/chroot/var/named/*
[/code]
[code]
-rw-r--r-- 1 named named 198 May 17 08:53 localdomain.zone
-rw-r--r-- 1 named named 195 May 17 08:53 localhost.zone
-rw-r--r-- 1 named named 56 May 17 08:56 my.external.zone.db
-rw-r--r-- 1 named named 56 May 17 08:56 my.internal.zone.db
-rw-r--r-- 1 named named 427 May 17 08:56 named.broadcast
-rw-r--r-- 1 named named 424 May 17 08:56 named.ip6.local
-rw-r--r-- 1 named named 426 May 17 08:56 named.local
-rw-r--r-- 1 named named 1892 May 17 08:56 named.root
-rw-r--r-- 1 named named 427 May 17 08:56 named.zero
[/code]

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: can not get named started in CentOS5.4

Post by TrevorH » 2010/05/17 16:26:53

What do you have in your /var/named/chroot/etc/named.conf for the zone "." IN entry? It should say something like

[code]
file "etc/db.cache"
[/code]

i.e. it needs to be relative to /var/named/chroot and not include that path in it (or it'll end up looking in /var/named/chroot/var/named/chroot).

seeRpea
Posts: 36
Joined: 2007/05/02 17:45:47
Contact:

Re: can not get named started in CentOS5.4

Post by seeRpea » 2010/05/17 16:38:34

[quote]
TrevorH wrote:
What do you have in your /var/named/chroot/etc/named.conf for the zone "." IN entry? It should say something like

[code]
file "etc/db.cache"
[/code]

i.e. it needs to be relative to /var/named/chroot and not include that path in it (or it'll end up looking in /var/named/chroot/var/named/chroot).[/quote]

ok, i changed it from /var/named/chroot/etc/db.cache to etc/db.cache

still does not work :(
[code]
May 17 09:35:25 rh5 named[3869]: starting BIND 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 -u named -D -t /var/named/chroot
May 17 09:35:25 rh5 named[3869]: adjusted limit on open files from 1024 to 1048576
May 17 09:35:25 rh5 named[3869]: found 2 CPUs, using 2 worker threads
May 17 09:35:25 rh5 named[3869]: using up to 4096 sockets
May 17 09:35:25 rh5 named[3869]: loading configuration from '/etc/named.conf'
May 17 09:35:25 rh5 named[3869]: using default UDP/IPv4 port range: [1024, 65535]
May 17 09:35:25 rh5 named[3869]: using default UDP/IPv6 port range: [1024, 65535]
May 17 09:35:25 rh5 named[3869]: listening on IPv4 interface lo, 127.0.0.1#53
May 17 09:35:25 rh5 named[3869]: listening on IPv4 interface virbr0, 192.168.122.1#53
May 17 09:35:25 rh5 named[3869]: binding TCP socket: address in use
May 17 09:35:25 rh5 named[3869]: listening on IPv4 interface eth0, 192.168.1.115#53
May 17 09:35:25 rh5 named[3869]: could not configure root hints from 'etc/db.cache': file not found
May 17 09:35:25 rh5 named[3869]: loading configuration: file not found
May 17 09:35:25 rh5 named[3869]: exiting (due to fatal error)
[/code]
here is cat /var/named/chroot/etc/named.conf

[code]
options {
directory "/etc";
pid-file "/var/run/named/named.pid";
};

zone "." {
type hint;
file "etc/db.cache";
};

key rndc-key {
algorithm hmac-md5;
secret "7tNVkfQHML56bRDmg3IoWw==";
};
controls {
inet 127.0.0.1 port 953 allow { 127.0.0.1; } keys { rndc-key; };
};
[/code]

[Moderator edited to add [i]code[/i] tags to preserve the formatting.]

seeRpea
Posts: 36
Joined: 2007/05/02 17:45:47
Contact:

Re: can not get named started in CentOS5.4

Post by seeRpea » 2010/05/17 19:11:07

I have too many things not working.
named, spamd, NIC, the dns settings not related to named, SELinux and probably some more items I just have not gotten around to.
I am going to reinstall CentOS5.4 [ 3rd try :( ], this time leaving out chroot and SELinux.
If this doesn't work then I am just going to give up on CentOS.

User avatar
TrevorH
Site Admin
Posts: 33218
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: can not get named started in CentOS5.4

Post by TrevorH » 2010/05/17 19:53:36

Since you have a named.root file in that directory I suspect that you should be pointing at that instead. i.e.
[code]
file "etc/named.root"
[/code]

Reinstalling will not help if you are making configuration errors that stop these things from running.

seeRpea
Posts: 36
Joined: 2007/05/02 17:45:47
Contact:

Re: can not get named started in CentOS5.4

Post by seeRpea » 2010/05/17 20:02:19

[quote]
TrevorH wrote:
Since you have a named.root file in that directory I suspect that you should be pointing at that instead. i.e.
[code]
file "etc/named.root"
[/code]

Reinstalling will not help if you are making configuration errors that stop these things from running.[/quote]

Read the whole thread.
The situation is absurd, they refuse to document the changes and what is needed to make it work. Instead they write 'depend on this bug entry'.
It is also absurd that I could not get the DNS lookup to be functional without having to go into the GUI interface to make changes to the NIC setting. Even though the DNS informatin is present the whole time.
Add in the spamassassin not functioning and Lord knows what else, I am losing my patience with CentOS. If it is not going to work "out-of-box" then it should say so right up front and inform installers on what needs to be changed and why. Why there is not an installation script to take care of these things is annoying.

r_hartman
Posts: 711
Joined: 2009/03/23 15:08:11
Location: Netherlands
Contact:

Re: can not get named started in CentOS5.4

Post by r_hartman » 2010/05/18 11:35:11

"I am losing my patience with CentOS"

Ranting will not help if you don't know what you're doing.
And it's not going to promote willingness of the volunteers on this forum to assist you.

hi_vkkadam
Posts: 74
Joined: 2007/11/05 16:08:34
Location: Pune

Re: can not get named started in CentOS5.4

Post by hi_vkkadam » 2010/05/18 12:46:42

Hi,
My suggestion is to use

1) bind
2) caching-nameserver


'use "caching-nameserver" instead of "bind-chroot" '

delete the bind-chroot and install the 'caching-nameserver'
and see the result , it will solve your lots of problems.

Thanks

Vijay kadam

Post Reply