SMB sharing issue on fresh install

Status
Not open for further replies.

drash

Cadet
Joined
Aug 13, 2014
Messages
6
Hello,

I'm running a fresh install of FreeNAS 9.2.1.7, all seems to run fine, but I can see some error messages in the logs that I would like to fix.

They seems related to the SMB sharing service, but I'm not 100% sur about it.

Here is what I get in the logs on boot:
Code:
Sep 29 07:46:33 AST-vFreeNAS generate_smb4_conf.py: [common.pipesubr:58] Popen()ing: /sbin/sysctl -n 'kern.maxfilesperproc'
Sep 29 07:46:33 AST-vFreeNAS generate_smb4_conf.py: [common.pipesubr:58] Popen()ing: zfs list -H -o mountpoint,name
Sep 29 07:46:33 AST-vFreeNAS generate_smb4_conf.py: [common.pipesubr:58] Popen()ing: zfs list -H -o mountpoint
Sep 29 07:46:33 AST-vFreeNAS last message repeated 5 times
Sep 29 07:46:33 AST-vFreeNAS generate_smb4_conf.py: [common.pipesubr:58] Popen()ing: /usr/local/bin/pdbedit -d 0 -i smbpasswd:/tmp/tmpIsptTG -s /usr/local/etc/smb4.conf -e tdbsam:/var/etc/private/passdb.tdb
Sep 29 07:46:33 AST-vFreeNAS generate_smb4_conf.py: [common.pipesubr:58] Popen()ing: /usr/local/bin/net groupmap list
Sep 29 07:46:33 AST-vFreeNAS generate_smb4_conf.py: [common.pipesubr:58] Popen()ing: /usr/bin/getent passwd 'drash'
Sep 29 07:46:33 AST-vFreeNAS nmbd[2751]: [2014/09/29 07:46:33.694475,  0] ../lib/util/become_daemon.c:136(daemon_ready)
Sep 29 07:46:33 AST-vFreeNAS winbindd[2757]: [2014/09/29 07:46:33.857463,  0] ../source3/winbindd/winbindd_cache.c:3196(initialize_winbindd_cache)
Sep 29 07:46:33 AST-vFreeNAS winbindd[2757]:   initialize_winbindd_cache: clearing cache and re-creating with version number 2
Sep 29 07:46:33 AST-vFreeNAS winbindd[2757]: [2014/09/29 07:46:33.907708,  0] ../lib/util/become_daemon.c:136(daemon_ready)
Sep 29 07:46:34 AST-vFreeNAS winbindd[2763]:   STATUS=daemon 'winbindd' finished starting up and ready to serve connectionsidmap range not specified for domain AST-VFREENAS
Sep 29 07:46:34 AST-vFreeNAS smbd[2754]: [2014/09/29 07:46:34.134161,  0] ../lib/util/become_daemon.c:136(daemon_ready)
Sep 29 07:46:34 AST-vFreeNAS smbd[2754]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 1
Sep 29 07:46:35 AST-vFreeNAS smbd[2754]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 2
Sep 29 07:46:36 AST-vFreeNAS smbd[2754]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 3
Sep 29 07:46:37 AST-vFreeNAS smbd[2754]: dnssd_clientstub ConnectToServer: connect() failed Socket:33 Err:-1 Errno:2 No such file or directory
Sep 29 07:46:38 AST-vFreeNAS kernel: done.
Sep 29 07:46:56 AST-vFreeNAS nmbd[2751]:   STATUS=daemon 'nmbd' finished starting up and ready to serve connections*****
Sep 29 07:46:56 AST-vFreeNAS nmbd[2751]:  
Sep 29 07:46:56 AST-vFreeNAS nmbd[2751]:   Samba name server AST-VFREENAS is now a local master browser for workgroup DRASH on subnet 192.168.129.151
Sep 29 07:46:56 AST-vFreeNAS nmbd[2751]:  
Sep 29 07:46:56 AST-vFreeNAS nmbd[2751]:   *****


When I access the share for one of my client PC, I get thoses messages in the logs:
Code:
Sep 29 07:50:33 AST-vFreeNAS winbindd[2761]:   STATUS=daemon 'winbindd' finished starting up and ready to serve connectionssam_rids_to_names: possible deadlock - trying to lookup SID S-1-5-21-3636793403-1760579615-2234327342
Sep 29 07:50:34 AST-vFreeNAS winbindd[2761]: [2014/09/29 07:50:34.047840,  0] ../source3/winbindd/winbindd_samr.c:769(sam_rids_to_names)
Sep 29 07:50:34 AST-vFreeNAS winbindd[2761]:   sam_rids_to_names: possible deadlock - trying to lookup SID S-1-5-21-3636793403-1760579615-2234327342
Sep 29 07:50:46 AST-vFreeNAS smbd[3886]:   STATUS=daemon 'smbd' finished starting up and ready to serve connectionsast-pc-arnaud (ipv4:192.168.129.100:51178) closed connection to service Backups


