Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Dec 2005 14:30:12 -0500 (EST)
From:      Garrett Wollman <wollman@xyz.csail.mit.edu>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/90863: 6.0 boot: name resolution broken for daemon startup
Message-ID:  <200512231930.jBNJUCjn000912@xyz.csail.mit.edu>
Resent-Message-ID: <200512231940.jBNJe4ZB086542@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         90863
>Category:       bin
>Synopsis:       6.0 boot: name resolution broken for daemon startup
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 23 19:40:03 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Garrett Wollman
>Release:        FreeBSD 6.0-RELEASE-p1 i386
>Organization:
>Environment:
System: FreeBSD xyz.csail.mit.edu 6.0-RELEASE-p1 FreeBSD 6.0-RELEASE-p1 #1: Fri Dec 23 13:27:54 EST 2005 wollman@xyz.csail.mit.edu:/usr/obj/usr/src/sys/XYZ i386

This is a fairly generic 6.0 install from source.

>Description:

This machine uses a local caching nameserver.  When booting, named starts
successfully but does not answer queries for about half a minute.  Meanwhile,
many other daemons (such as ntpd, sendmail, and apache) are started by the
rc scripts and fail because they depend on name resolution working immediately
on startup.

This is very difficult to debug as named is working by the time a console
login is possible.

There is a second name server referenced in /etc/resolv.conf, but libc will
not fall back to it because named is running and seems to be giving some
sort of answer (SERVFAIL?).

>How-To-Repeat:
	
>Fix:

I am using the following workaround:

--- /usr/src/etc/rc.d/named	Mon May 23 08:25:33 2005
+++ /etc/rc.d/named	Fri Dec 23 14:16:26 2005
@@ -115,3 +115,8 @@
 pidfile="${named_pidfile:-/var/run/${name}/pid}"
 
 run_rc_command "$1"
+case "$1" in
+*start*) while ! host localhost 2>/dev/null >/dev/null; do
+		sleep 1
+	done;;
+esac
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200512231930.jBNJUCjn000912>