LinuxQuestions.org
Review your favorite Linux distribution.
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 04-05-2012, 01:46 PM   #1
windstory
Member
 
Registered: Nov 2008
Posts: 486

Rep: Reputation: 36
error at named-checkconf -z


My box is scietific linux 6.2 x64.

This is the error message of "named-checkconf -z"

Quote:
[root@linux Documents]# ls -al /var/named/chroot/etc
total 52
drwxr-x---. 4 named named 4096 Apr 6 01:22 .
drwxr-x---. 6 root named 4096 Dec 11 11:07 ..
-rw-r--r--. 1 root root 380 Nov 2 19:08 localtime
drwxr-x---. 2 named named 4096 Dec 11 11:07 named
-rwxr-xr-x. 1 named named 549 Apr 5 15:37 named.conf
-rwxr-xr-x. 1 root root 551 Apr 5 15:37 named.conf~
-rwxr--r--. 1 named named 2544 Dec 11 11:08 named.iscdlv.key
-rwxr-----. 1 named named 931 Jun 21 2007 named.rfc1912.zones
-rwxr--r--. 1 named named 487 Dec 11 11:08 named.root.key
drwxr-xr-x. 3 named named 4096 Mar 20 21:13 pki
-rwxr--r--. 1 named named 479 Apr 6 01:22 rndc.conf
-rwxr--r--. 1 root root 479 Apr 6 01:22 rndc.conf~
-rwxr-----. 1 named named 141 Mar 20 22:27 rndc.key
[root@linux Documents]# named-checkconf -z
none:0: open: /etc/named.conf: file not found
The "/etc/named.conf is

Quote:
[root@linux Documents]# ls -al /etc/named.conf
lrwxrwxrwx. 1 root root 28 Apr 5 17:07 /etc/named.conf -> /chroot/named/etc/named.conf
Please let me know how to resolve this.

Thanks in advance.
 
Old 04-05-2012, 02:46 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,517

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
Hi,

Since you're running bind chrooted, use
Code:
named-checkconf -z -t /var/named/chroot
Regards
 
1 members found this post helpful.
Old 04-05-2012, 09:23 PM   #3
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
Thnaks, but at this time another error message comes.

Quote:
[root@linux Documents]# named -d 5 -g
.....
06-Apr-2012 10:07:04.176 could not open file '/var/run/named/named.pid': Permission denied
06-Apr-2012 10:07:04.176 unlink '/var/run/named/named.pid': failed
06-Apr-2012 10:07:04.176 generating session key for dynamic DNS
06-Apr-2012 10:07:04.176 could not open file '/var/run/named/session.key': Permission denied
06-Apr-2012 10:07:04.176 could not create /var/run/named/session.key
06-Apr-2012 10:07:04.176 failed to generate session key for dynamic DNS: permission denied
.....
 
Old 04-06-2012, 01:37 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,517

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
Hi,

Aren't you running named chrooted? If so, you need to add the "-t /var/named/chroot" when running named.
BTW how did you install bind? If you used yum, it should have sorted these things out.

Regards
 
1 members found this post helpful.
Old 04-06-2012, 01:52 AM   #5
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
Yes, I am running named chrooted, and install by yum.

The command "service named start -t /var/named/chroot" shows simillar result.

Could the re-installation of bin-chroot fix this problem?

1. backup named files - *.zone, named.conf - with "tar zcvfp" command.
2. yum remove bind-chroot
3. yum install bind-chroot
4. restore backuped named files with "tar zxvfp" command
 
Old 04-06-2012, 02:03 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,517

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
Quote:
Could the re-installation of bin-chroot fix this problem?
I guess you mean bind-chroot. I'm not using RHEL based distros, but I think you need to install all the bind related packages, not only bind-chroot to have a dns running.

Yes, you can keep your config and zone files, uninstall bind and re-install

Cheers
 
1 members found this post helpful.
Old 04-06-2012, 03:51 AM   #7
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
I re-installed named, but new problems.....

