[Pkg-samba-maint] Bug#698056: samba: nmbd fails to start when no interfaces are up
Steve Langasek
vorlon at debian.org
Mon Jan 14 02:56:53 UTC 2013
On Sun, Jan 13, 2013 at 03:35:45PM +0000, Sam Morris wrote:
> 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.
If you can only reproduce this by bringing lo down, then the question is:
why are you bringing lo down?
The loopback interface should be up by the time the system finishes
processing /etc/rcS.d and should stay up until the system shuts down. It's
entirely reasonable for nmbd to assume this is the case.
> 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).
> Index: samba-3.6.10/source3/lib/interface.c
> ===================================================================
> --- samba-3.6.10.orig/source3/lib/interface.c 2013-01-13 14:37:28.574523129 +0000
> +++ samba-3.6.10/source3/lib/interface.c 2013-01-13 14:46:56.413338890 +0000
> @@ -515,7 +515,7 @@
> /* if we don't have a interfaces line then use all broadcast capable
> interfaces except loopback */
> if (!ptr || !*ptr || !**ptr) {
> - if (total_probed <= 0) {
> + if (total_probed < 0) {
> DEBUG(0,("ERROR: Could not determine network "
> "interfaces, you must use a interfaces config line\n"));
> exit(1);
I don't think this is a correct fix; I think you have a boot ordering
problem on your systemd-using system.
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
slangasek at ubuntu.com vorlon at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-samba-maint/attachments/20130113/4111b5a3/attachment.pgp>
More information about the Pkg-samba-maint
mailing list