[Bug 180493] Re: nmbd shuts down when network disconnected

Steve Langasek steve.langasek at canonical.com
Sun Mar 16 22:08:09 GMT 2008


Testing with samba 3.0.28a, here is the output in
/var/log/samba/log.nmbd if I start samba before the network is up:

  [2008/03/16 04:35:51, 0] nmbd/nmbd.c:main(711)
    Netbios nameserver version 3.0.28a started.
    Copyright Andrew Tridgell and the Samba Team 1992-2008
  [2008/03/16 04:35:51, 0] nmbd/nmbd_subnetdb.c:create_subnets(190)
    create_subnets: No local interfaces !
  [2008/03/16 04:35:51, 0] nmbd/nmbd_subnetdb.c:create_subnets(191)
    create_subnets: Waiting for an interface to appear ...
  [2008/03/16 04:42:11, 0] nmbd/nmbd_become_lmb.c:become_local_master_stage2(396)
    *****
  
    Samba name server DARIO is now a local master browser for workgroup WORKGROUP 
  on subnet 192.168.13.50
  
    *****

However, if I specify an 'interfaces' line in /etc/samba/smb.conf, the
behavior is this:

  [2008/03/16 14:23:41, 0] nmbd/nmbd.c:main(711)
    Netbios nameserver version 3.0.28a started.
    Copyright Andrew Tridgell and the Samba Team 1992-2008
  [2008/03/16 14:23:41, 0] nmbd/nmbd_subnetdb.c:create_subnets(245)
    create_subnets: unable to create any subnet from given interfaces. nmbd is terminating
  [2008/03/16 14:23:41, 0] nmbd/nmbd.c:main(785)
    ERROR: Failed when creating subnet lists. Exiting.

So the upstream changes do not resolve this issue for all use cases, and
it looks like a if-up.d script is still needed.

Furthermore, if I bring nmbd up with an 'interfaces' line, then drop the
network interface and kill nmbd with -HUP (emulating the circumstances
when logrotate runs while the network is down), nmbd goes into an
infinite loop thousands of times a second, reporting:

  [2008/03/16 14:29:08, 0] nmbd/nmbd.c:reload_interfaces(239)
    reload_interfaces: No subnets to listen to. Waiting..

and the process doesn't notice when the network comes back, and isn't
killable with /etc/init.d/samba stop.

This same procedure without an explicit 'interfaces' line in smb.conf
appears to give the desired results, aside from the lack of indication
in the logfile that it's finished waiting.

So the if-up.d script is probably expendible if the 'interfaces' case is
fixed upstream, which is somewhat necessary anyway.

** Changed in: samba (Ubuntu)
       Status: Confirmed => Fix Released

** Changed in: samba (Ubuntu)
       Status: Fix Released => Confirmed

-- 
nmbd shuts down when network disconnected
https://bugs.launchpad.net/bugs/180493
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to samba in ubuntu.



More information about the Ubuntu-server-bugs mailing list