LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-10-2003, 06:58 PM   #1
TheRealDeal
Member
 
Registered: Jun 2003
Location: Central Coast, NSW, Australia
Distribution: Gentoo
Posts: 438

Rep: Reputation: 30
Named & RNDC


Hi all,

I'm hoping someone can spot the error I have in config here. I've got a RH EL3 server running as a DNS server.

When I run service named start, it seems to start OK.
When I run service named stop, or restart, I get the following error.....

Stopping named: rndc: connect failed: connection refused [FAILED]

I have attached my /etc/rndc.key and .conf files, and also my named.conf file below. I don't know what I have got wrong.

------------------------/etc/rndc.key---------------------------------
key "DHCP_UPDATER" {
algorithm hmac-md5;
secret "HqNEJNJlrx4UHqaMH1AY1Ec0zIdmSatKzBzxyXdHDb202NEN9T8tjLsxLmmS";
};
----------------------------------------------------------------------------

-----------------------/etc/rndc.conf-----------------------------------
options {
default-server localhost;
default-key "DHCP_UPDATER";
};

server localhost {
key "DHCP_UPDATER";
};

include "/etc/rndc.key";
-----------------------------------------------------------------------------

-------------------------/etc/named.conf--------------------------------
options {
directory "/var/named";
};
key DHCP_UPDATER {
algorithm hmac-md5;
secret "HqNEJNJlrx4UHqaMH1AY1Ec0zIdmSatKzBzxyXdHDb202NEN9T8tjLsxLmmS";
};
controls {
inet 127.0.0.1 allow { localhost; } keys { DHCP_UPDATER; };
};
zone "." {
allow-update { DHCP_UPDATER; };
type hint;
file "named.ca";
};
zone "localhost" {
allow-update { DHCP_UPDATER; };
type master;
file "localhost.zone";
};
zone "0.0.127.in-addr.arpa" {
allow-update { DHCP_UPDATER; };
type master;
file "named.local";
};
zone "TSD" {
allow-update { DHCP_UPDATER; };
type master;
file "TSD.zone";
};
zone "192.168.0.in-addr.arpa" {
allow-update { DHCP_UPDATER; };
type master;
file "192.168.0.in-addr.arpa.zone";
};
include "/etc/rndc.key";
---------------------------------------------------------------------------------



If anyone can help me that would be great!!

Thanks alot,

Regards
Craig
 
Old 12-11-2003, 07:22 AM   #2
yuray
Member
 
Registered: Apr 2003
Location: Russia, Khotkovo
Distribution: Debian
Posts: 146

Rep: Reputation: 15
-------------------------/etc/named.conf--------------------------------
options {
directory "/var/named";
};
key DHCP_UPDATER {
must be in "DHCP_UPDATER"

and
inet 127.0.0.1 allow { localhost; } keys { DHCP_UPDATER; };
"" forgot ... and below too

in rndc.conf
include "/etc/rndc.key";
move in begin of file

After start named check log and named must listen 953 port
netstat -an|grep 953
 
Old 12-11-2003, 04:27 PM   #3
TheRealDeal
Member
 
Registered: Jun 2003
Location: Central Coast, NSW, Australia
Distribution: Gentoo
Posts: 438

Original Poster
Rep: Reputation: 30
Hello yuray,

Thanks for your reply. I have fixed up the " " in the files, thank you for that. I have also moved "/etc/rndc.conf" to the beginning of the file.

I am still getting the problem though. netstat -an|grep 953 doesn't show anything running on that port.

I am sure named is trying to start on port 953 because of the 'controls' section in my named.conf.

If I do a service named start, it looks like it works, it gives me the green [OK]

But when I do a service named stop, or restart, it fails giving the error I stated in my first post here.

Thanks for your help so far.

Regards
Craig

Last edited by TheRealDeal; 12-11-2003 at 04:30 PM.
 
Old 12-12-2003, 05:54 AM   #4
yuray
Member
 
Registered: Apr 2003
Location: Russia, Khotkovo
Distribution: Debian
Posts: 146

Rep: Reputation: 15
"I am still getting the problem though. netstat -an|grep 953 doesn't show anything running on that port."

Check log files. Usually, named write good log if is something wrong.
While you not see netstat -an|grep 953 green -- rndc is not to be work.

Goodluck.
 
Old 12-14-2003, 04:19 PM   #5
TheRealDeal
Member
 
Registered: Jun 2003
Location: Central Coast, NSW, Australia
Distribution: Gentoo
Posts: 438

Original Poster
Rep: Reputation: 30
I think I'm REALLY close now : ) I've done some googling but can't nail it.

In /var/log/messages when I try and start named, I get about 15 lines of what looks good, but then get this.

Dec 15 07:59:28 TSD-Support named[2370]: /etc/named.conf:28: undefined ACL 'DHCP_UPDATER'
Dec 15 07:59:28 TSD-Support named[2370]: loading configuration: not found
Dec 15 07:59:28 TSD-Support named[2370]: exiting (due to fatal error)

This is line 28 of named.conf....
allow-update { "DHCP_UPDATER"; };

If I comment out line 28, I then get the same error on line 34 which is exactly the same line.

I guess I am supposed to define the ACL for allow-update, or DHCP_UPDATER??

The owner and group owner of /etc/named.conf is named

Thanks for all of your help so far : )

