LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-29-2011, 11:23 PM   #1
windstory
Member
 
Registered: Nov 2008
Posts: 486

Rep: Reputation: 36
named-checkconf has errors, but Starting named: FAILED


named-checkconf has errors, but Starting named: FAILED

I solved "named-checonf" problem at thread "named-checkconf has errors" http://www.linuxquestions.org/questi...errors-916132/.

But "service named start" has failed.


Code:
[root@localhost bin]# service named start
Starting named:                                            [FAILED]
Please let me know what's problem and how to solve it.

Thanks in advance.
 
Old 11-30-2011, 01:08 AM   #2
fukawi1
Member
 
Registered: Apr 2009
Location: Melbourne
Distribution: Fedora & CentOS
Posts: 854

Rep: Reputation: 190Reputation: 190
check the logs...
most likely /var/log/messages
 
1 members found this post helpful.
Old 11-30-2011, 07:19 AM   #3
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
fukawi1/ here.

Quote:
localhost named[2912]: starting BIND 9.7.3-P3-RedHat-9.7.3-2.el6_1.P3.3 -u named -t /var/named/chroot
localhost named[2912]: built with '--build=i386-redhat-linux-gnu' '--host=i386-redhat-linux-gnu' '--target=i686-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-libtool' '--localstatedir=/var' '--enable-threads' '--enable-ipv6' '--with-pic' '--disable-static' '--disable-openssl-version-check' '--with-dlz-ldap=yes' '--with-dlz-postgres=yes' '--with-dlz-mysql=yes' '--with-dlz-filesystem=yes' '--with-gssapi=yes' '--disable-isc-spnego' '--with-docbook-xsl=/usr/share/sgml/docbook/xsl-stylesheets' 'build_alias=i386-redhat-linux-gnu' 'host_alias=i386-redhat-linux-gnu' 'target_alias=i686-redhat-linux-gnu' 'CFLAGS= -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables' 'CPPFLAGS= -DDIG_SIGCHASE'
localhost named[2912]: adjusted limit on open files from 1024 to 1048576
localhost named[2912]: found 2 CPUs, using 2 worker threads
localhost named[2912]: using up to 4096 sockets
localhost named[2912]: loading configuration from '/etc/named.conf'
localhost named[2912]: /etc/named.conf:22: open: /etc/rndc.key: permission denied
localhost named[2912]: loading configuration: permission denied
localhost named[2912]: exiting (due to fatal error)
Two questions.

1. '/etc/named.conf', but 'service start' searches '/var/named/chroot/etc/named.conf'.
2. '/etc/rndc.key: permission denied'
 
Old 11-30-2011, 08:39 AM   #4
aazkan
Member
 
Registered: Jan 2008
Posts: 72

Rep: Reputation: 5
Hi,

You're probably using bind-chroot.
Could you check if /etc/named.conf is symbolic link to /var/named/chroot/etc/named.conf?

Aslo make sure

/var/named/chroot/etc is owned recursively by user and group bind
 
Old 11-30-2011, 08:47 AM   #5
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,194
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
can you post your named.conf file

Code:
#cat /etc/named.conf
and check if there is any named.conf inside /var/named/chroot/etc/

because it is never there by default as you need to copy it from its default location

either to /etc/ or /var/named/chroot/etc
 
Old 11-30-2011, 10:21 AM   #6
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
aazkan/ I hace a file named.conf inside /var/named/chroot/etc/

"/var/named/chroot/etc is owned recursively by user and group bind", I could not understand.

deep27ak/

This is /etc/named.conf.

Code:
options {
	directory "/var/named";
};
controls {
        inet 127.0.0.1 allow { localhost; } keys { "rndc-key"; };
};
// Add local zone definitions here.
zone "myserver.dyndns.org" IN {
        type master;
        file "dmupgrade.dyndns.org.zone";
        allow-update { key "rndc-key"; };
        notify yes;
};
zone "0.168.192.in-addr.arpa" IN {
        type master;
        file "0.168.192.in-addr.arpa.zone";
        allow-update { key "rndc-key"; };
        notify yes;
};
include "/etc/rndc.key";
At "/var/named/chroot/etc", there is "named.conf".

Last edited by windstory; 11-30-2011 at 08:32 PM.
 
Old 11-30-2011, 10:57 PM   #7
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,194
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
Code:
options {
	directory "/var/named";
};
controls {
        inet 127.0.0.1 allow { localhost; } ;
};
// Add local zone definitions here.
zone "myserver.dyndns.org" IN {
        type master;
        file "dmupgrade.dyndns.org.zone";
#        allow-update { key "rndc-key"; };
        notify yes;
};
zone "0.168.192.in-addr.arpa" IN {
        type master;
        file "0.168.192.in-addr.arpa.zone";
#       allow-update { key "rndc-key"; };
        notify yes;
};
#include "/etc/rndc.key";

