LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   rndc: connect failed: 127.0.0.1#953: connection refused (http://www.linuxquestions.org/questions/linux-server-73/rndc-connect-failed-127-0-0-1-953-connection-refused-721963/)

milindras 04-27-2009 06:09 AM

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

bathory 04-27-2009 06:22 AM

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

Regards

milindras 04-27-2009 07:22 AM

Quote:

Originally Posted by bathory (Post 3522280)
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

milindras 04-27-2009 08:03 AM

2 Attachment(s)
Quote:

Originally Posted by bathory (Post 3522280)
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

bathory 04-27-2009 08:28 AM

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.

milindras 04-27-2009 08:52 AM

Quote:

Originally Posted by bathory (Post 3522399)
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

bathory 04-27-2009 09:02 AM

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


milindras 04-27-2009 09:56 AM

Quote:

Originally Posted by bathory (Post 3522432)
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

bathory 04-27-2009 12:03 PM

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?

milindras 04-27-2009 12:19 PM

1 Attachment(s)
Quote:

Originally Posted by bathory (Post 3522623)
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

milindras 04-27-2009 12:23 PM

Quote:

Originally Posted by milindras (Post 3522640)
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

bathory 04-27-2009 12:43 PM

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

milindras 04-28-2009 05:26 AM

Quote:

Originally Posted by bathory (Post 3522664)
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

bathory 04-28-2009 05:56 AM

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.

milindras 04-28-2009 06:35 AM

Quote:

Originally Posted by bathory (Post 3523391)
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


All times are GMT -5. The time now is 10:05 PM.