Hello!
I am having some issues with one of our file servers.
One of our developers has noticed that some of his (jenkins) jobs are failing.
This is because the connection to the samba fileserver is returning "FileNotFound".
The problem happens sporadically on random files.
(The developer has managed to work around this problem by implementing a retry system, but I need to figure out why this is happening, because it will surely become a problem again.)
The setup:
I am running a fileserver that has a docker container with Ubuntu 12.04 to share a volume via samba3.
The docker container is running smbd for filesharing and nscd and nslcd for LDAP authentication.
Samba3 is used for the "security = server" option. (I am aware of the security implications.)
The docker is started using the following command:
Code:
docker run -ti -v /opt/FileShare/:/opt/FileShare -v /etc/localtime:/etc/localtime:ro -p 445:445 -p 139:139 --name samba3 a6e58d6e451a /bin/bash
While doing some research I've noticed that I forgot to add port 445/udp on docker, I just have TCP.
I will add it to the command next time I can schedule a restart. Not sure if this can cause problems.
smb.conf
Code:
[global]
unix extensions = no
workgroup = companylocal
server string = fileserver
security = server
password server = sambasrv
# Added to disable print sharing, not yet in effect
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
[FileShare]
comment = FileShare
path = /opt/FileShare
public = yes
writable = yes
readonly = no
create mask = 0777
directory mask = 0775
wide links = yes
Logs
I am seeing the following messages in the log file
(/var/lib/samba/log.smbd):
Code:
[2015/05/21 11:58:28.668740, 0] param/loadparm.c:9114(process_usershare_file)
process_usershare_file: stat of /var/lib/samba/usershares/.svn failed. No such file or directory
[2015/05/21 11:58:28.669567, 0] param/loadparm.c:9114(process_usershare_file)
process_usershare_file: stat of /var/lib/samba/usershares/.svn failed. Permission denied
I am not using the directory /var/lib/samba/usershares/ at all, it is empty (and owned by group sambashare).
The only share I have is /opt/FileShare.
Code:
[2015/05/21 11:58:29.316678, 0] lib/system.c:1090(set_process_capability)
set_process_capability: cap_set_proc failed: Operation not permitted
I have no idea what this means, but after some google-magic, I think this is because I am running samba within a docker container that is not using the "-privileged" flag?
It would be strange if this is causeing the problem, because the problem is very sporadic and if it was a permission issue, shouldn't it always be a problem?
Code:
[2015/05/28 17:32:10.618277, 0] printing/print_cups.c:110(cups_connect)
Unable to connect to CUPS server localhost:631 - Connection refused
[2015/05/28 17:32:10.618592, 0] printing/print_cups.c:487(cups_async_callback)
failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
I doubt this is related at all, but I'm addding it for copleteness.
I have disabled printer sharing in smb.conf now which should take effect when I restart the service.
The developer has also just added a timestamp to the retry feature, as soon as another job runs, I will look for a FileNotFound with a timestamp that might help.
If anybody has any idea what is going on, some help would be greatly appreciated.
This is unfortunaly at bit above my knowledge on the subject.
Thanks in advance,
Pascal