LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-28-2015, 11:21 AM   #1
PastulioLive
Member
 
Registered: Nov 2014
Posts: 39

Rep: Reputation: Disabled
Sporadic FileNotFound errors on samba3 within Ubuntu 12.04 docker


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
 
Old 05-28-2015, 01:03 PM   #2
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by PastulioLive View Post
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.
Pascal:
You sound way over my experience level with [Dd]ocker, but it does appear your assessment of "--privileged=true" is a path I'd look into. "but a "privileged" container is given access to all devices"[1]
during run should resolve the issue. I can't say why it is intermittent.

Sorry, wish I had more for you.
 
Old 05-28-2015, 01:42 PM   #3
PastulioLive
Member
 
Registered: Nov 2014
Posts: 39

Original Poster
Rep: Reputation: Disabled
Thanks for you reply Habitual.

I am not really over your experience, I've been looking on google for a while before posting.
You pick some stuff up, but I don't know if it is relevant.

I am going to try it when I get a chance to restart the service!

Pascal
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Docker Engine 1.6 Debuts Alongside Docker Registry 2.0 and Compose 1.2.0 LXer Syndicated Linux News 0 04-17-2015 09:02 PM
LXer: Red Hat partners with Docker to create Linux/Docker software stack LXer Syndicated Linux News 0 03-12-2015 05:54 PM
LXer: Ubuntu LXD: Not a Docker replacement, a Docker enhancement LXer Syndicated Linux News 0 11-05-2014 08:40 PM
LXer: Docker Founder Explains What Docker is all About LXer Syndicated Linux News 0 08-21-2014 09:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration