LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-12-2006, 08:55 AM   #1
yawe_frek
Member
 
Registered: Sep 2005
Distribution: feather 0.72-usb, DSL,CentOS,Ubuntu, Redhat 9
Posts: 144

Rep: Reputation: 15
Named problem


hi
i just installed bind and caching nameserver but when ever i start named i got this error msg

Rndc: Couldn't find server 'localhost': Name or service not known.

Can any one help out.

thanks.
 
Old 12-12-2006, 01:05 PM   #2
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
Check you /etc/hosts file and make sure there's a line:
Code:
127.0.0.1 localhost
If it's there, find the named.conf file and see what directory named is configured to run in, then make a etc/ directory inside that directory, and copy /etc/hosts to /<named dir>/etc/hosts .
 
Old 12-19-2006, 01:18 AM   #3
yawe_frek
Member
 
Registered: Sep 2005
Distribution: feather 0.72-usb, DSL,CentOS,Ubuntu, Redhat 9
Posts: 144

Original Poster
Rep: Reputation: 15
Thanks for the assistance,but how do i know what directory named is running in. i need this to be broken down more.
 
Old 12-19-2006, 08:56 AM   #4
jakev383
QmailToaster Developer
 
Registered: Dec 2005
Location: Burlington, NC
Distribution: CentOS, Voyage, Debian, Fedora
Posts: 220

Rep: Reputation: 31
Quote:
Originally Posted by yawe_frek
Thanks for the assistance,but how do i know what directory named is running in. i need this to be broken down more.
What distro would narrow things down for everyone else here.
Anyway. Loom at /etc/named.conf. In there somewhere, you should see a line that says something like:

options {
directory "/var/named";

This will tell you where named (Bind) is running from.
You might also want to check the file /etc/host.conf and make sure the order is hosts,bind
 
Old 12-22-2006, 11:08 PM   #5
yawe_frek
Member
 
Registered: Sep 2005
Distribution: feather 0.72-usb, DSL,CentOS,Ubuntu, Redhat 9
Posts: 144

Original Poster
Rep: Reputation: 15
Less I forget I use RedHat 9

I am done just as u said , that is I shoud copy /etc/hosts to the named directory which is
/var/named. It now looks like this /var/named/etc/hosts.

I also chked my /etc/host.conf and it is rder hosts, bind

And my /etc/hosts is in this other : 127.0.0.1 Ginnypig (which is my hostname)

After all this I am still having the same problem when ever i restart named: Rndc: Couldn't find server 'localhost': Name or service not known.

help !!!!!!
 
Old 12-22-2006, 11:14 PM   #6
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
127.0.0.1 must be called localhost, not the hostname of your machine. It's a special reserved name and address and cannot be renamed without breaking things, which is exactly what you did.
 
Old 12-22-2006, 11:18 PM   #7
yawe_frek
Member
 
Registered: Sep 2005
Distribution: feather 0.72-usb, DSL,CentOS,Ubuntu, Redhat 9
Posts: 144

Original Poster
Rep: Reputation: 15
actually i saw it like that, so i should change it to 127.0.0.1 localhost
 
Old 12-26-2006, 02:27 AM   #8
yawe_frek
Member
 
Registered: Sep 2005
Distribution: feather 0.72-usb, DSL,CentOS,Ubuntu, Redhat 9
Posts: 144

Original Poster
Rep: Reputation: 15
i have changed it to 127.0.0.1 localhost but i am still having the same problem. pls help
 
Old 12-26-2006, 02:31 AM   #9
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
Did you make sure the only entry for 127.0.0.1 is localhost is both /etc/hosts and /var/named/etc/hosts ?

Does your named.conf has an rndc key value in it? If so, is it the same as what's in /etc/rndc.conf (or /etc/rndc.key)? Try copying /etc/rndc.[conf|key] to /var/named.

If a key doesn't exist, you can create one with rndc-confgen -a and follow the instructions in the output.
 
Old 02-08-2007, 01:45 AM   #10
arktik
LQ Newbie
 
Registered: Feb 2007
Location: Montana, USA
Distribution: Cent 4 & 5
Posts: 13

Rep: Reputation: 0
A similar problem

I new here and somewhat still new to *nix but any help here would be hot.

OS: CentOS Server 4

Problem: Configuring as DNS and am getting:
"rndc: connection to remote host closed
This may indicate that the remote server is using an older version of
the command protocol, this host is not authorized to connect,
or the key is invalid."
reporting /var/log/messages is:
"named[3735]: invalid command from 127.0.0.1#32777: bad auth"

I have checked the hosts & host.conf, rndc.conf, rndc.key, named.conf and haven't found anything out of sorts as far as a skewed key or anything.

Any ideas???
 
Old 02-08-2007, 01:59 AM   #11
yawe_frek
Member
 
Registered: Sep 2005
Distribution: feather 0.72-usb, DSL,CentOS,Ubuntu, Redhat 9
Posts: 144

Original Poster
Rep: Reputation: 15
funny

i had the same problem some time ago but i was feedup as no solution proffered was working for me. it was really frustrating so i uninstalled it.

Kindly let me know when you get it right .thanks
 
Old 02-08-2007, 04:57 PM   #12
arktik
LQ Newbie
 
Registered: Feb 2007
Location: Montana, USA
Distribution: Cent 4 & 5
Posts: 13

Rep: Reputation: 0
Red face Okay I feek dumb now.


Looks like my problem with not getting the rndc or named status messages to come up with nothing more then an error. I edited the named.conf file where it read:
inet 127.0.0.1 allow { localhost; } keys { "key"; };
to read
inet 127.0.0.1 allow { localhost; } keys { "rndc-key"; };
I did this as within the rndc.key file read:
key "rndc-key" {

So if my interpretations are wrong here then someone please set me straight.
My interpretation:
rndc.conf secret
must match
rndc.key secret

named.conf should include the proper rndc.key (usually in /etc/) and the 127.0.0.1 ... "key" refernece in named.conf should refer to what rndc.key is referenceing in the key line.

Now I am able to access named, rndc without bad auth errors displaying or showing /var/log/messages
 
Old 02-08-2007, 06:32 PM   #13
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 69
Usually you can just run rndc-confgen -a, possibly also copying /etc/rndc.key to /var/named/etc/rndc.key (if named chroots into /var/named). The man pages for rndc.conf and rndc-confgen are highly enlightening.
 
Old 02-11-2007, 10:45 PM   #14
arktik
LQ Newbie
 
Registered: Feb 2007
Location: Montana, USA
Distribution: Cent 4 & 5
Posts: 13

Rep: Reputation: 0
Question Problem with DNS

I am having some problems with a new DNS server running Cent OS Server 4. This system is set as a primary DNS and as not reporting any problems in /var/log/messages. When named is running then out bound traffic seems to move as it should. Email is routing -for the most part. I am running into a RDNS problem which I do not understand, this is according to dnsreport.com. A dig and host checks seem to return the proper information but nslookup is failing. To top it all off the problem domains are roughly 8 of the 59 hosted. Some work just fine and some others do not. I have poured over the named.conf and the zone files and found minor typos in only 1.
Any help would be greatly appreciated.
------------------------
This problem was solved:
In my file editing the ownership got changed so named was unable to load the files - I changed the ownership of the zone files to named.named and made sure that the ownership of the named.conf was root.named
I also ended up with a typo in the template zone file -thus I had the same typo in the zones- but the typo was missed until I manually compared a working zone file with a non-working zone file. I finally spotted the error on the fourth run through.

Last edited by arktik; 02-12-2007 at 07:40 AM.
 
Old 02-12-2007, 12:23 AM   #15
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914
Moved: This thread has been moved to Networking for a
for merge with your original thread.
http://www.linuxquestions.org/questi...d.php?t=509711
 
  


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
DNS problem sanjibgupta Linux - Networking 0 07-25-2005 03:08 AM
dns problem? JohnnyP Linux - Networking 2 09-25-2004 05:52 AM
Possible DNS problem? GraemeK Linux - Networking 3 05-17-2004 07:52 AM
DNS problem javierj Linux - Newbie 2 03-22-2004 10:38 PM
Dns Problem Nezar Linux - Networking 7 07-17-2001 02:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:06 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