Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Sep 2010 09:45:02 -0500
From:      Peggy Wilkins <enlil65@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: network deamons starting before network!
Message-ID:  <AANLkTimmpvngh88TRuC2bKS%2BORCX1vyJdAg_0Rw4f%2BuJ@mail.gmail.com>
In-Reply-To: <4C1B20F0.2090804@mapper.nl>
References:  <4C1B20F0.2090804@mapper.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jun 18, 2010 at 2:32 AM, Mark Stapper <stark@mapper.nl> 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 =A0 =A0 ****@mario:/usr/obj/usr/src/sys/mario =A0amd64
> What could I do to fix this?
>
> Here's an exerpt from /var/log/messages:
>
> Jun 18 09:10:25 =A0ntpd[1376]: ntpd 4.2.4p5-a (1)
> Jun 18 09:10:25 =A0kernel: fuse4bsd: version 0.3.9-pre1, FUSE ABI 7.8
> Jun 18 09:10:27 =A0ntpd_initres[1412]: host name not found: yoshi
> Jun 18 09:10:27 =A0kernel: nfe0: link state changed to UP
> Jun 18 09:10:27 =A0kernel: lagg0: link state changed to UP
> Jun 18 09:10:27 =A0kernel: nfe1: link state changed to UP
> Jun 18 09:10:27 =A0ntpd_initres[1412]: couldn't resolve `yoshi', giving u=
p
> on it
> Jun 18 09:10:28 =A0dhclient: New Hostname (lagg0): mario
> Jun 18 09:10:28 =A0dhclient: New IP Address (lagg0): 10.58.235.6
> Jun 18 09:10:28 =A0dhclient: New Subnet Mask (lagg0): 255.255.255.0
> Jun 18 09:10:28 =A0dhclient: New Broadcast Address (lagg0): 10.58.235.255
> Jun 18 09:10:28 =A0dhclient: New Routers (lagg0): 10.58.235.1

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.  (I will note
that nfe0 shows "no carrier".)

Setting hostname: capricorn.lib.uchicago.edu
nfe0: link state changed to DOWN
Starting Network: lo0 nfe0.
lo0: flags=3D8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=3D3<RXCSUM,TXCSUM>
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
        inet6 ::1 prefixlen 128
        inet 127.0.0.1 netmask 0xff000000
        nd6 options=3D3<PERFORMNUD,ACCEPT_RTADV>
nfe0: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 150=
0
        options=3D80008<VLAN_MTU,LINKSTATE>
        ether 00:1a:92:45:c5:25
        inet 128.135.53.92 netmask 0xffffff00 broadcast 128.135.53.255
        media: Ethernet autoselect (none)
        status: no carrier
add net default: gateway 128.135.53.1
Starting devd.
Mounting NFS file systems:
mount_nfs:
quarto: hostname nor servname provided, or not known
[snip -- this is repeated for every NFS mount we have configured]
ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib
/usr/local/lib/compat/pkg /usr/local/kde4/lib /usr/local/lib/qt4
/usr/local/lib/virtualbox /usr/local/lib/zsh
32-bit compatibility ldconfig path: /usr/lib32
Creating and/or trimming log files
.
Starting syslogd.
Starting rpcbind.
NFS access cache time=3D60
rpc.umntall:
quarto: MOUNTPROG: RPC: Unknown host
[snip -- repeated errors again]
Starting amd.
Sep  1 17:49:11 capricorn amd[1017]/info:
using configuration file /etc/amd.conf
Clearing /tmp (X related).
Starting mountd.
Sep  1 17:49:12 capricorn mountd[1091]: can't get address info for
host mozart.lib.uchicago.edu
Sep  1 17:49:12 capricorn mountd[1091]: bad host
mozart.lib.uchicago.edu, skipping
Sep  1 17:49:12 capricorn mountd[1091]: bad exports list line /disk/1
-alldirs mozart.lib.uchicago.edu
[snip -- repeated errors for each line in /etc/exports and /etc/zfs/exports=
]
Starting nfsd.
Starting statd.
Starting lockd.
NLM: failed to contact remote rpcbind, stat =3D 7, port =3D 28416
Sep  1 17:49:12 capricorn rpcbind: connect from ::1 to
getport/addr(status): request from unauthorized host
Sep  1 17:49:12 capricorn kernel: NLM: failed to contact remote
rpcbind, stat =3D 7, port =3D 28416
Starting local daemons:
.
Starting lpd.
Updating motd:
.
Mounting late file systems:
mount_nfs:
quarto: hostname nor servname provided, or not known
[snip repeated errors]
Mounting /etc/fstab filesystems failed,  startup aborted
ERROR: ABORTING BOOT (sending SIGTERM to parent)!
Sep  1 17:49:12 capricorn init: /bin/sh on /etc/rc terminated
abnormally, going to single user mode
Enter full pathname of shell or RETURN for
/bin/sh
:
#
nfe0: link state changed to UP


 =3D=3D=3D=3D=3D END boot messages excerpt

At this point I can fix all issues by killing mountd and syslogd and
then exiting single user.

The reason to kill mountd is that without doing this two mountd's will
be running.

The reason to kill syslogd is that if I don't kill it before exiting
single user:
Starting syslogd.
Sep  1 17:53:17  syslogd: bind: Address already in use
Sep  1 17:53:17  syslogd: bind: Address already in use
syslogd:
child pid 1910 exited with return code 1
/etc/rc: WARNING: failed to start syslogd

This also causes errors later because there is no /var/run/syslog.pid
written (it gets deleted).

I also get these warnings (after exiting single user):
rpcbind already running? (pid=3D990).
amd already running? (pid=3D1028).
Clearing /tmp (X related).
Starting mountd.
nfsd already running? (pid=3D1101 1102).
statd already running? (pid=3D1109).
lockd already running? (pid=3D1116).
Starting local daemons:
.
lpd already running? (pid=3D1162).

But these are not problematic.

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.

Is this a clear enough report?  Time for a send-pr?  (I haven't done
that in many years.)

plw



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTimmpvngh88TRuC2bKS%2BORCX1vyJdAg_0Rw4f%2BuJ>