Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 31 Jul 2014 07:22:44 -0700
From:      Burton Sampley <bsmply@yahoo.com>
To:        Warren Block <wblock@wonkity.com>
Cc:        questions@freebsd.org
Subject:   Re: FreeBSD 10.0-R-p7 bind9.9 starting named on boot?
Message-ID:  <1406816564.4269.YahooMailBasic@web120303.mail.ne1.yahoo.com>
In-Reply-To: <alpine.BSF.2.11.1407301835100.69042@wonkity.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help

Warren,

Thank you for your reply.

Yes, the normal named startup messages are in /var/log/messages, but appear=
 to only be there after named is started manually.  I do not see any indica=
tion, at least recorded in /var/log/messages, that named even attempted to =
start on boot.  I have removed the additional default flags from /etc/rc.co=
nf.  I have tried booting both with and without the additional flags; there=
 is no change.  Apache has no problems starting up automagically, only name=
d is giving me issues.

Looking at the named rc.d file, I find the following block very interesting=
:

root@fbsd:/usr/local/etc/rc.d # /usr/bin/head ./named=20
#!/bin/sh
#
# $FreeBSD: head/dns/bind99/files/named.in 351487 2014-04-17 16:43:48Z mat =
$
#

# PROVIDE: named
# REQUIRE: FILESYSTEMS defaultroute ldconfig
# BEFORE: NETWORKING
# KEYWORD: shutdown

Especially the "BEFORE: NETWORKING" line.  That does not seem correct.

I added the following to /etc/rc.conf and rebooted:

netwait_enable=3D"YES"
netwait_ip=3D"<MY ROUTER>"
netwait_if=3D"em0"


after reboot with the above changes:

root@fbsd:~ # /usr/sbin/service named status
named is not running.
root@fbsd:~ #

No error messages in /var/log/messages and the only entries for today for n=
amed are the graceful shutdown messages.  Once I start it manually using /u=
sr/sbin/service, it starts without issue.

root@fbsd:~ # /usr/sbin/service named status
named is not running.
root@fbsd:~ # /usr/sbin/service named start
Starting named.
root@fbsd:~ # /usr/sbin/service named status
named is running as pid 1361.
root@fbsd:~ # /usr/sbin/service apache24 status
apache24 is running as pid 1245.
root@fbsd:~ #

The new /etc/rc.conf is:

root@fbsd:~ # /usr/bin/more /etc/rc.conf
hostname=3D"fbsd.chicken.fish"
ifconfig_em0=3D"inet <MY IP ADDR> netmask 255.255.255.224"
defaultrouter=3D"<MY ROUTER>"
netwait_enable=3D"YES"
netwait_ip=3D"<MY ROUTER>"
netwait_if=3D"em0"
sshd_enable=3D"YES"
ntpd_enable=3D"YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev=3D"AUTO"
zfs_enable=3D"YES"
apache24_enable=3D"YES"
postgresql_enable=3D"YES"
named_enable=3D"YES"
#named_program=3D"/usr/local/sbin/named"
#named_conf=3D"/usr/local/etc/namedb/named.conf"
root@fbsd:~ #=20


/var/log/messages after reboot:

root@fbsd:~ # /usr/bin/grep named /var/log/messages
Jul 31 08:30:30 fbsd named[1290]: stopping command channel on 127.0.0.1#953
Jul 31 08:30:30 fbsd named[1290]: stopping command channel on ::1#953
Jul 31 08:30:30 fbsd named[1290]: exiting
root@fbsd:~ #

/var/log/messages after manually starting named:

