bind doesnt work

whyzex

Verified User
Joined
Oct 19, 2010
Messages
14
Hi everyone,
I restarted my centos el4 server a couple of days ago, after the restart i noticed the named daemon wont start.
I tryed reinstalling it and taking the named.conf from the directadmin server, but still had a problem "rdnc connection refused".
As it turns up after installing "caching-nameserver" (no idea what that is) the named daemon seems to work from the server side, but doesnt really do anything when it comes to DNS.
how can i solve this problem..?

Thanks.
 
Give us a domain and an ip for checks.

And connection refused seems or that named isnt started or a firewall blocking port 53.

Regards
 
Have you tryed disabling firewall?

Code:
ps aux | grep named
and
Code:
ps aux | grep bind
and
Code:
netstat -ant | grep :53

What return?

Regards
 
The firewall is installed for about 6 months, I dont think its whats causing this problem, but anyway I disabled it just now, ill let it stay this way for 2 hours see if any change happenns..


[root@server ~]# ps aux | grep named
named 22416 0.0 0.0 69840 2928 ? Ssl 14:21 0:00 /usr/sbin/named -u named -t /var/named/chroot
root 10970 0.0 0.0 5860 700 pts/16 S+ 21:05 0:00 grep named
[root@server ~]# ps aux | grep bind
root 10974 0.0 0.0 5732 688 pts/16 S+ 21:05 0:00 grep bind
[root@server ~]# netstat -ant | grep :53
tcp 0 0 myiphere:53 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN
[root@server ~]#
 
Last edited:
digging the nameserver work correctly, and so bind seems to be ok.

Check if there are errors in logs cause should be a missconfiguration.


Regards
 
Aug 1 20:27:28 server named[22416]: lame server resolving 'igonline-fm.co.il' (in 'igonline-fm.co.il'?): myiphere#53
Aug 1 20:27:59 server last message repeated 6 times
Aug 1 20:28:18 server last message repeated 3 times

Plus, when I tryed to stop and start named this is what the logs showed:

Aug 1 21:46:08 server named[22416]: shutting down: flushing changes
Aug 1 21:46:08 server named[22416]: stopping command channel on 127.0.0.1#953
Aug 1 21:46:08 server named[22416]: stopping command channel on ::1#953
Aug 1 21:46:08 server named[22416]: no longer listening on 127.0.0.1#53
Aug 1 21:46:08 server named[22416]: no longer listening on myiphere#53
Aug 1 21:46:08 server named[22416]: exiting
Aug 1 21:46:08 server named: succeeded
Aug 1 21:46:10 server named[18940]: starting BIND 9.2.4 -u named -t /var/named/chroot
Aug 1 21:46:10 server named[18940]: using 4 CPUs
Aug 1 21:46:10 server named[18940]: loading configuration from '/etc/named.conf'
Aug 1 21:46:10 server named[18940]: listening on IPv4 interface lo, 127.0.0.1#53
Aug 1 21:46:10 server named[18940]: listening on IPv4 interface eth0, myiphere#53
Aug 1 21:46:10 server named[18940]: command channel listening on 127.0.0.1#953
Aug 1 21:46:10 server named[18940]: command channel listening on ::1#953
Aug 1 21:46:10 server named[18940]: running
Aug 1 21:46:10 server named: named startup succeeded
 
Last edited:
OK I got it FIXED! (THANK GOD!)
What I did is, I removed bind again, (yum remove bind)
Installed it, and when I got the error named.ca(which bind-chroot package SEEMED to fixed, but not really!), I downloaded it from the directadmin server 10 miniutes passed and TADA!:)
Thanks very much for your assistant SeLLeRoNe! hope this will help pepole in the future!.
 
Part of your problem is you installed the caching-nameserver. That just caches queries and doesn't do any real resolving.

Uninstall that rpm and try adding the code below to a new script and execute it. That is what the DA setup.sh does for non-FreeBSD and non-Debian systems. If you are using one of those, take a closer look at the setup.sh in /usr/local/directadmin/scripts/setup.sh for what to do.
Code:
#!/bin/sh
mv -f /etc/init.d/named /etc/init.d/named.back
wget -O /etc/init.d/named http://www.directadmin.com/named
chmod 755 /etc/init.d/named
/sbin/chkconfig named reset

RNDCKEY=/etc/rndc.key
if [ -e $RNDCKEY ]; then
  if [ `cat $RNDCKEY | grep -c secret` -eq 0 ]; then
     SECRET=`/usr/sbin/rndc-confgen | grep secret | head -n 1`
     STR="perl -pi -e 's#hmac-md5;#hmac-md5;\n\t$SECRET#' $RNDCKEY;"
     eval $STR
  fi
fi

The "-t /var/named/chroot" is telling named to use /var/name/chroot as the root directory for named. DA does not use that, doing the above, will update your startup to not use the chroot directory and hopefully use the correct files (i.e. /etc/named.conf instead of /etc/named.caching-nameserver.conf )

EDIT:
Sorry, I had this ready to send, and clicked send after I finished my lunch. But either way, this might help someone in the future.
 
Back
Top