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>
index | next in thread | previous in thread | raw e-mail
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 indication, 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.conf. I have tried booting both with and without the additional flags; there is no change. Apache has no problems starting up automagically, only named 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 #!/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="YES" netwait_ip="<MY ROUTER>" netwait_if="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 named are the graceful shutdown messages. Once I start it manually using /usr/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="fbsd.chicken.fish" ifconfig_em0="inet <MY IP ADDR> netmask 255.255.255.224" defaultrouter="<MY ROUTER>" netwait_enable="YES" netwait_ip="<MY ROUTER>" netwait_if="em0" sshd_enable="YES" ntpd_enable="YES" # Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable dumpdev="AUTO" zfs_enable="YES" apache24_enable="YES" postgresql_enable="YES" named_enable="YES" #named_program="/usr/local/sbin/named" #named_conf="/usr/local/etc/namedb/named.conf" root@fbsd:~ # /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/local/etc/namedb/named.conf Jul 31 08:37:57 fbsd named[1361]: built with '--localstatedir=/var' '--disable-linux-caps' '--disable-symtable' '--with-randomdev=/dev/random' '--with-libxml2=/usr/local' '--without-python' '--enable-filter-aaaa' '--disable-fixed-rrset' '--without-gost' '--without-idn' '--enable-ipv6' '--disable-largefile' '--disable-newstats' '--disable-rpz-nsdname' '--disable-rpz-nsip' '--disable-rrl' '--with-openssl=/usr' '--with-gssapi=/usr/local' 'CFLAGS=-I/usr/local/include -O2 -pipe -DLDAP_DEPRECATED -fno-strict-aliasing' 'LDFLAGS=-L/usr/local/lib -Wl,-rpath,/usr/local/lib:/usr/lib:/usr/local/lib -L/usr/local/lib' 'LIBS=-lkrb5 -lgssapi_krb5 ' '--with-dlz-postgres=yes' '--with-dlz-mysql=yes' '--with-dlz-ldap=yes' '--with-dlz-stub=yes' '--disable-threads' '--sysconfdir=/usr/local/etc/namedb' '--prefix=/usr/local' '--mandir=/usr/local/man' '--infodir=/usr/local/info/' '--build=x86_64-portbld-freebsd10.0' 'build_alias=x86_64-portbld-freebsd10.0' 'CC=cc' 'CPPFLAGS=-I/usr/local/include' 'CPP=cpp' 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 Jul 31 08:37:57 fbsd named[1361]: corporation. Support and training for BIND 9 are 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#953 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:~ # 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 On Wed, 30 Jul 2014, Burton Sampley via freebsd-questions wrote: > I have installed 10.0-R and updated to p-7. I have installed Bind9.9 > from ports and have configured a local domain (chicken.fish), which is > doing exactly what I want/need it to do ... until I reboot. It will > not start automagically on reboot. I have added and confirmed > 'named_enable="YES" ' in /etc/rc.conf, but named is not running after > a reboot. I checked dmesg and /var/log/messages, but did not see any > error messages for named. I can manually start named with > "/usr/sbin/service named start" and it will run without issue, until I > reboot. No error messages, but is the normal named startup message shown in /var/log/messages? > named_enable="YES" This is enough by itself. > named_program="/usr/local/sbin/named" > named_conf="/usr/local/etc/namedb/named.conf" Don't set these, they are defaults. It works for me, so at least it is possible. The first thing that comes to mind is that the machine may be starting named before the network interface is up. See man rc.conf | less -p netwait for a method of making the startup wait for an IP address to actually become available before continuing.help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1406816564.4269.YahooMailBasic>