root@fbsd:~ # /usr/bin/grep named /var/log/messages
Jul 31 08:30:30 fbsd named[1290]: stopping command channel on 127.0.0.1#953
Jul 31 08:30:30 fbsd named[1290]: stopping command channel on ::1#953
Jul 31 08:30:30 fbsd named[1290]: exiting
Jul 31 08:37:57 fbsd named[1361]: starting BIND 9.9.5-P1 -u bind -c /usr/lo=
cal/etc/namedb/named.conf
Jul 31 08:37:57 fbsd named[1361]: built with '--localstatedir=3D/var' '--di=
sable-linux-caps' '--disable-symtable' '--with-randomdev=3D/dev/random' '--=
with-libxml2=3D/usr/local' '--without-python' '--enable-filter-aaaa' '--dis=
able-fixed-rrset' '--without-gost' '--without-idn' '--enable-ipv6' '--disab=
le-largefile' '--disable-newstats' '--disable-rpz-nsdname' '--disable-rpz-n=
sip' '--disable-rrl' '--with-openssl=3D/usr' '--with-gssapi=3D/usr/local' '=
CFLAGS=3D-I/usr/local/include -O2 -pipe -DLDAP_DEPRECATED -fno-strict-alias=
ing' 'LDFLAGS=3D-L/usr/local/lib -Wl,-rpath,/usr/local/lib:/usr/lib:/usr/lo=
cal/lib -L/usr/local/lib' 'LIBS=3D-lkrb5 -lgssapi_krb5 ' '--with-dlz-postgr=
es=3Dyes' '--with-dlz-mysql=3Dyes' '--with-dlz-ldap=3Dyes' '--with-dlz-stub=
=3Dyes' '--disable-threads' '--sysconfdir=3D/usr/local/etc/namedb' '--prefi=
x=3D/usr/local' '--mandir=3D/usr/local/man' '--infodir=3D/usr/local/info/' =
'--build=3Dx86_64-portbld-freebsd10.0' 'build_alias=3Dx86_64-portbld-freebs=
d10.0' 'CC=3Dcc'
 'CPPFLAGS=3D-I/usr/local/include' 'CPP=3Dcpp'
Jul 31 08:37:57 fbsd named[1361]: -----------------------------------------=
-----------
Jul 31 08:37:57 fbsd named[1361]: BIND 9 is maintained by Internet Systems =
Consortium,
Jul 31 08:37:57 fbsd named[1361]: Inc. (ISC), a non-profit 501(c)(3) public=
-benefit=20
Jul 31 08:37:57 fbsd named[1361]: corporation.  Support and training for BI=
ND 9 are=20
Jul 31 08:37:57 fbsd named[1361]: available at https://www.isc.org/support
Jul 31 08:37:57 fbsd named[1361]: -----------------------------------------=
-----------
Jul 31 08:37:57 fbsd named[1361]: command channel listening on 127.0.0.1#95=
3
Jul 31 08:37:57 fbsd named[1361]: command channel listening on ::1#953
Jul 31 08:37:57 fbsd named[1361]: all zones loaded
Jul 31 08:37:57 fbsd named[1361]: running
root@fbsd:~ #=20


Any other suggestions?

Regards,

-Burton

--------------------------------------------
On Wed, 7/30/14, Warren Block <wblock@wonkity.com> wrote:

 Subject: Re: FreeBSD 10.0-R-p7 bind9.9 starting named on boot?
 To: "Burton Sampley" <bsmply@yahoo.com>
 Cc: questions@freebsd.org
 Date: Wednesday, July 30, 2014, 8:42 PM
=20
 On Wed, 30 Jul 2014,
 Burton Sampley via freebsd-questions wrote:
=20
 > I have installed 10.0-R
 and updated to p-7.=A0 I have installed Bind9.9=20
 > from ports and have configured a local
 domain (chicken.fish), which is=20
 > doing
 exactly what I want/need it to do ... until I reboot.=A0 It
 will=20
 > not start automagically on
 reboot. I have added and confirmed=20
 >
 'named_enable=3D"YES" ' in /etc/rc.conf, but
 named is not running after=20
 > a reboot.=A0
 I checked dmesg and /var/log/messages, but did not see any
=20
 > error messages for named. I can
 manually start named with=20
 >
 "/usr/sbin/service named start" and it will run
 without issue, until I=20
 > reboot.
=20
 No error messages, but is the
 normal named startup message shown in=20
 /var/log/messages?
=20
 > named_enable=3D"YES"
=20
 This is enough by itself.
=20
 >
 named_program=3D"/usr/local/sbin/named"
 >
 named_conf=3D"/usr/local/etc/namedb/named.conf"
=20
 Don't set these, they are
 defaults.
=20
 It works for me,
 so at least it is possible.=A0 The first thing that comes=20
 to mind is that the machine may be starting
 named before the network=20
 interface is up.=A0
 See
 =A0=A0=A0man rc.conf | less -p
 netwait
 for a method of making the startup
 wait for an IP address to actually=20
 become
 available before continuing.
 



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?1406816564.4269.YahooMailBasic>