Have you generated any rndc key for your bind?

If not better to comment the rndc.key statements in named.conf




make sure to take a backup before making any changes

one more question

where are all your configuration files located?
like zone files, named.rfc1912.zones and other related files??

Code:
/etc or /var/named/chroot/etc
 
Old 12-01-2011, 06:24 AM   #8
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
deep27ak/

Have you generated any rndc key for your bind? Yes.

"If not better to comment the rndc.key statements in named.conf" - I tried with your code, but browser could not open "myserver.dyndns.org".

"configuration files" are located at "/var/named/chroot/etc"

Quote:
[root@localhost etc]# ll
total 36
-rw-r--r--. 1 root root 380 Nov 2 19:08 localtime
drwxr-x---. 2 named named 4096 Nov 18 05:27 named
-rwxr-xr-x 1 named named 551 Dec 1 06:10 named.conf
-rwxr-xr-x 1 root root 551 Dec 1 06:10 named.conf~
-rwxr--r--. 1 named named 2544 Nov 18 05:27 named.iscdlv.key
-rwxr-----. 1 named named 931 Jun 21 2007 named.rfc1912.zones
-rwxr--r--. 1 named named 487 Nov 18 05:27 named.root.key
drwxr-xr-x. 3 named named 4096 Nov 29 19:01 pki
-rw-r--r-- 1 root root 77 Nov 30 07:48 rndc.key
 
Old 12-01-2011, 06:41 AM   #9
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,194
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
As per your log messages

Code:
localhost named[2912]: /etc/named.conf:22: open: /etc/rndc.key: permission denied
localhost named[2912]: loading configuration: permission denied
localhost named[2912]: exiting (due to fatal error)

line 22 shows a error but I don't see a line 22 in your named.conf as it ends in line 20

please correct me if I am wrong
 
Old 12-01-2011, 08:43 AM   #10
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
deep27ak/ I solved "/etc/rndc.key: permission denied" with "chmod 644".

And I erased thes two lines.

Quote:
// named.conf for Red Hat caching-nameserver
(last line is empty line).

And this is the named part of messages after rebooting.

Quote:
Dec 2 15:37:42 localhost named[1342]: starting BIND 9.7.3-P3-RedHat-9.7.3-2.el6_1.P3.3 -u named -t /var/named/chroot
Dec 2 15:37:42 localhost named[1342]: built with '--build=i386-redhat-linux-gnu' '--host=i386-redhat-linux-gnu' '--target=i686-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-libtool' '--localstatedir=/var' '--enable-threads' '--enable-ipv6' '--with-pic' '--disable-static' '--disable-openssl-version-check' '--with-dlz-ldap=yes' '--with-dlz-postgres=yes' '--with-dlz-mysql=yes' '--with-dlz-filesystem=yes' '--with-gssapi=yes' '--disable-isc-spnego' '--with-docbook-xsl=/usr/share/sgml/docbook/xsl-stylesheets' 'build_alias=i386-redhat-linux-gnu' 'host_alias=i386-redhat-linux-gnu' 'target_alias=i686-redhat-linux-gnu' 'CFLAGS= -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i686 -mtune=atom -fasynchronous-unwind-tables' 'CPPFLAGS= -DDIG_SIGCHASE'
Dec 2 15:37:42 localhost named[1342]: adjusted limit on open files from 1024 to 1048576
Dec 2 15:37:42 localhost named[1342]: found 2 CPUs, using 2 worker threads
Dec 2 15:37:42 localhost named[1342]: using up to 4096 sockets
Dec 2 15:37:42 localhost named[1342]: loading configuration from '/etc/named.conf'
Dec 2 15:37:42 localhost named[1342]: using default UDP/IPv4 port range: [1024, 65535]
Dec 2 15:37:42 localhost named[1342]: using default UDP/IPv6 port range: [1024, 65535]
Dec 2 15:37:42 localhost named[1342]: listening on IPv4 interface lo, 127.0.0.1#53
Dec 2 15:37:42 localhost named[1342]: listening on IPv4 interface eth0, 192.168.0.4#53
Dec 2 15:37:42 localhost named[1342]: generating session key for dynamic DNS
Dec 2 15:37:42 localhost named[1342]: set up managed keys zone for view _default, file 'dynamic/managed-keys.bind'
Dec 2 15:37:42 localhost named[1342]: automatic empty zone: 0.IN-ADDR.ARPA
Dec 2 15:37:42 localhost named[1342]: automatic empty zone: 127.IN-ADDR.ARPA
Dec 2 15:37:42 localhost named[1342]: automatic empty zone: 254.169.IN-ADDR.ARPA
Dec 2 15:37:42 localhost named[1342]: automatic empty zone: 2.0.192.IN-ADDR.ARPA
Dec 2 15:37:42 localhost named[1342]: automatic empty zone: 100.51.198.IN-ADDR.ARPA
Dec 2 15:37:42 localhost named[1342]: automatic empty zone: 113.0.203.IN-ADDR.ARPA
Dec 2 15:37:42 localhost named[1342]: automatic empty zone: 255.255.255.255.IN-ADDR.ARPA
Dec 2 15:37:42 localhost named[1342]: automatic empty 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.0.IP6.ARPA
Dec 2 15:37:42 localhost named[1342]: automatic empty zone: 1.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
Dec 2 15:37:42 localhost named[1342]: automatic empty zone: D.F.IP6.ARPA
Dec 2 15:37:42 localhost named[1342]: automatic empty zone: 8.E.F.IP6.ARPA
Dec 2 15:37:42 localhost named[1342]: automatic empty zone: 9.E.F.IP6.ARPA
Dec 2 15:37:42 localhost named[1342]: automatic empty zone: A.E.F.IP6.ARPA
Dec 2 15:37:42 localhost named[1342]: automatic empty zone: B.E.F.IP6.ARPA
Dec 2 15:37:42 localhost named[1342]: automatic empty zone: 8.B.D.0.1.0.0.2.IP6.ARPA
Dec 2 15:37:42 localhost named[1342]: command channel listening on 127.0.0.1#953
Dec 2 15:37:42 localhost named[1342]: zone 0.168.192.in-addr.arpa/IN: loaded serial 7
Dec 2 15:37:42 localhost named[1342]: zone myserver.dyndns.org/IN: loaded serial 2011112902
Dec 2 15:37:42 localhost named[1342]: managed-keys-zone ./IN: loading from master file dynamic/managed-keys.bind failed: file not found
Dec 2 15:37:42 localhost named[1342]: managed-keys-zone ./IN: loaded serial 0
Dec 2 15:37:42 localhost named[1342]: running
Dec 2 15:37:42 localhost named[1342]: zone 0.168.192.in-addr.arpa/IN: sending notifies (serial 7)
Dec 2 15:37:42 localhost named[1342]: zone myserver.dyndns.org/IN: sending notifies (serial 2011112902)
 
