Re: Bind 9.3.0 startup failure

2004-09-23 Thread Paul Mather
On Thu, 23 Sep 2004 12:12:15 -0500, [EMAIL PROTECTED] wrote:

 /etc/defaults/rc.d contains:
 
 #
 # named.  It may be possible to run named in a sandbox, man security for
 # details.
 #
 named_rcng=NO # XXX Temporary. Enable to use new rc
 #functionality in support of named. See
 #variables below.
 named_enable=NO   # Run named, the DNS server (or NO).
 named_program=/usr/sbin/named # path to named, if you want a different one.
 named_flags=-u bind -g bind   # Flags for named
 named_pidfile=/var/run/named/pid # Pid file  
 named_chrootdir=  # Chroot directory (or  not to auto-chroot
 it)
 named_chroot_autoupdate=YES   # Automatically install/update chrooted
 # components of named. See /etc/rc.d/named.
 named_symlink_enable=YES  # Symlink ${named_pidfile} and /var/run/ndc
 # to their chrooted counterparts.
 
 
 The /etc/rc.d/named script is unaltered from clean install of the OS.

But, the /etc/rc.d/named in 5.2.1 is designed to work with BIND8, not
BIND9.  I'd expect problems trying to get it to work smoothly with BIND9
as-is, not least because some of the options to named have changed.  For
example, -g in BIND8 sets the group under which named will run; under
BIND9 it instructs named to run in the foreground, not in the background
as a daemon, and to log everything to stderr.  If you use the default
named_flags setting from /etc/defaults/rc.conf with BIND9 and start up
via /etc/rc.d/named, then named will likely get confused.

In short, I wouldn't rely on a script designed to drive BIND8 to work
flawlessly with BIND9.  As someone else pointed out, you should really
be using rndc to control named and to observe its status, not
/etc/rc.d/named status, etc.

Note that 5.3 will ship with BIND9, so I'd expect the startup scripts to
be re-written to work accordingly.

Cheers,

Paul.
-- 
e-mail: [EMAIL PROTECTED]

Without music to decorate it, time is just a bunch of boring production
 deadlines or dates by which bills must be paid.
--- Frank Vincent Zappa

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Bind 9.3.0 startup failure

2004-09-23 Thread Robert Huff

Paul Mather writes:
  But, the /etc/rc.d/named in 5.2.1 is designed to work with BIND8, not
  BIND9.

I have found the path of least resistance is presuming
_nothing_ from Bind8 works with Bind9.  This is not litterally true
- I believe most zone file data is fine - but it is easier (for
simple installations) to just start over.


Robert Huff


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Bind 9.3.0 startup failure

2004-09-23 Thread Kyle S. Allender
I'm going to answer my own post here...

I removed the entry from /etc/rc.conf and instead put an entry in
/etc/rc.local (had to create that file).  Now named starts up properly on
restart of the system.

I am now able to use rndc as expected to control the daemon - thanks to Mr.
Huff pointing out the expected location being different than what was
installed.

I'm not horribly concerned about this now that I've got it working, but I'm
still a little confused as to how the rcNG functions.  I found a paper on it
here:

http://www.usenix.org/events/usenix01/freenix01/full_papers/mewburn/mewburn_
html/index.html

for those that are interested.

I'm looking for more information and tutorials on it - I'll keep working
with it, but pointers would be appreciated.

Anyway, again I extend my thanks to Robert.

Cheers,

Kyle


