[Pkg-samba-maint] Bug#698056: samba: nmbd fails to start when no interfaces are up
Sam Morris
sam at robots.org.uk
Sun Jan 13 15:35:45 UTC 2013
Package: samba
Version: 2:3.6.6-3
Severity: important
If nmbd is started before network interfaces are up, it exits with the
following messages:
[2013/01/12 20:29:47, 0] nmbd/nmbd.c:861(main)
nmbd version 3.6.6 started.
Copyright Andrew Tridgell and the Samba Team 1992-2011
[2013/01/12 20:29:47, 0] lib/interface.c:520(load_interfaces)
ERROR: Could not determine network interfaces, you must use a interfaces config line
This can be reproduced manually by bringing all interfaces (including
lo) down, and then running 'nmbd -FS'.
(I don't have 'bind interfaces only' in smb.conf.)
In the real world, this happens on an SSD-using system that boots up
*really* quickly. According to the logs, NM does not complete network
configuration (via DHCP) until 20:29:50... three seconds after nmbd has
already given up hope.
This bug seems similar to #433449/#576415, in which nmbd would exit if
all network interfaces (except lo) were brought down while nmbd was
running. Those bugs were fixed by introducing an if-up hook script that
reloaded samba. That script went away in version 2:3.6.5-5, when a patch
(libutil_drop_AI_ADDRCONFIG.patch) was added that stopped nmbd from
exiting in the first place. It appears, however, that we overlooked
nmbd's behaviour when started before any network interfaces are up.
The attached patch, taken from #382429, seems to work for me; with it I
can start nmbd, then bring up lo and eth0 and resolve the system's own
name with nmblookup. I tried bringing the interfaces down and up again a
few times without any further problems.
Patching nmbd would be my preferred fix; re-introducing the hook script
would work around the problem for most users, but my problem with the
hook script in the first place was that it didn't work under systemd
(which does not expect an init script to manage two daemons).
-- System Information:
Debian Release: 7.0
APT prefers testing-updates
APT policy: (500, 'testing-updates'), (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.7-trunk-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages samba depends on:
ii adduser 3.113+nmu3
ii debconf [debconf-2.0] 1.5.49
ii dpkg 1.16.9
ii libacl1 2.2.51-8
ii libattr1 1:2.4.46-8
ii libc6 2.13-37
ii libcap2 1:2.22-1.2
ii libcomerr2 1.42.5-1
ii libcups2 1.5.3-2.12
ii libgssapi-krb5-2 1.10.1+dfsg-3
ii libk5crypto3 1.10.1+dfsg-3
ii libkrb5-3 1.10.1+dfsg-3
ii libldap-2.4-2 2.4.31-1
ii libpam-modules 1.1.3-7.1
ii libpam-runtime 1.1.3-7.1
ii libpam0g 1.1.3-7.1
ii libpopt0 1.16-7
ii libtalloc2 2.0.7+git20120207-1
ii libtdb1 1.2.10-2
ii libwbclient0 2:3.6.6-3
ii lsb-base 4.1+Debian8
ii procps 1:3.3.3-2
ii samba-common 2:3.6.6-3
ii update-inetd 4.43
ii zlib1g 1:1.2.7.dfsg-13
Versions of packages samba recommends:
ii logrotate 3.8.1-4
ii tdb-tools 1.2.10-2
Versions of packages samba suggests:
pn ctdb <none>
pn ldb-tools <none>
pn openbsd-inetd | inet-superserver <none>
pn smbldap-tools <none>
-- debconf information:
samba/run_mode: daemons
samba-common/title:
--
Sam Morris <sam at robots.org.uk>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nmbd_allow_0_interfaces.patch
Type: text/x-patch
Size: 623 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-samba-maint/attachments/20130113/e23ab11d/attachment.bin>
More information about the Pkg-samba-maint
mailing list