Jump to content

Docker image fails when persistent storage on CIFS share


Recommended Posts

Posted (edited)

I have a clean VM running Ubuntu 16.04 on VWare ESXi 6.5. I have a CIFS share mounted at /mnt/appdata with the noperm flag. The share is writeable.

 

I installed Docker using the instructions here: https://hub.docker.com/r/emby/embyserver/

docker run -it --rm -v /usr/local/bin:/target \
    -e "APP_USER=robert" \
    -e "APP_CONFIG=/mnt/appdata/emby" \
    emby/embyserver instl

then

docker run -it --rm -v /etc/systemd/system:/target \
   emby/embyserver instl service

the next command, sudo systemctl enable emby-server.service, didnt work. Instead I had to do:

sudo systemctl enable emby-server@.service

then I ran emby-server and configured it with a path /mnt/video (Also a CIFS share mounted on my local machine). However, Emby doesnt work - and i see an error in the attached log ("svc.txt"):

?2016-12-04T09:49:04.572948238Z Error, Main, UnhandledException
52016-12-04T09:49:04.573027012Z  *** Error Report ***
42016-12-04T09:49:04.573039000Z  Version: 3.0.8500.0
2016-12-04T09:49:04.573049078Z  Command line: /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe -programdata /config -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartpath /usr/lib/emby-server/restart.sh
@2016-12-04T09:49:04.573081031Z  Operating system: Unix 4.4.0.31
32016-12-04T09:49:04.573090300Z  Processor count: 4
02016-12-04T09:49:04.573097909Z  64-Bit OS: True
52016-12-04T09:49:04.573105143Z  64-Bit Process: True
;2016-12-04T09:49:04.573112588Z  Program data path: /config
b2016-12-04T09:49:04.573119889Z  Mono: 4.6.2 (Stable 4.6.2.7/08fd525 Mon Nov 21 15:56:40 UTC 2016)
h2016-12-04T09:49:04.573127634Z  Application Path: /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe
=2016-12-04T09:49:04.573135097Z  One or more errors occurred.
:2016-12-04T09:49:04.573142348Z  System.AggregateException
2016-12-04T09:49:04.573151009Z    at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks, System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x00242] in <8f2c484307284b51944a1a13a14c0266>:0 
2016-12-04T09:49:04.573161976Z    at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks, System.Int32 millisecondsTimeout) [0x00000] in <8f2c484307284b51944a1a13a14c0266>:0 
2016-12-04T09:49:04.573172331Z    at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks) [0x00000] in <8f2c484307284b51944a1a13a14c0266>:0 
>2016-12-04T09:49:04.573181859Z    at MediaBrowser.Server.Mono.MainClass.RunApplication (MediaBrowser.Server.Implementations.ServerApplicationPaths appPaths, MediaBrowser.Model.Logging.ILogManager logManager, MediaBrowser.Server.Startup.Common.StartupOptions options) [0x000cf] in <8385af0cf454438f8df15fa62f41afa4>:0 
2016-12-04T09:49:04.573191220Z    at MediaBrowser.Server.Mono.MainClass.Main (System.String[] args) [0x0008a] in <8385af0cf454438f8df15fa62f41afa4>:0 
S2016-12-04T09:49:04.573199399Z  InnerException: System.Data.SQLite.SQLiteException
32016-12-04T09:49:04.573206751Z  database is locked
32016-12-04T09:49:04.573213834Z  database is locked

I tried running the container directly:

docker run -d --name="EmbyServer" --net="host" -e TZ="UTC" -e HOST_OS="ubuntu" -e "TCP_PORT_8096"="8096" -v "/mnt/appdata/emby/":"/config":rw emby/embyserver

but i get the same error ("just run.txt"). I checked, and the /mnt/appdata/emby folder is being created:

robert@d:~$ ls /mnt/appdata/emby
abc config data localization logs
robert@d:~$ du -sh /mnt/appdata/emby
3.4M /mnt/appdata/emby

so clearly the share is writeable from within the container. If I run the container without using the mapped volume:

docker run -d --name="EmbyServer" --net="host" -e TZ="UTC" -e HOST_OS="ubuntu" -e "TCP_PORT_8096"="8096"  emby/embyserver

it's reachable at http://host:8096 and works fine ("no map.txt") - but obviously the configuration isn't persistent.

 

Any ideas?

 

---

edit 1: added notes to confirm that the mount is writeable by the container

just run.txt

no map.txt

svc.txt

Edited by mnbf9rca
Posted

Ok - I've found the cause. It can be fixed by modifying the mount to use the nobrl flag:

//<host>/appdata /mnt/appdata cifs iocharset=utf8,credentials=/root/.smbcredentials,nobrl,dir_mode=0775,nofail,gid=10,noperm 0 0

With this, sqlite works fine over a CIFS share.

 

 

Posted

Thanks for reporting this.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...