Sunday, December 16, 2012

Samba issue: nmbd cannot bind to the broadcast address

I guess I hadn't run Samba on my Linux box for a while as it failed to run.

Checking /var/logs/samba/log.{s,n}mbd I found

2012/12/15 16:34:29.461856,  0] lib/util_sock.c:880(open_socket_in)
  bind failed on port 137 socket_addr = xx.yy.zz.255.
  Error = Cannot assign requested address

[2012/12/15 16:34:29.429656,  0] nmbd/nmbd_subnetdb.c:118(make_subnet)
  nmbd_subnetdb:make_subnet()
    Failed to open nmb bcast socket on interface xx.yy.zz.255 for port 137.  Error was Cannot assign requested address


A quick Google search on the actual error message, "Failed to open nmb bcast socket on"
pulled up various articles that Samba 3.5.x and possibly some of 3.6.x had a bug.

The fix:
Change my interface specifications in my smb.conf file

# Work around for bug
   interfaces = lo eth0
 

# This doesnn't work in 3.5.4 as we can't bind to the eth0 bcast addr !?
#    interfaces = 127.0.0.1/8 xx.yy.zz.vv/mm

2 comments:

chi kuan said...

Hi,

what do u mean by this? Can you show the command ? Thanks

|-----------------------------------------------------------------------------|

The fix:
Change my interface specifications in my smb.conf file

# Work around for bug
interfaces = lo eth0

# This doesnn't work in 3.5.4 as we can't bind to the eth0 bcast addr !?
# interfaces = 127.0.0.1/8 xx.yy.zz.vv/mm

MerlinYoda said...

chi kuan, the section you posted *clearly says* that these were lines in the smb.conf configuration file for samba that needed to be updated. There is no "command" involved other than to open the configuration file in the text editor of your choosing.