I have a small Samba just for file sharing on a ARM device (SheevaPlug). Until now everything was fine, however I decided to upgrade to Debian 8.1 and by some reason the shares aren't working properly.
Whenever the device boots I'm unable to access the Samba shares, they're are advertised and all but I'm unable to connect, my OS says the server is unavailable.
However, if I restart Samba manually over SSH on the device using:
service smbd restart
The shares start to work again. So I decided to investigate log files and got this:
[2015/08/08 22:45:54.596532, 0] ../lib/util/become_daemon.c:147(daemon_status) STATUS=daemon 'nmbd' : No local IPv4 non-loopback interfaces available, waiting for interface ...NOTE: NetBIOS name resolution is not supported for Internet Protocol Version 6 (IPv6). [2015/08/08 22:45:59.599920, 0] ../lib/util/become_daemon.c:136(daemon_ready) STATUS=daemon 'nmbd' finished starting up and ready to serve connections*****
2015/08/08 22:45:57.881551, 0] ../lib/util/become_daemon.c:136(daemon_ready) STATUS=daemon 'smbd' finished starting up and ready to serve connectionsopen_sockets_smbd: No sockets available to bind to. [2015/08/08 22:45:57.913376, 0] ../source3/lib/util.c:785(smb_panic_s3) PANIC (pid 996): open_sockets_smbd() failed [2015/08/08 22:45:57.923081, 0] ../source3/lib/util.c:896(log_stack_trace)
I guess Samba is starting before the network is ready and working, am I right? If yes how can I fix this and make sure the network is actually available before starting Samba?
This is my current Samba configuration:
[global] workgroup = WORKGROUP netbios name = Super-Share server string = Super-Share security = USER invalid users = root encrypt passwords = true lanman auth = No hosts allow = 127.0.0.1 172.20.1.0/24 hosts deny = 0.0.0.0/0 interfaces = eth0 bind interfaces only = yes browseable = Yes max protocol = smb2 socket options = TCP_NODELAY IPTOS_LOWDELAY read raw = No write raw = No use sendfile = Yes refresh = 1 max xmit = 131072 aio write behind = true aio read size = 16384 aio write size = 16384 name resolve order = wins hosts lmhosts bcast dns proxy = No load printers = No printing = bsd printcap name = /dev/null disable spoolss = yes [SU1] path = /mnt/SU1/SU1/ read only = No guest ok = No writable = yes force user = root force group = root create mask = 0777 directory mask = 0777
As I expected this is a network issue. If I add:
post-up /etc/init.d/smbd restart
/etc/network/interfaces it works fine, however it's dirty, I can I properly fix this?