And also when I shutdown or reboot the server I see those messages:

Code:
Sep 29 07:43:55 AST-vFreeNAS python: dnssd_clientstub ConnectToServer: connect()-> No of tries: 1
Sep 29 07:43:55 AST-vFreeNAS last message repeated 2 times
Sep 29 07:43:56 AST-vFreeNAS kernel: , 2617
Sep 29 07:43:56 AST-vFreeNAS python: dnssd_clientstub ConnectToServer: connect()-> No of tries: 2
Sep 29 07:43:56 AST-vFreeNAS last message repeated 2 times
Sep 29 07:43:57 AST-vFreeNAS kernel: , 2617
Sep 29 07:43:57 AST-vFreeNAS python: dnssd_clientstub ConnectToServer: connect()-> No of tries: 3
Sep 29 07:43:57 AST-vFreeNAS last message repeated 2 times
Sep 29 07:43:58 AST-vFreeNAS kernel: , 2617
Sep 29 07:43:58 AST-vFreeNAS python: dnssd_clientstub ConnectToServer: connect() failed Socket:8 Err:-1 Errno:61 Connection refused
Sep 29 07:43:58 AST-vFreeNAS python: dnssd_clientstub ConnectToServer: connect() failed Socket:4 Err:-1 Errno:61 Connection refused
Sep 29 07:43:58 AST-vFreeNAS python: dnssd_clientstub ConnectToServer: connect() failed Socket:7 Err:-1 Errno:61 Connection refused


Are all of those messages related to each others?
How can I fix this?

Thanks in andvance for your help and suggestions.
 

drash

Cadet
Joined
Aug 13, 2014
Messages
6
Hello,
For the deadlock issue I sorted out that this script executed 'post-init' fix it:

Code:
#!/bin/bash

VAR1=`net groupmap list | sed 's/.*(\(.*\)).*/\1/'`
VAR2=`net groupmap list | awk '{print $1}'`
VAR3=`echo $VAR1 | awk '{print substr($0,length-3,4)}'`

net groupmap delete sid="${VAR1}"
net groupmap add unixgroup=${VAR2} rid=${VAR3}


For the 'dnssd_clientstub' at boot and shutdown, I have registered a bug report. Waiting for clarifications.
https://bugs.freenas.org/issues/6215#change-26429
 
Last edited:

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Hello,
For the deadlock issue I sorted out that this script executed 'post-init' fix it:

Code:
#!/bin/bash

VAR1=`net groupmap list | sed 's/.*(\(.*\)).*/\1/'`
VAR2=`net groupmap list | awk '{print $1}'`
VAR3=`echo $VAR1 | awk '{print substr($0,length-3,4)}'`

net groupmap delete sid="${VAR1}"
net groupmap add unixgroup=${VAR2} rid=${VAR3}


For the 'dnssd_clientstub' at boot and shutdown, I have registered a bug report. Waiting for clarifications.
https://bugs.freenas.org/issues/6215#change-26429
Wouldn't the following be a more correct way of doing this via bash (ugh):

Code:
#!/bin/sh

# I'm using bash because I don't know a real scripting language
# Set new line as the delimiter for the array
IFS=$'\n'

# Populate an array with groupmap info and figure out how many times we have to loop this dumb script
GroupMapList=(`net groupmap list`)
ArrayElements=$(echo ${#GroupMapList[@]})
CurrentElement="0"

while [ "$CurrentElement" -lt "$ArrayElements" ]
do
     SID=$(echo ${GroupMapList["$CurrentElement"]} | sed "s/.*(\(.*\)).*/\1/")
     GroupName=$(echo ${GroupMapList["$CurrentElement"]} | awk '{print $1}')
     RID=$(echo "$SID" | awk '{print substr($0,length-3,4)}')
     net groupmap delete sid="$SID"
     net groupmap add unixgroup="$GroupName" rid="$RID"
     CurrentElement=$[$CurrentElement + 1]
done

That being said, it doesn't really do much for me, which makes sense because the final result of running this script will be a group map that is identical to the input.

All that being said, the bug is fixed in 9.3.
 
Last edited:
Status
Not open for further replies.
Top