named problem

tsiou

Verified User
Joined
Sep 15, 2006
Messages
236
Location
Larisa, Greece
Hi, I post it here because it's freebsd's question.

I recently chrooted bind, so i have in my rc.conf named_enable=yes etc.
i linked /usr/local/etc/rc.d/named to point to /etc/rc.d/named

After a system restart i see that bind started twice (i believe one from rc.conf and one from DA)

How can i stop DA's startup command?
 

paix

Verified User
Joined
Oct 31, 2006
Messages
55
Location
ua
##
## Updating bind to ports version
##


make install clean -C /usr/ports/dns/bind9
#check replase base
#if some errors, rerun make install clean

echo 'named_enable="YES"' >> /etc/rc.conf

# named symlink
mv /usr/local/etc/rc.d/named /var/4delete
ln -s /etc/rc.d/named /usr/local/etc/rc.d/
perl -pi -e "s@./named $1@#./named $1@g" /usr/local/etc/rc.d/boot.sh

/etc/rc.d/named restart
 

tsiou

Verified User
Joined
Sep 15, 2006
Messages
236
Location
Larisa, Greece
After a reboot i see that :
-----------------------------------------------------
Oct 6 10:16:03 pindos named[850]: starting BIND 9.3.4-P1 -t /var/named -u bind
Oct 6 10:16:03 pindos named[850]: command channel listening on 127.0.0.1#953
Oct 6 10:16:03 pindos named[850]: command channel listening on ::1#953
Oct 6 10:16:03 pindos named[850]: running
Oct 6 10:16:04 pindos named[910]: starting BIND 9.3.4-P1 -t /var/named -u bind
Oct 6 10:16:04 pindos named[910]: could not listen on UDP socket: address in use
Oct 6 10:16:04 pindos named[910]: creating IPv4 interface em0 failed; interface ignored
Oct 6 10:16:04 pindos named[910]: could not listen on UDP socket: address in use
Oct 6 10:16:04 pindos named[910]: creating IPv4 interface em0 failed; interface ignored
Oct 6 10:16:04 pindos named[910]: could not listen on UDP socket: address in use
Oct 6 10:16:04 pindos named[910]: creating IPv4 interface lo0 failed; interface ignored
Oct 6 10:16:04 pindos named[910]: not listening on any interfaces
Oct 6 10:16:04 pindos named[910]: couldn't add command channel 127.0.0.1#953: address in use
Oct 6 10:16:04 pindos named[910]: couldn't add command channel ::1#953: address in use
Oct 6 10:16:04 pindos named[910]: could not listen on UDP socket: permission denied
Oct 6 10:16:04 pindos named[910]: creating IPv4 interface em0 failed; interface ignored
Oct 6 10:16:04 pindos named[910]: could not listen on UDP socket: permission denied
Oct 6 10:16:04 pindos named[910]: creating IPv4 interface em0 failed; interface ignored
Oct 6 10:16:04 pindos named[910]: could not listen on UDP socket: permission denied
Oct 6 10:16:04 pindos named[910]: creating IPv4 interface lo0 failed; interface ignored
Oct 6 10:16:04 pindos named[910]: running
----------------------------------------------------------



And every hour i see that :
-----------------------------
Oct 6 04:36:34 pindos named[894]: could not listen on UDP socket: permission denied
Oct 6 04:36:34 pindos named[894]: creating IPv4 interface em0 failed; interface ignored
Oct 6 04:36:34 pindos named[894]: could not listen on UDP socket: permission denied
Oct 6 04:36:34 pindos named[894]: creating IPv4 interface em0 failed; interface ignored
Oct 6 04:36:34 pindos named[894]: could not listen on UDP socket: permission denied
Oct 6 04:36:34 pindos named[894]: creating IPv4 interface lo0 failed; interface ignored
Oct 6 04:36:34 pindos named[894]: not listening on any interfaces
-------------------------------------------------------------------

It seems that it's starting twice on reboot and every hour i thing DA is trying to (re)start it?
In DA's show services seems as running...

The weird thing is that i don't have DA's ./named in boot.sh..

With a grep named * in rc.d i only get results from named file which is linked to /etc/rc.d/named
 

daveyw

Verified User
Joined
Jan 5, 2008
Messages
702
Location
/dev/null
Maybe the port is already in use. Also theire is something wrong with your interface..
 

paix

Verified User
Joined
Oct 31, 2006
Messages
55
Location
ua
tsiou also you could do next:

named_enable="YES" in rc.conf
mv /etc/rc.d/named /usr/local/etc/rc.d/named

Then you should enable run named by directadmin in
rc.d/boot.sh script.

That will guarantee that named runs only one during boot.
 

IT_Architect

Verified User
Joined
Feb 27, 2006
Messages
888
That fixed my problem. I wish I knew how you know how to set up all of the symlinks etc. I notice bind is at 9.6 now. I don't know if there are any advantages or drawbacks to that.
 
Top