Regards
Craig

Last edited by TheRealDeal; 12-14-2003 at 05:41 PM.
 
Old 12-14-2003, 06:43 PM   #6
TheRealDeal
Member
 
Registered: Jun 2003
Location: Central Coast, NSW, Australia
Distribution: Gentoo
Posts: 438

Original Poster
Rep: Reputation: 30
Hi again,

I got it. named is now starting and stopping with no errors Thanks SO much for your help yuray!!!

I don't know whether to make a new topic or add it on to this. I just tried to test it with a machine by adding it to the new network.

When I do (from an XP machine) nslookup TSD-Support, or any machine name. I get the following.....

DNS request timed out...
timeout was 2 seconds.
*** Can't find server name for address 192.168.0.1: Timed out
*** Default servers are not available
Server: UnKnown
Address: 192.168.0.1

I have my firewall turned off.
I can ping the DNS server (192.168.0.1) with no problems.
A strange thing is, even when I do an nslookup from the server, I get
;; connection timed out; no servers could be reached

Strange??

Thanks heaps.
Craig
 
Old 12-16-2003, 03:31 AM   #7
yuray
Member
 
Registered: Apr 2003
Location: Russia, Khotkovo
Distribution: Debian
Posts: 146

Rep: Reputation: 15
Sometimes good ping is not good as looks like.
Check what packets from XP receive on dns server and dns answer XP
Tcpdump on dns server is you friend.
 
Old 12-23-2003, 05:25 AM   #8
ayankdownunder
LQ Newbie
 
Registered: Dec 2003
Location: Sydney AUS
Posts: 2

Rep: Reputation: 0
Lightbulb Hey Craig WHAT DID you do ;-0

Craig,

I'm in a N.Sydney Datacenter right now and I am literally banging my head against the wall from RHEL 3 AS giving me $h1t about rndc connection refused. Your thread is the ONLY one on the whole WWW that seems to make sense. I am getting the exact smae errors as you. PLEASE advise as to what you did to fix the error.

THanks,
Nick
 
Old 12-23-2003, 06:14 PM   #9
TheRealDeal
Member
 
Registered: Jun 2003
Location: Central Coast, NSW, Australia
Distribution: Gentoo
Posts: 438

Original Poster
Rep: Reputation: 30
Hi.

I got it going mate

If you want me to contact you PM me your details. I'll let you know exactly what I did. It all makes sense why I couldn't get it going.

>Craig
 
Old 06-15-2004, 07:38 PM   #10
trukfixer
LQ Newbie
 
Registered: Jun 2004
Distribution: RHEL 3.x
Posts: 1

Rep: Reputation: 0
This is exactly the information I need.. can anyone post here or PM me the details on how to fix this issue? I would deeply appreciate it. Thanks!
 
Old 06-20-2004, 02:20 PM   #11
stocks29
Member
 
Registered: Mar 2004
Distribution: Ubuntu
Posts: 52

Rep: Reputation: 15
Please post the answer to this, I also am having the exact same problem.

Just curious why you would pm the answer, isnt that the point of the forum, so anyone can find the answer?
 
Old 06-20-2004, 02:49 PM   #12
stocks29
Member
 
Registered: Mar 2004
Distribution: Ubuntu
Posts: 52

Rep: Reputation: 15
solved my problem....

my rndc.key file was empty in my /var/named/chroot/etc/ directory
copied the rndc.key file that was in my /etc directory to /var/named/chroot/etc directory and all is well....

make sure all your files there are correct and atleast have something in them
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rndc works, but rndc stats doesnt havok1977 Linux - Networking 2 04-08-2010 04:18 PM
How to edit named.conf without vi or rndc eugenevdm Linux - Newbie 6 03-07-2005 02:35 PM
service named error "rndc: conenct failed: connection refused" Reu Linux - General 1 07-12-2004 02:34 PM
bind and named and "rndc: connect failed: connection refused" coffee9876 Linux - Networking 3 12-16-2003 11:50 AM
named without rndc spank Linux - Newbie 0 12-16-2003 09:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:22 AM.

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
Open Source Consulting | Domain Registration