Re: network deamons starting before network!

2010-09-03 Thread Peggy Wilkins
On Thu, Sep 2, 2010 at 9:45 AM, Peggy Wilkins enli...@gmail.com wrote:
 On Fri, Jun 18, 2010 at 2:32 AM, Mark Stapper st...@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     *...@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): 10.58.235.6
 Jun 18 09:10:28  dhclient: New Subnet Mask (lagg0): 255.255.255.0
 Jun 18 09:10:28  dhclient: New Broadcast Address (lagg0): 10.58.235.255
 Jun 18 09:10:28  dhclient: 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.

[snip]

 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
ifn_start)
_str='Starting'
;;
ifn_stop)
_str='Stopping'
;;
esac
echo ${_str} Network:${_ok}.
if check_startmsgs; then
for ifn in ${_ok}; do
/sbin/ifconfig ${ifn}
sleep 10
done
fi
fi


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).

plw
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: network deamons starting before network!

2010-09-02 Thread Peggy Wilkins
On Fri, Jun 18, 2010 at 2:32 AM, Mark Stapper st...@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     *...@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): 10.58.235.6
 Jun 18 09:10:28  dhclient: New Subnet Mask (lagg0): 255.255.255.0
 Jun 18 09:10:28  dhclient: New Broadcast Address (lagg0): 10.58.235.255
 Jun 18 09:10:28  dhclient: 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=8049UP,LOOPBACK,RUNNING,MULTICAST metric 0 mtu 16384
options=3RXCSUM,TXCSUM
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff00
nd6 options=3PERFORMNUD,ACCEPT_RTADV
nfe0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 1500
options=80008VLAN_MTU,LINKSTATE
ether 00:1a:92:45:c5:25
inet 128.135.53.92 netmask 0xff00 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=60
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 = 7, port = 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 = 7, port = 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


 = 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 

Re: network deamons starting before network!

2010-06-19 Thread Stephen Morton

On Jun 18, 2010, at 3:32 AM, Mark Stapper wrote:

 Hello,
 
 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?

If this is a machine that will always have internet at boot time, try putting 
synchronous_dhclient=YES 
in your rc.conf. I had the same problem, and that fixed it for 
me.___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


network deamons starting before network!

2010-06-18 Thread Mark Stapper
Hello,

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): 10.58.235.6
Jun 18 09:10:28  dhclient: New Subnet Mask (lagg0): 255.255.255.0
Jun 18 09:10:28  dhclient: New Broadcast Address (lagg0): 10.58.235.255
Jun 18 09:10:28  dhclient: New Routers (lagg0): 10.58.235.1




signature.asc
Description: OpenPGP digital signature