From owner-freebsd-questions@FreeBSD.ORG Thu Jul 31 14:22:52 2014 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E3384DAC for ; Thu, 31 Jul 2014 14:22:52 +0000 (UTC) Received: from nm20-vm0.bullet.mail.ne1.yahoo.com (nm20-vm0.bullet.mail.ne1.yahoo.com [98.138.91.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A26EF264F for ; Thu, 31 Jul 2014 14:22:51 +0000 (UTC) Received: from [98.138.100.112] by nm20.bullet.mail.ne1.yahoo.com with NNFMP; 31 Jul 2014 14:22:45 -0000 Received: from [98.138.89.193] by tm103.bullet.mail.ne1.yahoo.com with NNFMP; 31 Jul 2014 14:22:44 -0000 Received: from [127.0.0.1] by omp1051.mail.ne1.yahoo.com with NNFMP; 31 Jul 2014 14:22:44 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 824928.88395.bm@omp1051.mail.ne1.yahoo.com Received: (qmail 38244 invoked by uid 60001); 31 Jul 2014 14:22:44 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1406816564; bh=IU1feKvy5KDWzVsseS/yQNAPihHRUA1jaViouAPz9iQ=; h=Message-ID:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=ISVecKxg40m+6Hk0I0xt3I0zxk+14sF7vWAsfiRqZB4EiJpEY1pbMxWt+OMBUYk0qrgGXm7qJ1NpR/XhpF97mrIey/lOVSpRKNjVsx1eFSHPWL0JvgFL/xtsKZ2U4Gi7gEABRVS4AfZae8lo49v3YpD9Yd1mBlLAW2UjS/IL/JY= X-YMail-OSG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b2cvbWVzc2FnZXMsIHRoYXQgbmFtZWQgZXZlbiBhdHRlbXB0ZWQgdG8gc3RhcnQgb24gYm9vdC4gIEkgaGF2ZSABMAEBAQE- X-Mailer: YahooMailClassic/694 YahooMailWebService/0.8.198.689 Message-ID: <1406816564.4269.YahooMailBasic@web120303.mail.ne1.yahoo.com> Date: Thu, 31 Jul 2014 07:22:44 -0700 From: Burton Sampley Subject: Re: FreeBSD 10.0-R-p7 bind9.9 starting named on boot? To: Warren Block In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Jul 2014 14:22:53 -0000 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"" 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 netmask 255.255.255.224" defaultrouter=3D"" netwait_enable=3D"YES" netwait_ip=3D"" 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 wrote: Subject: Re: FreeBSD 10.0-R-p7 bind9.9 starting named on boot? To: "Burton Sampley" 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.