Old 12-01-2011, 08:48 AM   #11
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,194
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
Quote:
Originally Posted by windstory View Post
deep27ak/ I solved "/etc/rndc.key: permission denied" with "chmod 644".

And I erased thes two lines.


(last line is empty line).

And this is the named part of messages after rebooting.
But as per your last post

Code:
-rw-r--r-- 1 root root 77 Nov 30 07:48 rndc.key
rndc.key is already having 644 ??

quite surprised??
 
1 members found this post helpful.
Old 12-01-2011, 09:47 AM   #12
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
deep27ak/ Yes, yesterday I did by googling.

At now I am finding the answer of this problem.

Quote:
managed-keys-zone ./IN: loading from master file dynamic/managed-keys.bind failed: file not found
I find this link - http://www.selfcai.com.cn/?p=1502 -, but the result is this.

Quote:
[root@localhost Documents]# touch /usr/local/bind/managed-keys.bind
touch: cannot touch `/usr/local/bind/managed-keys.bind': No such file or directory
I tried to make empty file, but failed.

Quote:
[root@localhost Documents]# cd /usr/local/bind
bash: cd: /usr/local/bind: No such file or directory

Last edited by windstory; 12-01-2011 at 09:50 AM.
 
Old 12-01-2011, 11:09 PM   #13
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,194
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
Please don't mind my questions, Just trying to learn

Actually I am still not able to understand the resolution

As far as I know by default the bind is in

Code:
/usr/share/doc/bind-x.x
and I have also never worked with rndc.key so how come you were able to overcome the error?
 
1 members found this post helpful.
Old 12-02-2011, 12:54 AM   #14
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
deep27ak/

Quote:
and I have also never worked with rndc.key so how come you were able to overcome the error?
I am very sorry but I could not know.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] named-checkconf has errors windstory Linux - Newbie 10 11-29-2011 04:42 AM
Errors starting Named jester_69 Linux - Server 3 01-19-2011 09:22 AM
(bind) named: couldn't open pid file '/var/run/named/named.pid' - any help? samengr Linux - Server 6 04-01-2009 07:22 AM
file /var/lib/named/var/named/reverse/named.zero failed: file not found Toadman Linux - Software 15 03-18-2009 08:01 PM
chown -R named:named /var/named crash the system? joangopan Fedora 2 09-09-2007 03:46 AM


All times are GMT -5. The time now is 04:55 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration