SMB service not starting in FREENAS 11.2 U1

mothball

Dabbler
Joined
Oct 27, 2013
Messages
11
my server is is not starting SMB services. I have actually reinstalled the 11.2 U1 and the condition remains. I get the following the console messages:

Jan 19 22:43:08 krypton root: /etc/rc: WARNING: failed to start nmbd
Jan 19 22:43:08 krypton root: /etc/rc: WARNING: failed to start smbd
Jan 19 22:43:08 krypton root: /etc/rc: WARNING: failed to start winbindd
Jan 19 22:46:42 krypton root: /usr/local/etc/rc.d/samba_server: WARNING: failed to start nmbd
Jan 19 22:46:42 krypton root: /usr/local/etc/rc.d/samba_server: WARNING: failed to start smbd
Jan 19 22:46:42 krypton root: /usr/local/etc/rc.d/samba_server: WARNING: failed to start winbindd

funny thing is i have a 2nd server running 11.2 U1 similarly configured and SMB service is running fine. I was browsing the forum and saw others posting similar problems. At a loss a reinstall usually fixes my issues. Any one have some trouble shooting tips/ideas
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,545
my server is is not starting SMB services. I have actually reinstalled the 11.2 U1 and the condition remains. I get the following the console messages:

Jan 19 22:43:08 krypton root: /etc/rc: WARNING: failed to start nmbd
Jan 19 22:43:08 krypton root: /etc/rc: WARNING: failed to start smbd
Jan 19 22:43:08 krypton root: /etc/rc: WARNING: failed to start winbindd
Jan 19 22:46:42 krypton root: /usr/local/etc/rc.d/samba_server: WARNING: failed to start nmbd
Jan 19 22:46:42 krypton root: /usr/local/etc/rc.d/samba_server: WARNING: failed to start smbd
Jan 19 22:46:42 krypton root: /usr/local/etc/rc.d/samba_server: WARNING: failed to start winbindd

funny thing is i have a 2nd server running 11.2 U1 similarly configured and SMB service is running fine. I was browsing the forum and saw others posting similar problems. At a loss a reinstall usually fixes my issues. Any one have some trouble shooting tips/ideas

The problems I have seen so far have been:
1) Stale `guest account` entry. Account didn't exist anymore.
2) Incorrect permissions on some of /var/db/samba4/

Start by posting your smb4.conf file.
 

mothball

Dabbler
Joined
Oct 27, 2013
Messages
11
The problems I have seen so far have been:
1) Stale `guest account` entry. Account didn't exist any more.
2) Incorrect permissions on some of /var/db/samba4/

Start by posting your smb4.conf file.

thanks for getting back to me so quickly!
1> please explain what you mean by stale "Guest" account - mine is formally set to "nobody" and the ownership of the drives are set to nobody,nogroup (internal home network file server set up)
2> attached copy of smb4.conf from my /etc/local directory

here is the text of smb4.conf
++++++++++++++++++++++++++++
[global]
server min protocol = SMB2_02
server max protocol = SMB3
encrypt passwords = yes
dns proxy = no
strict locking = no
oplocks = yes
deadtime = 15
max log size = 51200
max open files = 469001
logging = file
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
getwd cache = yes
guest account = nobody
map to guest = Bad User
obey pam restrictions = no
ntlm auth = no
directory name cache size = 0
kernel change notify = no
panic action = /usr/local/libexec/samba/samba-backtrace
nsupdate command = /usr/local/bin/samba-nsupdate -g
server string = FreeNAS Server
ea support = yes
store dos attributes = yes
lm announce = yes
hostname lookups = yes
time server = yes
acl allow execute always = true
dos filemode = yes
multicast dns register = yes
domain logons = no
local master = yes
idmap config *: backend = tdb
idmap config *: range = 90000001-100000000
server role = standalone
netbios name = KRYPTON
netbios aliases = KRYPTON
workgroup = THENUTFACTORY
security = user
create mask = 0666
directory mask = 0777
client ntlmv2 auth = yes
dos charset = CP437
unix charset = UTF-8
log level = 1


[jorel]
path = "/mnt/jorel"
printable = no
veto files = /.snapshot/.windows/.mac/.zfs/
writeable = yes
browseable = yes
access based share enum = no
vfs objects = zfs_space zfsacl streams_xattr
hide dot files = no
guest ok = yes
nfs4:mode = special
nfs4:acedup = merge
nfs4:chown = true
zfsacl:acesort = dontcare


[kalel]
path = "/mnt/kalel"
printable = no
veto files = /.snapshot/.windows/.mac/.zfs/
writeable = yes
browseable = yes
access based share enum = no
vfs objects = zfs_space zfsacl streams_xattr
hide dot files = no
guest ok = yes
nfs4:mode = special
nfs4:acedup = merge
nfs4:chown = true
zfsacl:acesort = dontcare


[zod]
path = "/mnt/zod"
printable = no
veto files = /.snapshot/.windows/.mac/.zfs/
writeable = yes
browseable = yes
access based share enum = no
vfs objects = zfs_space zfsacl streams_xattr
hide dot files = no
guest ok = yes
nfs4:mode = special
nfs4:acedup = merge
nfs4:chown = true
zfsacl:acesort = dontcare
+++++++++++++++++++++++++++++++++++++++++
thanks again for the help!
 

Attachments

  • smb4_conf.txt
    2.5 KB · Views: 482

mothball

Dabbler
Joined
Oct 27, 2013
Messages
11
debug file sent
 

OctaneZ

Dabbler
Joined
Aug 6, 2011
Messages
24
Has this been sorted?

Attached is the log on SMB service startup.
 

Attachments

  • log.smbd.txt
    404.4 KB · Views: 499

mothball

Dabbler
Joined
Oct 27, 2013
Messages
11

JohnMLTX

Cadet
Joined
Apr 12, 2017
Messages
7
Bumping this, I have the same issue.

Here's my debug file.
 

Attachments

  • debug-SAREA-20190407193549.tgz
    539.9 KB · Views: 343

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,545
The underlying issue is that samba does not start if for some reason the permissions for its state directory (/var/db/samba4) get set incorrectly.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,545
What do I need to run to fix those permissions? Thanks!
That was a summary of what I've seen in the past with 11.2-U2.1 issues and samba failing to start. Yours appears to be different. Check /var/db/system/cores for an smbd core file and send it to me if you have one. Once you have done that, try removing the contents of /var/db/samba4/ rm -rfx /var/db/samba4/* and restarting samba.
 

JohnMLTX

Cadet
Joined
Apr 12, 2017
Messages
7
Here's smbd.core

removed the contents of the samba4 directory, SMB still fails to start. Restarted, no change. Attached the error outputs from the console.

Going to attempt a clean install onto a different boot device, and pull the current one aside. Thanks for the assistance.
 

Attachments

  • smbd.zip
    9 KB · Views: 321
  • Sarea-SMB.txt
    5.8 KB · Views: 381

JohnMLTX

Cadet
Joined
Apr 12, 2017
Messages
7
Reporting back. Clean install to 11.2-U3 on a fresh boot device worked flawlessly. Pool imported, SMB started, and I'm back up and running as normal.
 

Dfi123729

Cadet
Joined
Aug 28, 2019
Messages
5
hi there got similar problem wondering if you could help

here is my debug file

many thanks
 

Attachments

  • debug-freenas-20190903113059.tgz
    276.2 KB · Views: 425

gunmask

Cadet
Joined
Jun 17, 2020
Messages
1
I tried restarting the nmbd service then checked the nmbd logs on /var/log/samba4/nmbd.log

I found a bunch of error messages stating which files had the wrong permissions and which were the right permissions to assign to them:

service nmbd restart cat /var/log/samba4/nmbd.log
...
[2020/06/18 00:31:25.427242, 0] ../../lib/util/util.c:276(directory_create_or_exist_strict)
invalid permissions on directory '/var/db/system/samba4/private/msg.sock': has 0775 should be 0700
[2020/06/18 00:43:56.098937, 0] ../../source3/nmbd/nmbd.c:906(main)
nmbd version 4.10.13 started.
Copyright Andrew Tridgell and the Samba Team 1992-2019
[2020/06/18 00:43:56.100100, 0] ../../lib/util/util.c:276(directory_create_or_exist_strict)
invalid permissions on directory '/var/db/system/samba4/private/msg.sock': has 0775 should be 0700
[2020/06/18 00:44:49.758158, 0] ../../source3/nmbd/nmbd.c:906(main)
nmbd version 4.10.13 started.
Copyright Andrew Tridgell and the Samba Team 1992-2019
[2020/06/18 00:44:49.759310, 0] ../../lib/util/util.c:276(directory_create_or_exist_strict)
invalid permissions on directory '/var/db/system/samba4/private/msg.sock': has 0775 should be 0700
[2020/06/18 00:46:04.249838, 0] ../../source3/nmbd/nmbd.c:906(main)
nmbd version 4.10.13 started.
Copyright Andrew Tridgell and the Samba Team 1992-2019
[2020/06/18 00:46:04.251020, 0] ../../lib/util/util.c:276(directory_create_or_exist_strict)
invalid permissions on directory '/var/run/samba4/msg.lock': has 0775 should be 0755

Then proceeded to fix every single one:
chmod -R 755 /var/run/samba4/ chmod ... chmod ...

and tried restarting the service and checking the logs over and over again until everything was fixed.

It worked for me.
 
Top