Jump to content

Docker


Luke

Recommended Posts

StevenDTX

I've kicked off a new docker build. keep in mind we have some new dependencies that have not been incorporated into docker yet, but we'll get it in for the next server release.

 

libwebp - 0.4.1

MediaInfo

 

Thank you!  It works great now.

Link to comment
Share on other sites

  • 2 weeks later...

I've been trying the official MediaBrowser docker and the metadata (mostly images) is pretty poor. Is this standard or do I need to look into this more?

Link to comment
Share on other sites

Well this has nothing to do with docker itself so you should create a new topic with adequate information for us to diagnose the problem.

Link to comment
Share on other sites

awshirley

Right now I have MediaBrowser running in a Windows VM on Mageia 4.  I'm looking to move to CentOS7.  I have docker installed and mediabrowser running, but it can't see the drive mapping to my video files.  I have a smb mount on my CentOS7 box to the server with the videos.  Docker was set to have access to the smb mount, but when I try to perform a scan in MB, it doens't find anything and also the folders are empty of any subfolders with the video.

 

Any idea of what I can do to fix this?

 

Thanks!

Link to comment
Share on other sites

hurricanehrndz

Right now I have MediaBrowser running in a Windows VM on Mageia 4.  I'm looking to move to CentOS7.  I have docker installed and mediabrowser running, but it can't see the drive mapping to my video files.  I have a smb mount on my CentOS7 box to the server with the videos.  Docker was set to have access to the smb mount, but when I try to perform a scan in MB, it doens't find anything and also the folders are empty of any subfolders with the video.

 

Any idea of what I can do to fix this?

 

Thanks!

Sounds like you missed a -v option... can you please post your docker run command?

Link to comment
Share on other sites

awshirley

I used:

 

docker run -d --net=host -v /home/myhome/mbdata:/MBServer/ProgramData-Server -v /var/media:/media -v /etc/localtime:/etc/localtime:ro --name=mbserver mediabrowser/mbserver.  

 

/var/media was the SMB mount to my video files.  I tried to disable selinux and was now able to see the video files in MediaBrowser.  

 

The library scan seems to now hang.  If I kill the docker process and restart it, it's still hung.  I'm trying this on CentOS7.  The firewall and selinux are disabled.

Link to comment
Share on other sites

hurricanehrndz

I used:

 

docker run -d --net=host -v /home/myhome/mbdata:/MBServer/ProgramData-Server -v /var/media:/media -v /etc/localtime:/etc/localtime:ro --name=mbserver mediabrowser/mbserver.  

 

/var/media was the SMB mount to my video files.  I tried to disable selinux and was now able to see the video files in MediaBrowser.  

 

The library scan seems to now hang.  If I kill the docker process and restart it, it's still hung.  I'm trying this on CentOS7.  The firewall and selinux are disabled.

Are you running the latest mbserver image? I published one a couple of days ago. Usually the scan process hangs because of downloading metadata. If you uncheck download metadata it should complete. The version from a couple of days ago has a timeout built in that should resolve that issue, but I haven't tested it yet. There is a bug in all linux version as well that we are currently trying to resolve in order to have linux versions read xbmc data. Does your media already have metadata?

 

Just tested the latest docker with 628 movies, and the scan completed fine.

Edited by hurricanehernandez
Link to comment
Share on other sites

awshirley

How can I make docker pull down and overlay my mbserver image with the current one?

 

I've also noticed that I can't log back into the mbserver dashboard via my web browser.  All I get is a dark grey screen with a spinning circle in the middle.

 

I'll try to access it via my Roku to see if it got any metadata.

Edited by awshirley
Link to comment
Share on other sites

hurricanehrndz

How can I make docker pull down and overlay my mbserver image with the current one?

 

I've also noticed that I can't log back into the mbserver dashboard via my web browser.  All I get is a dark grey screen with a spinning circle in the middle.

 

I'll try to access it via my Roku to see if it got any metadata.

stop the container: docker stop mbserver

remove the container: docker rm mbserver

pull from repo: docker pull mediabrowser/mbserver

create container with original docker run command.

If whatever reason mediabrowser stops responding you can also do docker stop and docker start.

 

 

I will be updating the docker container tomorrow for the new beta release.

Link to comment
Share on other sites

Guest scokar
Hello,

 

I am trying out MBServer again after a long time and I have a few questions about the docker deployment

 

I have docker installed on Centos 7 64-bit

 

1. "{MediaPath} - a top level media path"  - does this mean using the "absolute path name" of the folder containing your media _OR_ does this mean the media folder has to be mounted off the root of the file system

 

e.g:

  [a] "/MyDocument/Content/videos"

  versus

  "/videos"

 

 

2. " If you need to add multiple paths, simply duplicate -v {MediaPath}:/media"  -- is the ":/media"  a keyword and MUST BE USED  or can this be different PER volume you want to expose to docker?

e.g:

   [a] "-v /Content/Videos:/media  -v /Content/Television:/media"  

   versus

    "-v /Content/Videos:/videos  -v /Content/Television:/television"

 

3. After you've started a dockerized mbserver, how can you later modifiy a path/volume exposed to docker?

 

4.  How soon after starting mbserver does the ":/MBServer/ProgramData-Server" path get populated to see if things are working out?

 

5.  SELINUX - are we to modify and selinux settings so that docker can access any of the exposed voluemes to mbserver?

 

Thanks.

 

EDIT to include answers:

1. The proper terminology:  "{MediaPath} - This should be the absolute path to your folder or directory, e.g.   /MyFolder  or /MyFolder/AnotherFolder"   

 

2. "If you need to add multiple paths, simply add another "-v {MediaPath}:/nnn"  where nnn is unique for all MediaPath entries.  e.g. "-v /MyFolder/FolderOne:/MyMovies  -v /MyFolder/FolderTwo:/MyTVShows"   

 

3. ...

 

4. Should be populated right away

 

5. My media is on a BTRFS file system.  There is a known issue with SELINUX, Docker, and BTRFS.  

 


 

In RHEL/CentOS you can get around this for now by backing up and editing the file /etc/sysconfig/docker.  comment out the OPTIONS line by placing a # in the first column and remove the "--selinux-enable" entry:

 

e.g. 

original:   #OPTIONS=--selinux-enabled -H fd://

 

new:        OPTIONS=-H fd://

 

 

Edited by scokar
Link to comment
Share on other sites

hurricanehrndz

First of all, welcome back. Two, option b for volumes is right. Yes there is se_linux issues with docker and volumes, you best ask in the docker forums or google the work arounds. I believe someone earlier might have mention a solution.

Link to comment
Share on other sites

hurricanehrndz

I forgot, MB populates the directory right away. You can see what is doing by running docker logs <name of container> I terms of adding or removing volumes I would just remove the container and recreated with more volumes. Since the program data is a volume removing the container will have no effect on your settings.

Edited by hurricanehernandez
Link to comment
Share on other sites

Guest scokar

First of all, welcome back. Two, option b for volumes is right. Yes there is se_linux issues with docker and volumes, you best ask in the docker forums or google the work arounds. I believe someone earlier might have mention a solution.

 

Thank you.

 

I modified my post to include an answer:

 

My media is on a BTRFS file system.  There is a known issue with SELINUX, Docker, and BTRFS.  
 
 
In RHEL/CentOS you can get around this for now by backing up and editing the file /etc/sysconfig/docker.  comment out the OPTIONS line by placing a # in the first column and remove the "--selinux-enable" entry:
 
e.g. 
original:   #OPTIONS=--selinux-enabled -H fd://
 
new:        OPTIONS=-H fd://
Link to comment
Share on other sites

Guest scokar

I forgot, MB populates the directory right away. You can see what is doing by running docker logs <name of container> I terms of adding or removing volumes I would just remove the container and recreated with more volumes. Since the program data is a volume removing the container will have no effect on your settings.

 

On the host, when I look into the path passed as "{DataPath}:/MBServer/ProgramData-Server", there is nothing there.   

 

However since "docker logs -t -f  mbserver"  gives me information, I will ignore this for now

 

Thanks.

Link to comment
Share on other sites

hurricanehrndz

On the host, when I look into the path passed as "{DataPath}:/MBServer/ProgramData-Server", there is nothing there.   

 

However since "docker logs -t -f  mbserver"  gives me information, I will ignore this for now

 

Thanks.

Sorry the directory is /config.. 

 

I forgot to update the documentation. I will have Luke update it. Thanks.

Link to comment
Share on other sites

  • 2 weeks later...
rjenkins

No, no ports allocated and cannot connect.

I've been researching docker commands and tried this:

 

docker run -d -p 1900:1900 -p 7359:7359 -p 8096:8096 mediabrowser/mbserver

 

Once it started up, it's connectible on port 8096.

 

 

I've stopped and removed the image and will re-run it with /var/mbdata:/config to prevent any future problems.

 

I also realise now that the -v lines are mappings for directory visibility within the docker environment & not mediabrowser mappings, so I only need a single one for the /media directory.

Edited by rjenkins
Link to comment
Share on other sites

rjenkins

Hi guys,

 

I've just been trying to get the docker install of Mediabrowser working.

It did not work at all well on a Centos 6 system (docker problems) so I have reinstalled that with Centos 7.

 

Docker now appears to work correctly and mediabrowser is trying to run - but bombs out reliably with an error:

 

...