On 23/09/2004 12:12, [EMAIL PROTECTED]
[EMAIL PROTECTED] rambled:

 Hello again.
 
 I'm still stumped.  I thought that perhaps something had gone wrong during the
 install initially.  I performed a clean install without named or Linux
 compatibility being enabled.
 
 I then used the references on this page:
 
 http://ezine.daemonnews.org/200303/bind9.html
 
 to build a clean copy of Bind9.3.0 over the top of the base distribution that
 ships with FBSD 5.2.1.
 
 It will start manually from the CLI with either:
 
 named
 /usr/sbin/named
 
 and properly read the zones and configuration files, inclusive of rndc-key.
 
 However, I still can't control named via /etc/rc.d/named and on startup the
 system spits out several errors with regards to named and being unable to open
 interfaces.  It's as if networking isn't up yet, so named can't start.  But if
 networking were not running, I wouldn't see errors about addresses and
 interfaces already being in use.
 
 I did make one change to /etc/rc.conf, adding this line at the end:
 
 /usr/sbin/named
 
 The messages log looks like this:
 
 Sep 23 12:00:00 bsd named[472]: starting BIND 9.3.0
 Sep 23 12:00:00 bsd named[472]: could not listen on UDP socket: permission
 denied
 Sep 23 12:00:00 bsd named[472]: creating IPv4 interface de0 failed; interface
 ignored
 Sep 23 12:00:00 bsd named[472]: could not listen on UDP socket: permission
 denied
 Sep 23 12:00:00 bsd named[472]: creating IPv4 interface lo0 failed; interface
 ignored
 Sep 23 12:00:00 bsd named[472]: not listening on any interfaces
 Sep 23 12:00:00 bsd named[472]: /etc/namedb/named.conf:28: couldn't add
 command
 channel 127.0.0.1#953: permission denied
 Sep 23 12:00:00 bsd named[472]: couldn't open pid file
 '/var/run/named/named.pid': File exists
 Sep 23 12:00:00 bsd named[472]: exiting (due to early fatal error)
 Sep 23 12:02:53 bsd login: ROOT LOGIN (root) ON ttyv0
 Sep 23 12:03:28 bsd named[184]: stopping command channel on 127.0.0.1#953
 Sep 23 12:03:28 bsd named[429]: exiting
 Sep 23 12:03:28 bsd named[184]: exiting
 Sep 23 12:03:34 bsd named[487]: starting BIND 9.3.0
 Sep 23 12:03:34 bsd named[487]: command channel listening on 127.0.0.1#953
 Sep 23 12:03:47 bsd login: ROOT LOGIN (root) ON ttyv0
 Sep 23 12:04:17 bsd named[499]: starting BIND 9.3.0
 Sep 23 12:04:17 bsd named[499]: could not listen on UDP socket: address in use
 Sep 23 12:04:17 bsd named[499]: creating IPv4 interface de0 failed; interface
 ignored
 Sep 23 12:04:17 bsd named[499]: could not listen on UDP socket: address in use
 Sep 23 12:04:17 bsd named[499]: creating IPv4 interface lo0 failed; interface
 ignored
 Sep 23 12:04:17 bsd named[499]: not listening on any interfaces
 Sep 23 12:04:17 bsd named[499]: /etc/namedb/named.conf:28: couldn't add
 command
 channel 127.0.0.1#953: address in use
 Sep 23 12:04:17 bsd named[499]: could not listen on UDP socket: address in use
 Sep 23 12:04:17 bsd named[499]: creating IPv4 interface de0 failed; interface
 ignored
 Sep 23 12:04:17 bsd named[499]: could not listen on UDP socket: address in use
 Sep 23 12:04:17 bsd named[499]: creating IPv4 interface lo0 failed; interface
 ignored
 
 Note that there is a named.pid file in /var/run/named after a reboot -
 possibly
 created by the system on boot?  Is the OS trying to start named too early?
 /etc/defaults/rc.d contains:
 
 #
 # named.  It may be possible to run named in a sandbox, man security for
 # details.
 #
 named_rcng=NO # XXX Temporary. Enable to use new rc
 #functionality in support of named. See
 #variables below.
 named_enable=NO   # Run named, the DNS server (or NO).
 named_program=/usr/sbin/named # path to named, if you want a different one.
 named_flags=-u bind -g bind   # Flags for named
 named_pidfile=/var/run/named/pid # Pid file
 named_chrootdir=  # Chroot directory (or  not to auto-chroot
 it)
 named_chroot_autoupdate=YES   # Automatically install/update chrooted
 # components of named. See /etc/rc.d/named.
 named_symlink_enable=YES  # Symlink ${named_pidfile} and