LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-27-2009, 06:09 AM   #1
milindras
Member
 
Registered: May 2008
Posts: 31

Rep: Reputation: 15
rndc: connect failed: 127.0.0.1#953: connection refused


Hi all,
Im having some problem with my DNS. We are using a Linux web server as one of our web server which runs some live websites.When I trying to get the status of the DNS (NAMED) it comes the following error :

[root@ns milindras]# /etc/init.d/named status
rndc: connect failed: 127.0.0.1#953: connection refused


The same error appears when Im trying to apply any changes on zone level for a selected doamin in WEBMIN. (Basically can't apply changes)

WEBMIN > Servers > BIND DNS servers > click a selected-domain.co.uk > Apply changes

NDC command failed : rndc: connect failed: 127.0.0.1#953: connection refused

But the server seems to be running without effecting any probelms to the sites or users.
I have been searching weeks for this problem & couldn't find a solution. And also Please note that Im bit new to Linux.

Server details :
Linux version 2.6.18-1.2257.fc5smp
Red Hat 4.1.1-1

Appreciate any help on this problem.
Thanks
regards
Milindra
 
Old 04-27-2009, 06:22 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Since named is running, the error you get means that rndc is not configured. You can use this guide to configure rndc.

Regards
 
1 members found this post helpful.
Old 04-27-2009, 07:22 AM   #3
milindras
Member
 
Registered: May 2008
Posts: 31

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by bathory View Post
Since named is running, the error you get means that rndc is not configured. You can use this guide to configure rndc.

Regards
Thank you. I will check the RNDC configuration & update you.

Thanks
regards
Milindra
 
Old 04-27-2009, 08:03 AM   #4
milindras
Member
 
Registered: May 2008
Posts: 31

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by bathory View Post
Since named is running, the error you get means that rndc is not configured. You can use this guide to configure rndc.

Regards
Hi I checked the RNDC configuration but I can't see any problems.
Please see the attached files.
My Key is in a diffrent file called rndc.key in the
/etc/rndc.key directory. You can see the path for that key on the attached files.

Thanks
Milindra
Attached Files
File Type: txt named.conf.txt (1.0 KB, 1898 views)
File Type: txt rndc.conf.txt (171 Bytes, 2098 views)
 
Old 04-27-2009, 08:28 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Change locahost with its IP: 127.0.0.1 in /etc/rndc.conf and in the "controls" statement in named.conf, restart named and see if it works.
 
Old 04-27-2009, 08:52 AM   #6
milindras
Member
 
Registered: May 2008
Posts: 31

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by bathory View Post
Change locahost with its IP: 127.0.0.1 in /etc/rndc.conf and in the "controls" statement in named.conf, restart named and see if it works.
Thanks.
I changed localhost to IP address, but it seems still no luck.

named.config file :
controls {
inet 127.0.0.1 allow { 127.0.0.1; } keys { rndckey; };
};

rndc.conf file :
options {
default-server 127.0.0.1;
default-key "rndckey";
};
server 127.0.0.1 {
key "rndckey";
};

[root@ns ~]# /etc/init.d/named restart
Stopping named: ...........................................[ OK ]o response, killing with -TERM
Starting named: named: already running
 
Old 04-27-2009, 09:02 AM   #7
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Take a look at /var/log/messages or /var/log/syslog (or whatever file your distro uses for named logs) to see if you find anything
Also what is the output of:
Code:
netstat -tan|grep 953
ps -ef|grep named
 
Old 04-27-2009, 09:56 AM   #8
milindras
Member
 
Registered: May 2008
Posts: 31

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by bathory View Post
Take a look at /var/log/messages or /var/log/syslog (or whatever file your distro uses for named logs) to see if you find anything
Also what is the output of:
Code:
netstat -tan|grep 953
ps -ef|grep named
This is the only log I found in related to this in message log

Mar 30 18:55:58 ns named[25171]: stopping command channel on 127.0.0.1#953


[root@ns log]# netstat -tan|grep 953
[root@ns log]# ps -ef|grep named
named 25171 1 0 Feb05 ? 00:02:32 /usr/sbin/named -u named
root 28075 26813 0 15:37 pts/6 00:00:00 grep named
[root@ns log]#

Thanks
 
Old 04-27-2009, 12:03 PM   #9
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
What happened on March 30 that caused rndc to stop? Do you remember upgrading any packages related to bind?
I don't see also in the logs the restarting of bind, so could you try to do it the hard way:
Code:
pkill named
/usr/sbin/named -u named
and look at the logs again?
 
Old 04-27-2009, 12:19 PM   #10
milindras
Member
 
Registered: May 2008
Posts: 31

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by bathory View Post
What happened on March 30 that caused rndc to stop? Do you remember upgrading any packages related to bind?
I don't see also in the logs the restarting of bind, so could you try to do it the hard way:
Code:
pkill named
/usr/sbin/named -u named
and look at the logs again?
I ran those commands. I have attached the log file for your information.
Thanks
Attached Files
File Type: txt message log.txt (11.6 KB, 260 views)
 
Old 04-27-2009, 12:23 PM   #11
milindras
Member
 
Registered: May 2008
Posts: 31

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by milindras View Post
I ran those commands. I have attached the log file for your information.
Thanks
Actually on 30th I was creating some slave zones on this server.Because we had to use this server as also a secondary name server for the other web server. I can remember I didnt installed anything.
But I deleted all the slave domain because of this error.

thanks
 
Old 04-27-2009, 12:43 PM   #12
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
According to logs, bind and rndc started normally at 17:57:17.
If you didn't stop bind right after that, they both somehow stopped at 17:59:22 without anything logged.
Check if named is running now and listens on port 53:
Code:
netstat -tanpl|grep named
 
Old 04-28-2009, 05:26 AM   #13
milindras
Member
 
Registered: May 2008
Posts: 31

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by bathory View Post
According to logs, bind and rndc started normally at 17:57:17.
If you didn't stop bind right after that, they both somehow stopped at 17:59:22 without anything logged.
Check if named is running now and listens on port 53:
Code:
netstat -tanpl|grep named
Hi good morning..

Thats correct. I did not do anything at 17:59:22. It has stopped automatically.
When I run
netstat -tanpl|grep named
Nothing comes up.
Thanks
Milindra
 
Old 04-28-2009, 05:56 AM   #14
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
You can run named in foreground and in debug mode and watch for errors:
Code:
/usr/sbin/named -u named -g -d 3
Also consider upgrading bind to a newer version.
 
Old 04-28-2009, 06:35 AM   #15
milindras
Member
 
Registered: May 2008
Posts: 31

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by bathory View Post
You can run named in foreground and in debug mode and watch for errors:
Code:
/usr/sbin/named -u named -g -d 3
Also consider upgrading bind to a newer version.
Sorry. Hope these command does not effect anything to the server as this is a live web server. Just to make sure.
Thanks
Milindra
 
  


Reply



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
Bind9: NDC command failed : rndc: connect failed: connection refused Boudewijn Linux - Networking 19 01-02-2014 07:19 AM
rndc: connect failed: connection refused mahmoud Linux - Newbie 2 06-07-2006 02:23 AM
rndc: connect failed: connection refused jkmartha Linux - Software 0 06-20-2005 01:35 AM
rndc: connect failed: connection refused Justalk Linux - Software 2 06-28-2004 03:45 PM
rndc: connect failed: connection refused Atroxic Linux - Networking 1 10-24-2003 01:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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