Running startup tasks
Info, App, Core startup complete
        Cannot find the specified file
        System.ComponentModel.Win32Exception
          at System.Diagnostics.Process.Start_shell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in <filename unknown>:0
          at System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in <filename unknown>:0
          at System.Diagnostics.Process.Start () [0x00000] in <filename unknown>:0
          at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:Start ()
          at MediaBrowser.ServerApplication.Native.BrowserLauncher.OpenUrl (System.String url, ILogger logger) [0x00000] in <filename unknown>:0
 
Error launching browser
Cannot find the specified file
Info, Dlna, SSDP service started
---

 

Is it trying to run a web browser on the server itself?

 

I cannot connect to it with a web browser or view it as a dlna device and it's not showing up in netstat as having any ports associated.

 

If I stop & start it, it gives the same error and lack of connectivity but shows in docker as running.

 

 

The machine it's running on is a headless server - no graphical display.

It's in a rack with other machines & only administered via ssh.

 

Any thoughts appreciated.

 

Robert.

Edited by rjenkins
Link to comment
Share on other sites

hurricanehrndz

Hi guys,

 

I've just been trying to get the docker install of Mediabrowser working.

It did not work at all well on a Centos 6 system (docker problems) so I have reinstalled that with Centos 7.

 

Docker now appears to work correctly and mediabrowser is trying to run - but bombs out reliably with an error:

 

...

Running startup tasks
Info, App, Core startup complete
        Cannot find the specified file
        System.ComponentModel.Win32Exception
          at System.Diagnostics.Process.Start_shell (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in <filename unknown>:0
          at System.Diagnostics.Process.Start_common (System.Diagnostics.ProcessStartInfo startInfo, System.Diagnostics.Process process) [0x00000] in <filename unknown>:0
          at System.Diagnostics.Process.Start () [0x00000] in <filename unknown>:0
          at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:Start ()
          at MediaBrowser.ServerApplication.Native.BrowserLauncher.OpenUrl (System.String url, ILogger logger) [0x00000] in <filename unknown>:0
 
Error launching browser
Cannot find the specified file
Info, Dlna, SSDP service started
---

 

Is it trying to run a web browser on the server itself?

 

I cannot connect to it with a web browser or view it as a dlna device and it's not showing up in netstat as having any ports associated.

 

If I stop & start it, it gives the same error and lack of connectivity but shows in docker as running.

 

 

The machine it's running on is a headless server - no graphical display.

It's in a rack with other machines & only administered via ssh.

 

Any thoughts appreciated.

 

Robert.

This is not an error, this is expected as there is no browser installed on the docker container. Congrats!!! It's working.

Link to comment
Share on other sites

rjenkins

OK, but why is it not connectible from a browser or showing as listening on any ports??

 

I have opened port 8096 in the firewall; even if others needed for external access are still blocked, should they not be showing in netstat?

 

I only installed Centos 7 on this machine yesterday and some parts are very different from the older releases I'm used to so it could well be me doing something dumb, but after a good few hours of studying it I can't see what it could be..

Link to comment
Share on other sites

hurricanehrndz

OK, but why is it not connectible from a browser or showing as listening on any ports??

 

I have opened port 8096 in the firewall; even if others needed for external access are still blocked, should they not be showing in netstat?

 

I only installed Centos 7 on this machine yesterday and some parts are very different from the older releases I'm used to so it could well be me doing something dumb, but after a good few hours of studying it I can't see what it could be..

What was your run command? Please type it in exactly.

Link to comment
Share on other sites

rjenkins

It was:

 

docker run -d --net=host -v \
/var/mbdata:/MBServer/ProgramData-Server \
-v /media/video/Movies-2010s:/Movies \
(many other -v lines)
-v /media/video/TV\ Series:/TV\ Series \
-v /etc/localtime:/etc/localtime:ro \
-name=mbserver mediabrowser/mbserver
 
 
docker ps & docker info don't show any allocated ports.
 
        "ExposedPorts": {
            "1900/udp": {},
            "7359/udp": {},
            "8096/tcp": {}
        },
 
Link to comment
Share on other sites

hurricanehrndz

 

It was:

 

docker run -d --net=host -v \
/var/mbdata:/MBServer/ProgramData-Server \
-v /media/video/Movies-2010s:/Movies \
(many other -v lines)
-v /media/video/TV\ Series:/TV\ Series \
-v /etc/localtime:/etc/localtime:ro \
-name=mbserver mediabrowser/mbserver
 
 
docker ps & docker info don't show any allocated ports.
 
        "ExposedPorts": {
            "1900/udp": {},
            "7359/udp": {},
            "8096/tcp": {}
        },
 

 

Your run command is wrong but it should still work, the correct volume mapping would be as follows:

/var/mbdata:/config 

 

You should be able to reach mediabrowser by type the following into a browser:

http://ip:8096/mediabrowser

 

netstat should show the port.

Edited by hurricanehernandez
Link to comment
Share on other sites

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...