Code:
yum -y install bind*
copied *.zone to "/var/named/chroot/var/named"
chown root:named *.zone
chmod 744 *.zone
"cd /var/named/chroot/var/named"
ln -s /var/named/chroot/var/named/*.zone /var/named/"
cp named.conf /var/named/etc
cp rndc.* /var/named
then

Quote:
[root@linux named]# named -u named -g
......
06-Apr-2012 16:40:23.666 automatic empty zone: 8.B.D.0.1.0.0.2.IP6.ARPA
06-Apr-2012 16:40:23.668 command channel listening on 127.0.0.1#953
06-Apr-2012 16:40:23.668 ignoring config file logging statement due to -g option
06-Apr-2012 16:40:23.669 zone 0.168.192.in-addr.arpa/IN: loaded serial 53
06-Apr-2012 16:40:23.670 zone myserver.org/IN: loading from master file myserver.zone failed: file not found
06-Apr-2012 16:40:23.670 zone myserver.org/IN: not loaded due to errors.
06-Apr-2012 16:40:23.670 managed-keys-zone ./IN: loading from master file dynamic/managed-keys.bind failed: file not found
......
 
Old 04-06-2012, 04:28 AM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,517

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
Quote:
[root@linux named]# named -u named -g
Why are you using the command above to start named? You should use either "service named start", or "/etc/init.d/named start", so it takes care of the chroot environment.
If you insist using the command above add "-t /var/named/chroot" as already said
Also you need to check /etc/sysconfig/named if the chroot directory is defined in the ROOTDIR option
 
1 members found this post helpful.
Old 04-06-2012, 04:38 AM   #9
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
"named -u named -g" command was found at google,I understood it's for named debug.

After "service named start", I gor "failed' and the "/var.log/message" shows this.

Quote:
/etc/named.conf:22: open: /etc/rndc.key: permission denied
And "/etc/rndc.key" is;

Quote:
[root@linux named]# ls -al /etc/rndc.key
-rw-r-----. 1 root named 141 Mar 20 22:27 /etc/rndc.key
[root@linux named]# locate rndc.key
/etc/rndc.key
/var/named/chroot/etc/rndc.key
[root@linux named]# ls -al /var/named/chroot/etc/rndc.key
-rwxr-----. 1 root root 141 Mar 20 22:27 /var/named/chroot/etc/rndc.key

Last edited by windstory; 04-06-2012 at 04:42 AM.
 
Old 04-06-2012, 05:03 AM   #10
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,517

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
Quote:
"named -u named -g" command was found at google,I understood it's for named debug.
Yes using -g spits any errors on console, but since you're trying to run bind chrooted you need the -t option

Quote:
After "service named start", I gor "failed' and the "/var.log/message" shows this.

Quote:
/etc/named.conf:22: open: /etc/rndc.key: permission denied
Don't forget that for the chrooted bind everything is under /var/named/chroot. So the correct rndc.conf is /var/named/chroot/etc/rndc.key. Do a
Code:
chown root:named /var/named/chroot/etc/rndc.key
so the user named can read that file.
 
Old 04-06-2012, 06:50 AM   #11
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
"service named start -t /var/named/chroot" has ok, but still could not browse at firefox.
Quote:
The requested URL / was not found on this server.
I disabled firewall and selinux.

Quote:
[root@linux Documents]# nslookup myserver.dyndns.org
Server: 168.126.63.1
Address: 168.126.63.1#53

Non-authoritative answer:
Name: myserver.dyndns.org
Address: xxx.xxx.xx.xxx
at "/var/log/message"
Quote:
managed-keys-zone ./IN: loading from master file dynamic/managed-keys.bind failed: file not found
Code:
[root@linux Documents]# touch /var/named/dynamic/managed-keys.bind
[root@linux Documents]# ls -al /var/named/dynamic/managed-keys.bind
-rw-r--r--. 1 root root 0 Apr  6 19:35 /var/named/dynamic/managed-keys.bind
At "/var/log/httpd/error_log," this error code was produced at booting, but after "service named restart -t /var/named/chroot" there is no more error codes. But still same state.
Quote:
Apr 6 19:35:58 avahi_entry_group_add_service_strlst("servername.iptime.org") failed: Local name collision
And at "/var/named/chroot/var/log" there is nothing.
Quote:
[root@linux Documents]# ls -al /var/named/chroot/var/log
total 8
drwxrwx---. 2 named named 4096 Dec 11 11:07 .
drwxr-x---. 6 root named 4096 Apr 6 16:15 ..
 
Old 04-06-2012, 07:26 AM   #12
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,517

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
Quote:
"service named start -t /var/named/chroot" has ok, but still could not browse at firefox.
Told you that if your have setup correctly the chroot environment "service named start" is enough. Check /etc/sysconfig/named for ROOTDIR
If you're trying to access your webserver, you should use your local dns to test (see next comment)

Quote:
nslookup myserver.dyndns.org
Server: 168.126.63.1
Address: 168.126.63.1#53

Non-authoritative answer:
Name: myserver.dyndns.org
Address: xxx.xxx.xx.xxx
What you expect to see? You asked 168.126.63.1 for a dyndns.org subdomain and got a response. Is 168.126.63.1 the dns you're trying to setup? I guess xxx.xxx.xxx.xxx is your webserver.


Quote:
managed-keys-zone ./IN: loading from master file dynamic/managed-keys.bind failed: file not found
This is used by dnssec so don't bother


Quote:
And at "/var/named/chroot/var/log" there is nothing.
Unless you enable logging for bind, any logs are written most probably to /var/log/messages
 
1 members found this post helpful.
Old 04-06-2012, 11:32 AM   #13
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
Thanks a lot!

Everything works fine.

I could not find out this error at httpd.conf.

Quote:
DocumentRoot "/var/var/www/html"
I corrected "var/www/html" and restart apache, then works fine.
 
  


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
named-checkconf has errors, but Starting named: FAILED windstory Linux - Newbie 13 12-02-2011 12:54 AM
[SOLVED] named-checkconf has errors windstory Linux - Newbie 10 11-29-2011 04:42 AM
BIND/named Startup Error - named.root:1: '}' expected near ';' acutchin Linux - Server 4 11-10-2008 10:43 AM
service named cant start error in named.conf file gayanasa Linux - Server 2 07-02-2008 10:58 AM
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:41 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