LinuxQuestions.org

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

milindras 04-29-2009 07:27 AM

Quote:

Originally Posted by milindras (Post 3524595)
sorrt the last command is not working

[root@ns etc]# ps -ef | grep named
named 25171 1 0 Feb05 ? 00:02:32 /usr/sbin/named -u named
root 8958 8028 0 11:08 pts/0 00:00:00 man named
root 8961 8958 0 11:08 pts/0 00:00:00 sh -c (cd /usr/share/man && (echo ".ll 14.1i"; echo ".nr LL 14.1i"; echo ".pl 1100i"; /usr/bin/gunzip -c '/usr/share/man/man8/named.8.gz'; echo ".\\\""; echo ".pl \n(nlu+10") | /usr/bin/gtbl | /usr/bin/nroff -c --legacy ISO-8859-1 -mandoc 2>/dev/null | /usr/bin/less -is)
root 8962 8961 0 11:08 pts/0 00:00:00 sh -c (cd /usr/share/man && (echo ".ll 14.1i"; echo ".nr LL 14.1i"; echo ".pl 1100i"; /usr/bin/gunzip -c '/usr/share/man/man8/named.8.gz'; echo ".\\\""; echo ".pl \n(nlu+10") | /usr/bin/gtbl | /usr/bin/nroff -c --legacy ISO-8859-1 -mandoc 2>/dev/null | /usr/bin/less -is)
root 10602 8028 0 12:57 pts/0 00:00:00 grep named
[root@ns etc]# netstat -tanpl | grep 53
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2453/sshd
[root@ns etc]# lsof | grep named
bash: lsof: command not found
[root@ns etc]#

bathory 04-29-2009 07:33 AM

About permissions change rndc.conf perms, so it's owned by group named and be group readable:
Code:

chgrp named /etc/rndc.conf
chmod 640 /etc/rndc.conf


milindras 04-29-2009 07:44 AM

Quote:

Originally Posted by bathory (Post 3524622)
About permissions change rndc.conf perms, so it's owned by group named and be group readable:
Code:

chgrp named /etc/rndc.conf
chmod 640 /etc/rndc.conf


this is doen & tried to restart the named but same response

[root@ns etc]# /etc/init.d/named restart
Stopping named: ...........................................[ OK ]o response, killing with -TERM
Starting named: named: already running [FAILED]
[root@ns etc]#

Thanks

bathory 04-29-2009 08:06 AM

Why don't you use the RH way to restart named?
Code:

service named restart

milindras 04-29-2009 08:08 AM

Quote:

Originally Posted by bathory (Post 3524660)
Why don't you use the RH way to restart named?
Code:

service named restart

[root@ns etc]# service named restart
bash: service: command not found
[root@ns etc]# service named restart
bash: service: command not found
[root@ns etc]# cd /etc/init.d/
[root@ns init.d]# service named restart
bash: service: command not found
[root@ns init.d]#

Thanks

bathory 04-29-2009 08:43 AM

It seems that you don't have services installed.
As a last try, because I'm out of ideas, check the rndc key name if it's the same (rndckey) in /etc/rndc.key as in the 2 conf files. Maye you can keep a backup of it and use rndc-confgen to create a new one.

What I don't get is the fact that according to the logs, named starts (along with rndc) and stops right after, but "ps -ef" says it's still running, netstat confirms it's running and listening on port 53, but somehow rndc is not listening and there is nothing in the logs or at the debug output.

milindras 04-29-2009 11:23 AM

Quote:

Originally Posted by bathory (Post 3524693)
It seems that you don't have services installed.
As a last try, because I'm out of ideas, check the rndc key name if it's the same (rndckey) in /etc/rndc.key as in the 2 conf files. Maye you can keep a backup of it and use rndc-confgen to create a new one.

What I don't get is the fact that according to the logs, named starts (along with rndc) and stops right after, but "ps -ef" says it's still running, netstat confirms it's running and listening on port 53, but somehow rndc is not listening and there is nothing in the logs or at the debug output.

Tried the rndc.key. But no luck.
Do you think is this a RNDC problem or DNS server problem?
Thanks

bathory 04-29-2009 12:15 PM

This could be a common rndc problem, if you don't have rndc configured, or used the wrong rndc key in named.conf and rndc.conf.
In your case I really don't get it. According to logs named starts and shuts down after a while without any reason. Running ps sometimes shows named running (but not rndc) and sometimes does not. And all of this without any error message...

milindras 04-30-2009 04:05 AM

Quote:

Originally Posted by bathory (Post 3524934)
This could be a common rndc problem, if you don't have rndc configured, or used the wrong rndc key in named.conf and rndc.conf.
In your case I really don't get it. According to logs named starts and shuts down after a while without any reason. Running ps sometimes shows named running (but not rndc) and sometimes does not. And all of this without any error message...

Could you give any suggetions on this?
Or any other place I can get some help on this?
Thanks

bathory 04-30-2009 04:40 AM

I've already told you to upgrade bind. Even if it will not resolve your problem it's a good practice for security reasons.
Doing a little search I've found that there are bugs (like this or this) in redhat bind package concerning starting/stopping bind.

milindras 04-30-2009 04:56 AM

Quote:

Originally Posted by bathory (Post 3525616)
I've already told you to upgrade bind. Even if it will not resolve your problem it's a good practice for security reasons.
Doing a little search I've found that there are bugs (like this or this) in redhat bind package concerning starting/stopping bind.

I do Appreciate the time taken to listen for my problem. I will consider the aspets you said on this problem.
If youy find out any clue please let me know

Thank you very much
Regards
Milindra

Arantec 08-20-2013 05:33 AM

Hi, I had the same problem and this was my solution:

1. Check /etc/resolv.conf file. It was wrong. The good content is:

search xxxxxxxxxxxxxx.com
nameserver 127.0.0.1

2. Stop bind service:
# /etc/init.d/bind9 stop

3. Start bind service:
# /etc/init.d/bind9 start

And now It works OK.


All times are GMT -5. The time now is 03:34 AM.