network deamons starting before network!

Peggy Wilkins enlil65 at
Fri Sep 3 19:56:19 UTC 2010

On Thu, Sep 2, 2010 at 9:45 AM, Peggy Wilkins <enlil65 at> wrote:
> On Fri, Jun 18, 2010 at 2:32 AM, Mark Stapper <stark at> wrote:
>> Since updating to 8.X I noticed that network services were started
>> before the network was up!
>> I use lagg failover configuration on both my FreeBSD boxes.
>> First, boot fails on mounting my nfs-shares.
>> After entering and exiting the "rescue" shell, the system boots as normal.
>> uname -a
>> FreeBSD mario 8.1-PRERELEASE FreeBSD 8.1-PRERELEASE #4: Fri Jun 18
>> 07:46:01 CEST 2010     ****@mario:/usr/obj/usr/src/sys/mario  amd64
>> What could I do to fix this?
>> Here's an exerpt from /var/log/messages:
>> Jun 18 09:10:25  ntpd[1376]: ntpd 4.2.4p5-a (1)
>> Jun 18 09:10:25  kernel: fuse4bsd: version 0.3.9-pre1, FUSE ABI 7.8
>> Jun 18 09:10:27  ntpd_initres[1412]: host name not found: yoshi
>> Jun 18 09:10:27  kernel: nfe0: link state changed to UP
>> Jun 18 09:10:27  kernel: lagg0: link state changed to UP
>> Jun 18 09:10:27  kernel: nfe1: link state changed to UP
>> Jun 18 09:10:27  ntpd_initres[1412]: couldn't resolve `yoshi', giving up
>> on it
>> Jun 18 09:10:28  dhclient: New Hostname (lagg0): mario
>> Jun 18 09:10:28  dhclient: New IP Address (lagg0):
>> Jun 18 09:10:28  dhclient: New Subnet Mask (lagg0):
>> Jun 18 09:10:28  dhclient: New Broadcast Address (lagg0):
>> Jun 18 09:10:28  dhclient: New Routers (lagg0):
> I upgraded my amd64 FreeBSD-8.0-RELEASE-p4 system to
> FreeBSD-8.1-RELEASE earlier this week.  After completing the upgrade
> and rebooting, I also am having the above reported problem.
> I am not using dhcp, I have configured a static IP address.
> My system also has nfe NIC.  I wonder if this problem is specific to
> systems using nfe network driver.  The problem was not occuring on my
> 8.0 system, before the upgrade to 8.1.
> Here are my boot messages that display this problem.


> It is pretty clear that the network services are all getting started
> twice, once before dropping to single user shell, and a second time
> after exiting single user.
> It is also pretty clear that "nfe0: link state changed to DOWN" is
> happening at a bad time; and nothing that requires network to be up is
> waiting for it to change to UP.

I have a workaround for this problem, albeit an ugly workaround.  I
edited /etc/rc.d/netif to add a 10 second sleep as each network
interface is brought up:

        if [ -n "${_ok}" ]; then
                case ${_func} in
                echo "${_str} Network:${_ok}."
                if check_startmsgs; then
                        for ifn in ${_ok}; do
                                /sbin/ifconfig ${ifn}
                                sleep 10

This is probably overkill, and for me it adds 20 seconds to boot time,
but it works for me until the general problem is solved.

I think there is a general bug with the rc.d/rcorder framework,
because even outside this weird case with nfe NIC if any network mount
fails during the early part of rc processing it is repeated in the
late part via "mount -a" in the second passthrough.  This results
potentially in multiple mounts of the same remote filesystem (e.g. if
mount_nfs is backgrounded in the first pass mount_nfs will be run a
second time in the second pass; and if the first problem isn't
resolved the second mount_nfs is also backgrounded.  For me this
usually results in two mounts of the same remote filesystem, after the
(presumably temporary) network mounting problem resolves).


More information about the freebsd-questions mailing list