INTERACT FORUM

More => Old Versions => JRiver Media Center 26 for Linux => Topic started by: merman-corrode-portage on January 09, 2020, 08:55:27 pm

Title: Docker Container for JRiver Media Center 26
Post by: merman-corrode-portage on January 09, 2020, 08:55:27 pm
Is there any MC26 container on the horizon? The MC25 by Jatzoo is amazing. https://hub.docker.com/u/jatzoo
Title: Re: Docker Container for JRiver Media Center 26
Post by: max096 on January 10, 2020, 09:44:02 am
I updated mine 2 days ago.

https://hub.docker.com/r/shiomax/jrivermc26

Currently, it does not activate though. But it usually goes to 30 days trial anyways. Seems like more people are having those issues too. MJR file activation should work. I have not tried that yet. I wanted to make it so you can just drop a MJR file into the config directory and it will use it on start and delete it. But I have not done that yet.
Title: Re: Docker Container for JRiver Media Center 26
Post by: JimH on January 10, 2020, 09:51:01 am
The mjr file is an Install Key.  It only works for 14 days.

https://wiki.jriver.com/index.php/Restoring_a_License
Title: Re: Docker Container for JRiver Media Center 26
Post by: max096 on January 10, 2020, 10:05:27 am
I figured out what was wrong. In the start command of MC I set the home directory to /config and in the command I now entered I did not do that.

So this is how you can activate the container with the mjr file. First get the mjr file and place it into the config folder. I just named it key.mjr, because I copied it with scp and it was less to type. Also my container is named jrivermc26, yours might have a different name.

Code: [Select]
docker exec -it jrivermc26 /bin/bash
exec env HOME=/config mediacenter26 /RestoreFromFile /config/key.mjr

As I said I'm probably gonna just make this happen on startup when the config directory contains any file with the .mjr extension. But for now this works.

I have just pushed a new version of it. It looks for .mjr files within the config directory every 30 seconds. When it finds one it tries to activate jriver with it. If it's successful it get's rid of the .mjr file.
Title: Re: Docker Container for JRiver Media Center 26
Post by: Scobie on January 10, 2020, 03:47:24 pm
Great work thanks Max.

Re the activation, cannot we just enter our license key key on the splash screen on startup?

Cheers
Title: Re: Docker Container for JRiver Media Center 26
Post by: max096 on January 10, 2020, 03:59:35 pm
That does not seem to be working right now. I never actually saw the splash screen. But I donīt think it would do anything differently than when you go to help > install license.

I would assume that will get ironed out with future releases of MC26 though. So, no big deal. Just use the mjr file until then.
Title: Re: Docker Container for JRiver Media Center 26
Post by: merman-corrode-portage on January 10, 2020, 07:28:16 pm
Thanks heaps Max, I'll give it a try. Jatzoo PMed me to say his would be ready in the coming days too so it looks like MC26 will be back on the menu.
Title: Re: Docker Container for JRiver Media Center 26
Post by: max096 on January 11, 2020, 10:44:25 am
Made a bit of an oversight with the find command. Somehow I thought maxdepth 1 is default and not a recursive lookup threw the entire directory.
Itīs rebuilding as of writing this, the old V4 tags have been deleted as Iīm replacing them with the new once. Letīs pretend that never happened.  ::)
Title: Re: Docker Container for JRiver Media Center 26
Post by: bob on January 11, 2020, 05:44:40 pm
That does not seem to be working right now. I never actually saw the splash screen. But I donīt think it would do anything differently than when you go to help > install license.

I would assume that will get ironed out with future releases of MC26 though. So, no big deal. Just use the mjr file until then.
That should be fixed in the 26.0.16 build.
Title: Re: Docker Container for JRiver Media Center 26
Post by: max096 on January 11, 2020, 06:16:00 pm
That should be fixed in the 26.0.16 build.

Yup, itīs working now. Activation is working with the key and the in-app browser is working again. Thankīs! :)
Title: Re: Docker Container for JRiver Media Center 26
Post by: merman-corrode-portage on January 12, 2020, 01:03:12 am
Installed and it's working a treat, thanks max096.
Title: Re: Docker Container for JRiver Media Center 26
Post by: merman-corrode-portage on January 12, 2020, 01:20:11 am
max096, one small bug:

It looks like the filename for the .mjr file is not being parsed correctly, the spaces in the default mjr file downloaded from jriver are upsetting the license script with the following errors repeating every 30s.

Code: [Select]
Found .mjr file at /config/Media Center26 Master-474165.mjr
Activating JRiverMC26
CRegistrationHelper::RestoreFromFile: license file /config/Media not found.
Could not restore license from file /config/Media
Activation was successful, Removing /config/Media Center26 Master-474165.mjr
rm: cannot remove '/config/Media': No such file or directory
rm: cannot remove 'Center26': No such file or directory
rm: cannot remove 'Master-474165.mjr': No such file or directory

Changing the filename to "Media-Center26-Master-474165.mjr" fixed the problem.

Code: [Select]
Found .mjr file at /config/Media-Center26-Master-474165.mjr
Activating JRiverMC26
Found .mjr file at /config/Media-Center26-Master-474165.mjr
Activating JRiverMC26
License restored successfully from file /config/Media-Center26-Master-474165.mjr
Activation was successful, Removing /config/Media-Center26-Master-474165.mjr
Title: Re: Docker Container for JRiver Media Center 26
Post by: max096 on January 12, 2020, 08:16:33 am
It's easy to fix, it just needs quotes. But I think it's better to rollback those changes. It's a bit of a excessive solution for that kind of thing. It should be enough to have instructions in the readme on how to do mjr activation. Since it is a little bit different than normally.

If you have an invalid .mjr file in there it's also a bit annoying, because it would pop up a dialog in jriver every 30 seconds until you remove it.
Title: Re: Docker Container for JRiver Media Center 26
Post by: Jatzoo on January 12, 2020, 02:28:21 pm
Thanks heaps Max, I'll give it a try. Jatzoo PMed me to say his would be ready in the coming days too so it looks like MC26 will be back on the menu.

As merman-corrode-portage wrote - my docker version of JRiver MC26 is able to pull via hub:
https://hub.docker.com/r/jatzoo/jrivermc26
Title: Re: Docker Container for JRiver Media Center 26
Post by: max096 on February 23, 2020, 12:06:42 pm
I've also just built version 6 of the image. The baseimage is now a fork of jlesage/docker-baseimage-gui, because he did not have a debian10 image yet. So, I rebuilt the baseimage and the baseimage-gui for debian10 and also for debian10 arm (but those are not in the docker hub repo, but you can build them).

The build script has been reworked. The only thing that I didn't yet do (that I planned) is the --deb option to supply a local .deb file to install jriver from instead of the repository.

The arm version still needs some work. I'll get another raspberry pi next week that I intend to use in the living room to play audio with. So I'm actually gonna try to make it work for that. I did never try to get a sound output out of the docker container yet. Though, I believe it is likely I will just install it without a container in the end.

The script that brings jriver back when you minimize it also got rewritten as jriver now handles option windows correctly and forces them to be on top by itself. So, there is no need to worry about them anymore. There always was a bit of a problem with the previous script. Because what I tried to do is to always bring the last used window to the top. But that's not always what you want, because when you click into the search box you get an information popup and that is then the last opened "window". If the script brings that in focus then you can no longer type into the search box. That's now no longer a problem as I just don't have to deal with it anymore.
Title: Re: Docker Container for JRiver Media Center 26
Post by: max096 on March 25, 2020, 01:33:27 am
I made a bit of an organisational change to my docker containers git.

I've decided that moving forward it would be better to use gitlab.com instead of my privately hosted gitlab server!
The project has already been created here: https://gitlab.com/shiomax/jrivermc-docker

The main motivation to do this is to make it easier for people to create issues and possibly contribute to it in other ways if they want to. Before you would have required me to initiate account creation for you, to really do anything more than download the source.
I will also make a contribution guide when I get to it. But the gist of it is: If you want to do a merge request (gitlabs name for githubs pull requests). Don't work with the master branch, but with the dev branch and do merge requests into the dev branch. The master branch is actively being used to rebuild the current version with newer MC releases. So you should not try to merge (especially functional changes) into the master branch directly. You can try, but they will be rejected for that reason. That's basically all there is to it.  :)
Title: Re: Docker Container for JRiver Media Center 26
Post by: hells on March 25, 2020, 05:00:55 pm
Hey Max, using your docker container. It's great but I've seen a couple issues, and for some reason GitLab is not cooperating and letting me log in.

Have you noticed that sometimes it just is a black screen? Requiring a container restart. Even with the maximize env var set. My other issue *might* be related to the container as I don't experience this on Windows/Mac clients, only on the container "server" itself: https://yabb.jriver.com/interact/index.php/topic,124616.msg862760.html

Any ideas?
Title: Re: Docker Container for JRiver Media Center 26
Post by: max096 on March 25, 2020, 07:59:24 pm
Hey Max, using your docker container. It's great but I've seen a couple issues, and for some reason GitLab is not cooperating and letting me log in.

Have you noticed that sometimes it just is a black screen? Requiring a container restart. Even with the maximize env var set. My other issue *might* be related to the container as I don't experience this on Windows/Mac clients, only on the container "server" itself: https://yabb.jriver.com/interact/index.php/topic,124616.msg862760.html

Any ideas?

It sometimes happens on amd64 and almost always happens on raspberry pies (witch is one of the reasons I really have no plans yet on when to put the arm images into the repository). Iīm working on gettting that to work on arm as the issue is very rarely happening for me on anything else. It also seems to me that itīs more likely to happen when the JRiver version updates. The maximize env does not have anything to do with it though. It only effects pop up windows.
JRiver is still running technically. You just canīt see it as it starts minimized for some odd reason.

The two ways to fix it for now is a container restart or you can also log into your container and switch to the jriver window.
Code: [Select]
docker exec <container_name or id> /bin/bash
wmctrl -l        # copy the hex id of JRiver Media Center window
wmctrl -i -a <hex_id>

So the plan for version 8 so far would be that (mostly for arm sake, but it will absolutely effect am64 images) and also I want to start rebuilding all the images with new container versions down to I believe 26.0.22 was the one that forced pop pop-up / sub windows to stay on top of itself. That change made everything a lot easier.
Title: Re: Docker Container for JRiver Media Center 26
Post by: hells on March 25, 2020, 08:10:14 pm
It sometimes happens on x86 and almost always happens on raspberry pies (witch is one of the reasons I really no plans yet on when to put the arm images into the repository). Iīm working on gettting that to work on arm as the issue is very rarely happening for me on anything else. It also seems to me that itīs more likely to happen when the JRiver version updates. The maximize env does not have anything to do with it though. It only effects pop up windows.
JRiver is still running technically. You just canīt see it as it starts minimized for some odd reason.

The two ways to fix it for now is a container restart or you can also log into your container and switch to the jriver window.
Code: [Select]
docker exec <id> /bin/bash
wmctrl -l        # copy the hex id of JRiver Media Center
wmctrl -i -a <id>
Great thanks! 1/2 way to this working how I wanted :D
Title: Re: Docker Container for JRiver Media Center 26
Post by: Afrosheen on March 31, 2020, 08:29:13 pm
Hi max096, thanks for updating the docker image of MC!  I can finally feel comfortable moving away from my old setup where I was on MC22 via QNAP HybridDisk Station.  It feels good seeing the new features that JRiver offers now.

I'm just having trouble with enabling Authentication in the media network.  It seems that I cannot connect to a running instance of the media network when the authentication is enabled.  But if disabled I can connect.  It may be an issue with MC itself, but just wanted to know if you ran into the same issue?
Title: Re: Docker Container for JRiver Media Center 26
Post by: max096 on April 01, 2020, 08:16:45 am
I'm just having trouble with enabling Authentication in the media network.  It seems that I cannot connect to a running instance of the media network when the authentication is enabled.  But if disabled I can connect.  It may be an issue with MC itself, but just wanted to know if you ran into the same issue?

I have a hard time to see how authentication would break it. It works for me and I never had an issue like that.

Is it maybe some keyboard layout issue? As in, are you sure you entered the same password both times?

I don't think it's a firewall issue either, because it works without authentication for you.

You could try an older version of MC 26, enable authentication there and see if it works. When it works you can probably update to the newest version again. I setup authentication with the first release of MC 26 and then kept updating it.
What you could also try. If you are using bridge networking in docker, try host networking instead or the other way around.
Title: Re: Docker Container for JRiver Media Center 26
Post by: Afrosheen on April 01, 2020, 01:49:41 pm
Yep, hosting did the trick.  I forgot that was an option to change.  Thanks! 

And would you know how to change the resolution of the VNC? 
Title: Re: Docker Container for JRiver Media Center 26
Post by: max096 on April 01, 2020, 04:49:09 pm
Yep, hosting did the trick.  I forgot that was an option to change.  Thanks! 

And would you know how to change the resolution of the VNC?

Code: [Select]
-e DISPLAY_WIDTH=1280
-e DISPLAY_HEIGHT=720

Those are the defaults, just set them to something else. Similarly to how you can set the vnc password.
Title: Re: Docker Container for JRiver Media Center 26
Post by: Oletros on April 03, 2020, 01:50:42 pm
In docker version 19.03 I can't make work specifying a MAC address, it doesn't work
Title: Re: Docker Container for JRiver Media Center 26
Post by: Afrosheen on April 03, 2020, 01:53:40 pm
Thanks again max!! 

I'm sorry to keep bugging and asking questions but I'm running into connection issues leading to "audio streaming errors".  This isn't solely directed to you so if anyone else could help I'd greatly appreciate it.  I've hosted the container on QNAP and have set the "network mode" to "host" even though it gives me the following warnings:

Quote
The port may conflict with the NAS port when selecting Host mode.Use local host network (command: --net=host)
Note:This option allows containers to have full access to the host network interface.

When I do have trouble connecting to the Media Server, the IP address that gets returned in JRemote is 10.0.3.2, which is different than the host IP, which is 10.0.1.30.  I'm not sure how to effectively address this?  Any help would be greatly appreciated it. 


edit:  I believe I've resolved this.  I went back and set the network mode to manually set the IP address uniform to my LAN but different than my NAS.  I then changed the ports and reassigned them to the IP address that I set for the docker app, and for now the media network seems to be stable and functional. 

Thanks again for providing this docker container max! I sincerely appreciate it! 
---

With using jatzoo's docker image, I can set everything up and I can connect to the Media Server, but none of the files show up in JRemote.  I get the albums listed, but not the individual tracks. 
Title: Re: Docker Container for JRiver Media Center 26
Post by: Jatzoo on April 21, 2020, 03:50:22 am
Quote
With using jatzoo's docker image, I can set everything up and I can connect to the Media Server, but none of the files show up in JRemote.  I get the albums listed, but not the individual tracks.

JRemote or JRemote2? I use JRemote2 and all works fine (Android 10 on the phone).
Title: Re: Docker Container for JRiver Media Center 26
Post by: Dantesjoe on May 31, 2020, 01:10:38 am
Hi guys. I'm very excited to get this up and running. I'm having an issue getting MC to see my library. I'm installing it on Synology DSM through docker.
I'm using shiomax/jrivermc26:latest
Took some screenshots.
https://imgur.com/a/q7jUWuI
1. Volumes configuration
2. My file system. Docker and JRMC26 are installed on Volume 1. My music library is located on volume 2. I dropped one album directly into /data/music/
3.Only the album from /data/music is found. Also my import folders.

I feel like my logic in the configuration is correct.
/oldmusic/ has every read/write permission allowed.

 I'm also very new to Linux and Syn DSM, so maybe there is a little detail I'm missing.
Title: Re: Docker Container for JRiver Media Center 26
Post by: BryanC on May 31, 2020, 11:42:00 am
Hi guys. I'm very excited to get this up and running. I'm having an issue getting MC to see my library. I'm installing it on Synology DSM through docker.
I'm using shiomax/jrivermc26:latest
Took some screenshots.
https://imgur.com/a/q7jUWuI
1. Volumes configuration
2. My file system. Docker and JRMC26 are installed on Volume 1. My music library is located on volume 2. I dropped one album directly into /data/music/
3.Only the album from /data/music is found. Also my import folders.

I feel like my logic in the configuration is correct.
/oldmusic/ has every read/write permission allowed.

 I'm also very new to Linux and Syn DSM, so maybe there is a little detail I'm missing.

I don't understand the reasoning behind mounting the same directory twice? Perhaps that's causing some circular issues or it may be invalid, it probably depends on your container manager.
Title: Re: Docker Container for JRiver Media Center 26
Post by: Dantesjoe on May 31, 2020, 04:10:10 pm
I don't understand the reasoning behind mounting the same directory twice? Perhaps that's causing some circular issues or it may be invalid, it probably depends on your container manager.
I've tried both separately also. I'm not sure if my container manager wants me to specify the /volume2/
I've also tried reversing the "file/folder" and "mount path" inputs

My thought is that if I set
File/Folder -> actual folder with music files in it
Mount Path ->Where I tell MC to look for files
Then on auto import I'll set paths to both directories individually, and MC finds nothing.

I am completely at a loss of understanding this. Perhaps the container can't get permission to access the /volume2/oldmusic/ share? When I navigate MC import to that folder it will open that folder and allow me to save the directory for auto import. If I go to edit that same import directory it will tell me that it cannot read the directory.
I've tried opening up all the permissions of that share folder and MC has high level permissions.

My actual folders of music are contained at "/volume2/oldmusic/"
My dockers are installed on volume1

I wish I could be more helpful
Title: Re: Docker Container for JRiver Media Center 26
Post by: Scobie on May 31, 2020, 05:22:07 pm
Can you actually browse to that music folder from within the Docker terminal? Can docker see the mounted folder at all?
Title: Re: Docker Container for JRiver Media Center 26
Post by: BryanC on May 31, 2020, 09:01:48 pm
My actual folders of music are contained at "/volume2/oldmusic/"

There's the issue. You need to set the "file/folder" to that directory and the "mount point" to the internal mount location of the container. I don't know if your container defaults to particular directories but it may be easiest for you to just mount your directories to the same location within the container. This would also make it easier to share libraries between the containers or use neat tricks like playing local files while using a remote library.
Title: Re: Docker Container for JRiver Media Center 26
Post by: merman-corrode-portage on June 05, 2020, 09:57:59 pm
Hey Max, thanks for your container, I've been using it since you posted here back in January. However since installing I've had a nagging warning I though I might bring up:

Code: [Select]
[0606/050306.068755:WARNING:discardable_shared_memory_manager.cc(194)] Less than 64MB of free space in temporary directory for shared memory files: 63
Title: Re: Docker Container for JRiver Media Center 26
Post by: max096 on June 16, 2020, 12:07:10 pm
Hey Max, thanks for your container, I've been using it since you posted here back in January. However since installing I've had a nagging warning I though I might bring up:

Code: [Select]
[0606/050306.068755:WARNING:discardable_shared_memory_manager.cc(194)] Less than 64MB of free space in temporary directory for shared memory files: 63

As long as you never got a follow up error such as "'No space left on device'" in all this time it should be totally save to ignore.

There is this discussion on github https://github.com/moby/moby/issues/12940 seems to suggest that this was fixed quite a while ago in a docker update.

What OS and what docker version are you using?
Title: Re: Docker Container for JRiver Media Center 26
Post by: vickozagi on June 17, 2020, 01:24:34 pm
Hi,
I am using openmediavault and only Compose file format version 2 is supported. So with my limited knowledge I rewrote the compose file. Everything works except access to the music folder. If I drop the music in config folder I can play music on all endpoints. Does anybody know what I did wrong?
---
version: "2"
services:
  jrivermc26:
    image: shiomax/jrivermc26
    container_name: jrivermc26
    restart: always
    environment:
      - TZ=America/Los_Angeles
      - VNC_PASSWORD=12345
    volumes:
      - /srv/dev-disk-by-id-ata-WDC_WD30EFRX-68EUZN0_WD-WCC4N5XU8213-part1/config/jrivermc26:/config:rw
      - /srv/dev-disk-by-id-ata-WDC_WD30EFRX-68EUZN0_WD-WCC4NKPA1P91-part1/Muzika/SQB:/data/music:rw
    network_mode: host


   
Title: Re: Docker Container for JRiver Media Center 26
Post by: max096 on June 18, 2020, 08:54:55 am
Hi,
I am using openmediavault and only Compose file format version 2 is supported. So with my limited knowledge I rewrote the compose file. Everything works except access to the music folder. If I drop the music in config folder I can play music on all endpoints. Does anybody know what I did wrong?
---
version: "2"
services:
  jrivermc26:
    image: shiomax/jrivermc26
    container_name: jrivermc26
    restart: always
    environment:
      - TZ=America/Los_Angeles
      - VNC_PASSWORD=12345
    volumes:
      - /srv/dev-disk-by-id-ata-WDC_WD30EFRX-68EUZN0_WD-WCC4N5XU8213-part1/config/jrivermc26:/config:rw
      - /srv/dev-disk-by-id-ata-WDC_WD30EFRX-68EUZN0_WD-WCC4NKPA1P91-part1/Muzika/SQB:/data/music:rw
    network_mode: host


   

The config looks right. Are you sure the second path to your music folder is right? The path to the music folder is a bit different.

What version of compose you use really does not matter at all as long as it supports the configuration you want to do. Its just a convenience tool for creating containers. Im just using it because it gives you a config file so when you wanna upgrade your container its easy to do with the same configuration. Otherwise, you'd have to keep track of your entier docker run command. Solutions like openmediavault may have tools in place that make this advantage irrelevant.
Title: Re: Docker Container for JRiver Media Center 26
Post by: vickozagi on June 18, 2020, 10:46:50 pm
The path is correct. These are two different hard drives.
Good news though. I can now browse to the SQB folder, but I cannot see folders and files within the SQB folder

---
version: "2"
services:
  jrivermc26:
    image: shiomax/jrivermc26
    container_name: jrivermc26
    restart: always
    environment:
      - TZ=America/Los_Angeles
      - VNC_PASSWORD=12345
    volumes:
      - /srv/dev-disk-by-id-ata-WDC_WD30EFRX-68EUZN0_WD-WCC4N5XU8213-part1/config/jrivermc26:/config:rw
      - /data/music:/srv/dev-disk-by-id-ata-WDC_WD30EFRX-68EUZN0_WD-WCC4NKPA1P91-part1/Muzika/SQB
    network_mode: host
   
Title: Re: Docker Container for JRiver Media Center 26
Post by: max096 on June 20, 2020, 10:42:24 am
I would say check the permissions of the folders. Folders have to be executeable on Linux to be able to list their content. You could try to add :rwx to the permissions in the compose. Not sure if that works though. I would preferably change the permissions on the filesystem on the drive.

You can use the following to find all sub folders in a path and make them executeable.

Code: [Select]
find /your/path/here -type d -exec chmod o+x {} \;
You can also compare "ls -la" of both folders root and 1 level deep. There should be something different I'm thinking. Otherwise it should work.
Title: Re: Docker Container for JRiver Media Center 26
Post by: Robad on June 28, 2020, 01:40:13 pm
Hi,  I have got the trial version of MC26.0.87 running in Container Station on a QNAP NAS.
Two things I don't know how to do now:
- How do I install the license once I've purchased it?
- How do I upgrade? (My Windows version kindly told me an update was available.  Not so with the Linux version...)
Title: Re: Docker Container for JRiver Media Center 26
Post by: max096 on June 30, 2020, 04:44:25 am
Hi,  I have got the trial version of MC26.0.87 running in Container Station on a QNAP NAS.
Two things I don't know how to do now:
- How do I install the license once I've purchased it?
- How do I upgrade? (My Windows version kindly told me an update was available.  Not so with the Linux version...)

Both of these things are explained in the gitlab readme. The same readme is on dockerhub.
You install your license as you normally would within the jriver UI. If that does not work you can use the CLI to activate it. Your license is stored in the "config" directory or however you name it on your NAS filesystem (you gotta link the directory between your host and the container). You update it by using another image. If you are using the :latest or :stable (once this is available) your NAS may have a UI for pulling the newest image and remove/recreate the container with the same configuration or otherwise change the baseimage from :25.0.87-latest-x to something else. But if thatīs not the case you have to remove the container and recreate a new one manually. Linking the same directories as you did before will retain all your configurations in JRiver.
Title: Re: Docker Container for JRiver Media Center 26
Post by: Robad on June 30, 2020, 05:53:15 am
Thanks for the help.

I was also trying to connect from outside my LAN - something I could do when running MC23 under "HybridDesk Station".  I noted that the container was using DHCP so I changed it to fixed.  This restarted the container, and didn't help at all.  So I changed it back to DHCP - another restart. 
Now I appear to have an empty Library!  Did I put it in the wrong place? 
I'm having great trouble navigating in Linux...  (I did use Unix back in the 80's.  But it's been Windows for over 30 years!)
Any ideas where my library might be?  Or the backup of it?

 Rob

PS. I tried "restore backup" which gave a path of '/config/Documents/...' but '/config/Documents' doesn't exist...
Title: Re: Docker Container for JRiver Media Center 26
Post by: max096 on June 30, 2020, 07:00:39 am
Thanks for the help.

I was also trying to connect from outside my LAN - something I could do when running MC23 under "HybridDesk Station".  I noted that the container was using DHCP so I changed it to fixed.  This restarted the container, and didn't help at all.  So I changed it back to DHCP - another restart. 
Now I appear to have an empty Library!  Did I put it in the wrong place? 
I'm having great trouble navigating in Linux...  (I did use Unix back in the 80's.  But it's been Windows for over 30 years!)
Any ideas where my library might be?  Or the backup of it?

 Rob

PS. I tried "restore backup" which gave a path of '/config/Documents/...' but '/config/Documents' doesn't exist...

When you created the container you either setup where its gonna be or you didnt (in witch case its gone).

In the examples I put this

Code: [Select]
volumes:
        - /path/to/config:/config:rw
        - /path/to/music:/data/music:rw

/path/to/config would be what you should replace with a path on your nas where you want the folder to be. /config you cannot change thats the path within the container you have to mount it to. JRiver inside the container does not know where the folder really is. /config is that path you set if you set it. If you did not set it its temporary and will be gone when you delete the container.

Though Im not sure how all these things are on qnap. It would take a lot of time to create guides for every NAS solution that has the capability to run docker. So what I wrote there in the readme is mostly if you are just using docker on <insert your Linux distribution> with no ui what so ever. Its also a lot easier to make guides with commands than it is for guis that may or may not look the same half a year from now.
Title: Re: Docker Container for JRiver Media Center 26
Post by: Robad on June 30, 2020, 07:47:32 am
Thanks again.  I tried following your examples originally.  But I ended up with other 'Container Station' related issues.
I can now see the 'Documents' folder on my NAS mounted from my PC.

I'm still running 26.0.87, despite having recreated the container several times.  Is this because 'shiomax/jrivermc26' has yet to be updated?  Or do I have to download it again somehow?
Title: Re: Docker Container for JRiver Media Center 26
Post by: BryanC on June 30, 2020, 09:09:53 am
Thanks again.  I tried following your examples originally.  But I ended up with other 'Container Station' related issues.
I can now see the 'Documents' folder on my NAS mounted from my PC.

I'm still running 26.0.87, despite having recreated the container several times.  Is this because 'shiomax/jrivermc26' has yet to be updated?  Or do I have to download it again somehow?

You need to rebuild the image, not the container.
Title: Re: Docker Container for JRiver Media Center 26
Post by: max096 on June 30, 2020, 09:12:32 am
You need to rebuild the image, not the container.

No, unless you are feeling adventurous. The images are built already on dockerhub. You need to pull the most recent version is all (docker pull shiomax/jrivermc26). Otherwise it uses the local version you pulled earlier. Then you have to re-create the container.

It is true that it may take up to a week for newer jriver versions to be on dockerhub because I only rebuild them once every sunday currently (automated trigger). Though, currently 26.0.94 is :latest on dockerhub.
Title: Re: Docker Container for JRiver Media Center 26
Post by: Robad on June 30, 2020, 12:36:36 pm
OK.  I purchased the Master license. 
It installed fine on the Windows copy.  But when I type the code into the linux version it says, "Your license file is for a different product".  I also get this message if I try the bin/bash method.

 Rob
Title: Re: Docker Container for JRiver Media Center 26
Post by: JimH on June 30, 2020, 01:08:25 pm
You need the most recent build:

https://yabb.jriver.com/interact/index.php/topic,125866.0.html
Title: Re: Docker Container for JRiver Media Center 26
Post by: Robad on June 30, 2020, 01:47:52 pm
All working fine now, thanks!

Except that I can't access from outside my LAN.  As I noted before, I had it working with MC23.  All I've done is change the IP address in the firewall port forwarding rule...
Title: Re: Docker Container for JRiver Media Center 26
Post by: JimH on June 30, 2020, 02:15:20 pm
In MC's Media Network settings, there is a test that will tell you if the port is open from the outside.
Title: Re: Docker Container for JRiver Media Center 26
Post by: Robad on June 30, 2020, 04:08:02 pm
Yes I know - and it says the server isn't reachable from the Internet.

I have port forwarding set up (52199<->52199 on TCP).  My router identifies MC26 as being connected to it. 

But there's something different from running MC under HybridDesk Station...

Does it matter which mode the container is in?  I'm using 'Bridge' with a static IP address...
Title: Re: Docker Container for JRiver Media Center 26
Post by: JimH on June 30, 2020, 04:25:37 pm
Have you read "Network Access (http://wiki.jriver.com/index.php/Network_Access)" on the wiki?

You can get your outside address by typing whatsmyip at Google.
Title: Re: Docker Container for JRiver Media Center 26
Post by: Robad on July 04, 2020, 06:26:57 am
Yes I have read it.  But I still can't get it to work. 

I have tried port-forwarding on port 52199 to the Container IP (192.168.1.236) and to the QNAP IP (192.168.1.250).  (Though not at the same time...)  Both allow me to access the MC26 UI from my PC's browser at http://192.168.1.236:5800/.

I'm obviously using an "Access Key", so why would I care what my external IP address is??

"This key is automatically generated by JRiver's servers. It is associated with two IP addresses. One is for your server, as seen from inside your network (local), and the other is your outside address (Internet)."

Mind you, I'm intrigued as to how MC26 tells me what the Access Key is if the access test fails, presumably meaning JRiver's servers can't access MC26...
Title: Re: Docker Container for JRiver Media Center 26
Post by: BryanC on July 04, 2020, 08:10:54 am
Use host networking mode until you can get that sorted out. You've got too many variables in play right now for people to help you without just shooting in the dark.

To re-state:

1. You need to enable port forwarding on your gateway device (router) from port 52199 to port 52199 to...

Host mode is easier to diagnose because bridge mode requires a bunch of security contexts that are OS-dependent (e.g.):

Quote
By default, traffic from containers connected to the default bridge network is not forwarded to the outside world. To enable forwarding, you need to change two settings. These are not Docker commands and they affect the Docker host’s kernel.

    Configure the Linux kernel to allow IP forwarding.

    $ sysctl net.ipv4.conf.all.forwarding=1

    Change the policy for the iptables FORWARD policy from DROP to ACCEPT.

    $ sudo iptables -P FORWARD ACCEPT

I'm not familiar with QNAP software, so I don't know how they handle this.
Either way, you will need to assign a manual IP address to the appropriate container/device by MAC so that port forwarding will work.

2. In host mode you will need to use the software firewall port on your device to allow port TCP/52199. Again, I don't know if QNAP handles this automatically or not.

Title: Re: Docker Container for JRiver Media Center 26
Post by: Robad on July 04, 2020, 08:30:53 am
Thanks for the reply.

When I change the container network mode to "Host" I get the following:

"The port may conflict with the NAS port when selecting Host mode.
Use local host network (command: --net=host)
Note:This option allows containers to have full access to the host network interface."

I have no idea what this bit means: "Use local host network (command: --net=host)"

The operation fails with this:

"Failed to apply container settings.
Error Code: 500
Message: 400 Client Error: Bad Request ("conflicting options: mac-address and the network mode")"
Title: Re: Docker Container for JRiver Media Center 26
Post by: BryanC on July 04, 2020, 09:16:50 am
Thanks for the reply.

When I change the container network mode to "Host" I get the following:

"The port may conflict with the NAS port when selecting Host mode.
Use local host network (command: --net=host)
Note:This option allows containers to have full access to the host network interface."

I have no idea what this bit means: "Use local host network (command: --net=host)"

The operation fails with this:

"Failed to apply container settings.
Error Code: 500
Message: 400 Client Error: Bad Request ("conflicting options: mac-address and the network mode")"

This is sounding a lot like a question for QNAP. --net=host is just a docker command line option to enable host networking mode for the container. Presumably QNAP would stop and restart the container with the new settings, but maybe it needs it to be configured at runtime.

Perhaps try disabling the container before changing these settings, or you may need to recreate the container with fresh settings. It sounds like the functionality to dynamically change the network mode exposed by the QNAP software is broken (or maybe this is featured in their docs).
Title: Re: Docker Container for JRiver Media Center 26
Post by: Robad on July 04, 2020, 11:45:50 am
I think I'm going to give up.  I've tried everything I can think of, including:
- Changing network mode to 'Host'
- Changing back to NAT (as I had to create the container as 'NAT', this being the only way to specify a MAC address).
- Changing back to 'Bridge' with same IP as QNAP.
- I even searched for a container configuration file (and failed to find it)...  It would be so much easier to edit such a file, if it exists.

Everything either has no effect or makes it worse, leaving me to work out how to recover.

 :'(
Title: Re: Docker Container for JRiver Media Center 26
Post by: BryanC on July 04, 2020, 04:02:47 pm
I think I'm going to give up.  I've tried everything I can think of, including:
- Changing network mode to 'Host'
- Changing back to NAT (as I had to create the container as 'NAT', this being the only way to specify a MAC address).
- Changing back to 'Bridge' with same IP as QNAP.
- I even searched for a container configuration file (and failed to find it)...  It would be so much easier to edit such a file, if it exists.

Everything either has no effect or makes it worse, leaving me to work out how to recover.

 :'(

This is definitely a QNAP support problem. The containers work fine running in Debian and CentOS on my end. I have no familiarity with QNAP, but I would suggest that if it is possible to just run the containers from the command line using the Docker executable.

Code: [Select]
docker run -d \
    --name=jrivermc26 \
    --net=bridge \
    --restart=always \
    --mac-address=ed:e8:60:2d:65:c1 \
    -p 5800:5800 \
    -p 5900:5900 \
    -p 52199:52199 \
    -p 52101:52101 \
    -p 52100:52100 \
    -p 1900:1900/udp \
    -v config:/config:rw \
    -v /path/to/music:/data/music:rw \
    -e VNC_PASSWORD=12345 \
    shiomax/jrivermc26

It seems that whatever software they have built on top of Docker is broken.
Title: Re: Docker Container for JRiver Media Center 26
Post by: Scobie on July 04, 2020, 07:03:08 pm
My main setup is MC26 running on the QNAP Container Station, and can access from the internet using this config:

Network Mode: Bridge
Use Interface: Adapter 1( Virtual Switch 1)
Static IP (on local network)
Assigned Mac Address (can be anything)

On my router
Forward 52199 to the Static Container Address on TCP/UDP
Title: Re: Docker Container for JRiver Media Center 26
Post by: Robad on July 05, 2020, 11:09:57 am
My main setup is MC26 running on the QNAP Container Station, and can access from the internet using this config:

Network Mode: Bridge
Use Interface: Adapter 1( Virtual Switch 1)
Static IP (on local network)
Assigned Mac Address (can be anything)

On my router
Forward 52199 to the Static Container Address on TCP/UDP

There are only 2 differences on my system:
- "TCP" not "TCP/UDP".  I have changed this and it made no difference...
- I'm using "Virtual Switch 3" - probably due to previous attempts.  The other 2 are not associated with a physical adapter.

"Virtual Switch 3" has the (static) IP address of the QNAP NAS.
Title: Re: Docker Container for JRiver Media Center 26
Post by: Robad on July 05, 2020, 12:27:44 pm
You're not going to believe this...

I just tried connecting from my phone.  The Access Key has been changed so I edited the server in JRemote.  I noticed that there was a field for "Global IP", which was close to the IP address from 'www.whatsmyip.org'.  So I edited it to make it the same.  I then disabled wifi on the phone and succeeded in connecting!

I have no idea of the relevance of this.  Maybe next time I'm allocated a different external IP address it will stop working (despite the Access Key claiming to cope with this).

Test still fails though...
Title: Re: Docker Container for JRiver Media Center 26
Post by: Scobie on July 05, 2020, 04:52:54 pm
If at all possible try and get a static IP from your ISP, it makes external access a lot easier, but it does look like your MC/Container setup is correct given that it did work.

Even so, I think I'm right in saying - happy to be corrected - that as long as your external IP is accessible (i.e. not double NAT'd or something) then if the key is correct JRemote should be able to maintain the correct address.
Title: Re: Docker Container for JRiver Media Center 26
Post by: max096 on July 06, 2020, 11:26:21 am
Thanks for the reply.

When I change the container network mode to "Host" I get the following:

"The port may conflict with the NAS port when selecting Host mode.
Use local host network (command: --net=host)
Note:This option allows containers to have full access to the host network interface."

I have no idea what this bit means: "Use local host network (command: --net=host)"

The operation fails with this:

"Failed to apply container settings.
Error Code: 500
Message: 400 Client Error: Bad Request ("conflicting options: mac-address and the network mode")"

The error makes sence. When you use host networking you are using your hosts network interface. You cannot just reconfigure its mac address from a docker command and thatīs a good thing. So donīt use the mac address option with host networking. The only reason I included the mac address in the bridge config is because otherwise your mac address will change when you teardown and recreate the container (in case of updating it) and then you would have to re-activate jriver every time. Bridge networking means youll create an isolated virtual network for every (although possible to configure one for multiple) container(s) you create.
Title: Re: Docker Container for JRiver Media Center 26
Post by: HaWi on July 21, 2020, 02:19:58 pm
Hi all
I'm a total rookie in Docker but I would like to set up a MC26 Docker container on my Synology 1819+. I got as as far as being able to log into it with JRemote but it doesn't see the media files. I have them located in /music right on volume1.
I also created a symlink to that folder in /docker/config/music. I tried either
-v /volume1/docker/config/music:/music:rw \    or
-v /volume1/music:/music:rw \
to no avail
Could someone please explain to me how to get the correct path to my media?
many thanks
Hans
PS: this is what I used to start up (with the correct Key, of course):

sudo docker run -d \
    --name=jrivermc26 \
    --net=host \
    --restart=always \
    -v config:/config:rw \
    -v /volume1/docker/config/music:/music:rw \  or -v /docker/config/music:/music:rw \
    -e VNC_PASSWORD=XXXXX \
    shiomax/jrivermc26
Title: Re: Docker Container for JRiver Media Center 26
Post by: max096 on July 21, 2020, 11:03:51 pm
-v /volume1/docker/config/music:/music:rw

The left path /volume1/docker/config/music is the path on your actual machine to your music and /music is where you would find them inside the container. You can put your music wherever you want. In the examples I suggested /data/music, but if you prefer /music that's perfectly fine. You can set the folder to effectively anything you want. But the right path is where it's going to end up at. Since you set it to /music that's where /volume1/docker/config/music is going to be inside your container.
Title: Re: Docker Container for JRiver Media Center 26
Post by: HaWi on July 22, 2020, 09:29:26 am
Thanks max!
In the container terminal I can see the media in the /data/music folder (after understanding that this is the container internal folder for the media, I changed to /data/music as you suggested). However, when I connect to the server with JRemote, there are no media. Could it be a permissions issue? How would I change those permissions?
EDIT: When I try to set up file location in MC26 on the Synology, I get an error (see attached). How can I get this fixed?
 
many thanks,
Hans
Title: Re: Docker Container for JRiver Media Center 26
Post by: max096 on July 23, 2020, 02:46:01 am
Thanks max!
In the container terminal I can see the media in the /data/music folder (after understanding that this is the container internal folder for the media, I changed to /data/music as you suggested). However, when I connect to the server with JRemote, there are no media. Could it be a permissions issue? How would I change those permissions?
EDIT: When I try to set up file location in MC26 on the Synology, I get an error (see attached). How can I get this fixed?
 
many thanks,
Hans

Try this.
On your NAS run
Code: [Select]
ls -la /volume1/docker/config/music

See what user and group the folder belongs to.

Look up the numeric userid and groupid of those (id user).

Then similarly to how you set the VNC_PASSWORD environment variable you are gonna set USER_ID to the numeric user id and GROUP_ID to the group id.
Title: Re: Docker Container for JRiver Media Center 26
Post by: HaWi on July 23, 2020, 01:12:56 pm
Great, thank you so much max, I'll try that!
Best wishes,

Hans
Title: Re: Docker Container for JRiver Media Center 26
Post by: HaWi on July 23, 2020, 01:53:14 pm
Well, both UserI and GroupID are 1000 which, I take it, is administrators. I set the variables to that but still the MC26 docker container cannot get access to the media. My user ID has all the privileges, too but when I set the user ID to mine, I cannot even open MC in the Browser on port 5800. Is there any other way?
many thanks,
Hans

EDIT: I finally figured out how to get access to the Media. Turns out that I had the UID and GID wrong. Using the id command in the terminal I found out the correct IDs for the owners, which I changed previously. Trying to import the into the library now...
Thanks so much for your help! I learned a lot about Linux and CLI, btw.
EDIT2: It's all working now. I restored a backup of my iMac library into the Docker MC26, changed the file location on all tracks and it's working as brilliantly as on the iMac, JRemote works as well. I am very happy.
EDIT3: Thank you so much again for creating this image. You are a star!
cheers,
Hans
Title: Re: Docker Container for JRiver Media Center 26
Post by: max096 on July 23, 2020, 08:53:01 pm
Well, both UserI and GroupID are 1000 which, I take it, is administrators. I set the variables to that but still the MC26 docker container cannot get access to the media. My user ID has all the privileges, too but when I set the user ID to mine, I cannot even open MC in the Browser on port 5800. Is there any other way?
many thanks,
Hans

EDIT: I finally figured out how to get access to the Media. Turns out that I had the UID and GID wrong. Using the id command in the terminal I found out the correct IDs for the owners, which I changed previously. Trying to import the into the library now...
Thanks so much for your help! I learned a lot about Linux and CLI, btw.
EDIT2: It's all working now. I restored a backup of my iMac library into the Docker MC26, changed the file location on all tracks and it's working as brilliantly as on the iMac, JRemote works as well. I am very happy.
EDIT3: Thank you so much again for creating this image. You are a star!
cheers,
Hans

No problem.  :)

1000 is the default value of those two variables in the image and in any generic Linux distro I know off the id of the first user you create.
Title: Re: Docker Container for JRiver Media Center 26
Post by: HaWi on July 24, 2020, 11:40:47 am
Thanks for the info, I didn't know that.
Can I ask another question?
I now have two identical libraries running. The original one on the iMac and the restored backup of it in the Synology/Docker Container. I would like to use the Mac for maintaining the library and the Docker Container to actually serve up the music so I don't need to run my Mac all the time, especially when I am away from home (The NAS is running 24/7).
Is there a way to keep the libraries synchronized without having the Mac on all the time or is there a way to only use one library?
Many thanks,
Hans
Title: Re: Docker Container for JRiver Media Center 26
Post by: max096 on July 24, 2020, 03:12:39 pm
Thanks for the info, I didn't know that.
Can I ask another question?
I now have two identical libraries running. The original one on the iMac and the restored backup of it in the Synology/Docker Container. I would like to use the Mac for maintaining the library and the Docker Container to actually serve up the music so I don't need to run my Mac all the time, especially when I am away from home (The NAS is running 24/7).
Is there a way to keep the libraries synchronized without having the Mac on all the time or is there a way to only use one library?
Many thanks,
Hans

With JRiver media network features you can connect to another jriver library in your network and stream the music from there. Activate the media network in the settings in jriver on your NAS, put a password if you want one. Then you can connect to it from any other JRiver instance by adding it as a new library.
Title: Re: Docker Container for JRiver Media Center 26
Post by: HaWi on July 24, 2020, 03:26:44 pm
Thank you max!
Does that mean I don't have to have the Mac running and can still stream from the Mac library. That almost sounds too good to be true.
cheers,
Hans
EDIT: Looks like I cannot access the Mac library from the Docker Container and neither can I access the Docker Container library from the Mac MC26 (it's in the .jriver folder that's invisible in samba on my Mac). I there a way around this?
EDIT2: I found a potential solution: I cloned the Docker MC26 library into a new share, also mounted from Docker. Then, I load that library from MC26 on my iMac and point all tracks it to the correct path from the iMac. It works although it's a little slow on the Mac. I'm OK with that for now but please, let me know if you can think of a better solution.
many thanks,
Hans
Title: Re: Docker Container for JRiver Media Center 26
Post by: max096 on July 24, 2020, 05:10:20 pm
Thank you max!
Does that mean I don't have to have the Mac running and can still stream from the Mac library. That almost sounds too good to be true.
cheers,
Hans
EDIT: Looks like I cannot access the Mac library from the Docker Container and neither can I access the Docker Container library from the Mac MC26 (it's in the .jriver folder that's invisible in samba on my Mac). I there a way around this?

You just want to not have a local library on your mac (put everything on your nas). You add a new library on your MAC and type in the ip of your NAS/Docker container. You need to enable media network on the NAS jriver instance but I think you already did that given you connected to it with jremote. Same concept you just connect to it with jriver.

The only upside to a "sync" type of solution would be that if you have a notebook. You could then take it with you and still have your media even if you donīt have access to your NAS (not sure if thatīs entierly possible though). But if we are talking about a desktop iMAC I really do not see the point on why it would be necessary to connect from anything to your iMAC except for remote controlling what your iMAC plays right now. And for that it needs to be on either way or it wonīt play music.
Title: Re: Docker Container for JRiver Media Center 26
Post by: HaWi on July 24, 2020, 07:24:22 pm
Thanks max!
Title: Re: Docker Container for JRiver Media Center 26
Post by: HaWi on August 03, 2020, 03:20:17 pm
I recently looked at the log in the MC26 Docker Container and discovered that there are multiple (>1500) attempts to access the container from the Internet. They all have different IP addresses but trace back to vmixxxxxx.contaboserver.net (xxxxxx is a different number in each case) in Germany. I have set a Firewall rule on my DS1819+ to deny all access from Germany but it is still happening. I have attached a sample screenshot from the log.
Is there any way I can prevent this in the future?
Many thanks,
Hans
Title: Re: Docker Container for JRiver Media Center 26
Post by: bob on August 03, 2020, 05:24:50 pm
I recently looked at the log in the MC26 Docker Container and discovered that there are multiple (>1500) attempts to access the container from the Internet. They all have different IP addresses but trace back to vmixxxxxx.contaboserver.net (xxxxxx is a different number in each case) in Germany. I have set a Firewall rule on my DS1819+ to deny all access from Germany but it is still happening. I have attached a sample screenshot from the log.
Is there any way I can prevent this in the future?
Many thanks,
Hans
I have no idea why you are seeing that but if the docker container ethernet interface is running in bridged mode you can't block it by changing the firewall on the device it's running on (the DS1819+ I assume) .
You could run a firewall in the container or block it on your outside router.
I'm suspicious that you are seeing response packets to something originating from within the container itself.
Title: Re: Docker Container for JRiver Media Center 26
Post by: max096 on August 04, 2020, 03:21:10 am
That's the log from x11vnc. Does not look like he guessed your password though. But also does not look like your firewall rules are working if you are still getting that after you applied them.

One thing you can do in the container is enable secure connection. That will enable https and ssl in vnc. Ofc it wont really solve the problem of it being world viewable if you make it public. If you dont need to access vnc when not at home then don't foward 5800 and 5900 from your router to your NAS.

Id recommend looking into setting up a VPN to you home network and don't expose any ports of any services otherwise. The less gates you open the less you are gonna get annoyed by them.

Another good way to do it if you need public accessability without a VPN would be haproxy. Ive not looked into it that much yet. But Ive seen this https://forum.level1techs.com/t/haproxy-wi-run-lots-of-public-services-on-your-home-server/159335 recently. Looked very interesting.
Title: Re: Docker Container for JRiver Media Center 26
Post by: max096 on August 04, 2020, 07:19:35 am
I have no idea why you are seeing that but if the docker container ethernet interface is running in bridged mode you can't block it by changing the firewall on the device it's running on (the DS1819+ I assume) .
You could run a firewall in the container or block it on your outside router.
I'm suspicious that you are seeing response packets to something originating from within the container itself.

Not sure how you come to the conclusion that a connection is established from within the container to the outside?
Title: Re: Docker Container for JRiver Media Center 26
Post by: bob on August 04, 2020, 10:43:32 am
Not sure how you come to the conclusion that a connection is established from within the container to the outside?
It's not a conclusion, just a guess since he wasn't able to block the address.
I really didn't know why he'd be getting incoming to a container, I wasn't aware that he'd enabled VNC to the NAS.
Title: Re: Docker Container for JRiver Media Center 26
Post by: max096 on August 04, 2020, 11:40:54 am
It's not a conclusion, just a guess since he wasn't able to block the address.
I really didn't know why he'd be getting incoming to a container, I wasn't aware that he'd enabled VNC to the NAS.

The VNC stuff is all in the container. Since JRiver requires a GUI you kinda sorta have to access it somehow. I dont really want a full blown DE on my servers so that was one of the main reason I even turned to docker for that.

Public accessability and security are always a bit tricky. I would also imagine if bots find a VNC server they would try to tackle it since to me anyways requiering remote desktop on your server would lead me to believe you are an easier target to be hacked. That hacker gonna be pretty disappointed when all he sees is JRiver. ^^
Title: Re: Docker Container for JRiver Media Center 26
Post by: bob on August 04, 2020, 12:15:42 pm
Great, thanks for the explanation.
Title: Re: Docker Container for JRiver Media Center 26
Post by: HaWi on August 04, 2020, 12:44:52 pm
I have no idea why you are seeing that but if the docker container ethernet interface is running in bridged mode you can't block it by changing the firewall on the device it's running on (the DS1819+ I assume) .
You could run a firewall in the container or block it on your outside router.
I'm suspicious that you are seeing response packets to something originating from within the container itself.

Thanks Bob, I am running it in host mode, though.
Title: Re: Docker Container for JRiver Media Center 26
Post by: HaWi on August 04, 2020, 12:53:00 pm
That's the log from x11vnc. Does not look like he guessed your password though. But also does not look like your firewall rules are working if you are still getting that after you applied them.

One thing you can do in the container is enable secure connection. That will enable https and ssl in vnc. Ofc it wont really solve the problem of it being world viewable if you make it public. If you dont need to access vnc when not at home then don't foward 5800 and 5900 from your router to your NAS.

Id recommend looking into setting up a VPN to you home network and don't expose any ports of any services otherwise. The less gates you open the less you are gonna get annoyed by them.

Another good way to do it if you need public accessability without a VPN would be haproxy. Ive not looked into it that much yet. But Ive seen this https://forum.level1techs.com/t/haproxy-wi-run-lots-of-public-services-on-your-home-server/159335 recently. Looked very interesting.
Thanks max,
I am running in host mode, so the firewall should work but maybe that's a Synology issue (i'll check again). The reason why I moved MC to Docker was so that I can access it from outside the LAN and have it running 24/7.
What worries me is that due to the restriction to 6  characters for the password, eventually one of them is guessing the right one. I will look into VPN or haproxy which was my plan anyway (that's going to annoy my wife and kids  ;D). I am just such a dud when it comes to networks.

cheers,
Hans
Title: Re: Docker Container for JRiver Media Center 26
Post by: max096 on August 04, 2020, 01:22:39 pm
Thanks max,
What worries me is that due to the restriction to 6  characters for the password, eventually one of them is guessing the right one. I will look into VPN or haproxy which was my plan anyway (that's going to annoy my wife and kids  ;D). I am just such a dud when it comes to networks.

There is no restriction to have 6 characters as your VNC password. Mine is longer than that.
Title: Re: Docker Container for JRiver Media Center 26
Post by: HaWi on August 04, 2020, 02:01:08 pm
Thanks max,
I am running in host mode, so the firewall should work but maybe that's a Synology issue (i'll check again). The reason why I moved MC to Docker was so that I can access it from outside the LAN and have it running 24/7.
What worries me is that due to the restriction to 6  characters for the password, eventually one of them is guessing the right one. I will look into VPN or haproxy which was my plan anyway (that's going to annoy my wife and kids  ;D). I am just such a dud when it comes to networks.

cheers,
Hans

I looked into my settings again and I set a IPv6 firewall rule on my Eero gateway to block all the MC ports from IPv6 and now, it seems that the attacks are being quashed. Fingers crossed.
EDIT: Spoke too soon, the attacks slowed down a bit but still coming...
Title: Re: Docker Container for JRiver Media Center 26
Post by: max096 on August 04, 2020, 06:03:40 pm
I looked into my settings again and I set a IPv6 firewall rule on my Eero gateway to block all the MC ports from IPv6 and now, it seems that the attacks are being quashed. Fingers crossed.
EDIT: Spoke too soon, the attacks slowed down a bit but still coming...

How did you block germany as a country? Can you lookup what IPs are on that list your router is using? Try to instead block specific IPs, or ranges. If your router has a country based blocking system it might very well be spotty. The only way that I can tell to find out where an IP is coming from is to ask external services that supposedly know it, because they built databases mapping it based on what IPs belong to what ISP (currently, hopefully). But threw the actual connection there is not really anything you can trust that I know of to really tell where the IP is coming from.
Title: Re: Docker Container for JRiver Media Center 26
Post by: HaWi on August 04, 2020, 08:52:42 pm
How did you block germany as a country?
I am using the Synology Firewall, there you can select Countries but, as you say, that might be spotty.
Can you lookup what IPs are on that list your router is using? Try to instead block specific IPs, or ranges. If your router has a country based blocking system it might very well be spotty. The only way that I can tell to find out where an IP is coming from is to ask external services that supposedly know it, because they built databases mapping it based on what IPs belong to what ISP (currently, hopefully). But threw the actual connection there is not really anything you can trust that I know of to really tell where the IP is coming from.
I have also blocked ranges of IP's but there have been >1500 IPs so far ... And I blocked myself a few times, too  ;D
I ran  Traceroute in Network Utilities on my Mac, and the penultimate server often shows a domain name, like a provider (Telstra, in Sweden comes up often, too), so I am only guessing. I have set up a quick and dirty OpenVPN server on the Synology but am unclear if I should now remove all Port fwds from my Router, which is a Eero, and makes it very painful to reopen them. If I do it, do I need to open the ports through VPN? I am a total noob, I'm afraid.
Title: Re: Docker Container for JRiver Media Center 26
Post by: Scobie on August 04, 2020, 10:27:33 pm
Would it be worth destroying the Container and redownloading the image?

May be that you've been hacked so best thing is just to kill it and redeploy...?
Title: Re: Docker Container for JRiver Media Center 26
Post by: HaWi on August 05, 2020, 03:53:45 pm
Would it be worth destroying the Container and redownloading the image?

May be that you've been hacked so best thing is just to kill it and redeploy...?
I don't think I have been hacked. All the attempts failed at authentication.
Title: Re: Docker Container for JRiver Media Center 26
Post by: HaWi on August 06, 2020, 09:55:06 am
I am running into a problem now that when I activate the firewall, I cannot open MC26 on port 5800 anymore. I have a rule opening it, though. I also open all the other ports that I thought I needed, like 5900, 51000, 51101, 52199, 52000. Are there any ports I am missing?  The problem goes away when I disable the final Deny All rule.
Many thanks,
Hans
EDIT: I think I figured it out. Some ports were UDP and needed to be TCP...
Title: Re: Docker Container for JRiver Media Center 26
Post by: max096 on August 07, 2020, 11:13:09 am
I am running into a problem now that when I activate the firewall, I cannot open MC26 on port 5800 anymore. I have a rule opening it, though. I also open all the other ports that I thought I needed, like 5900, 51000, 51101, 52199, 52000. Are there any ports I am missing?  The problem goes away when I disable the final Deny All rule.
Many thanks,
Hans

You just need 52199 to be able to connect to it with JRiver and JRemote etc. 5900 or 5800 for VNC if you need it. Have you tried to enable SECURE_CONNECTION? You can read up more here https://github.com/jlesage/docker-baseimage-gui#security. Id recommend it either way if you do want to host it in a public manner. It might also have the unintended side effect of breaking whatever VNC client they are using, because SSL over VNC is very much not a standard feature at all. You are very restricted in what VNC client you are able to use with it. A lot of them donīt work with it at all. Just use one that works yourself.

About your firewall rules. I canīt really help you with that either as Im not very familiar with synology NAS. Im sure there are many resources out there as itīs very popular NAS solution. I do however think that blocking all people that ever try to access it is a real rats nest to get into especially if you are getting thouthands of requests already. IPs are very easy to come by these days with all the AWS of the world that allow you to just spin up things anywhere around the globe on demand. I would say keep the container up to date (at least once every monthsīish) with a secure enough password you should not have problems with it. Make backups of your config and music directory and they wonīt even be able to do any considerable damage when they get it right.

If you can manage also try to use a different public port other than 5900 (or use the 5800 web ui, should also be better). As 5900 is the default VNC port it is what people would look for. Just pick something like 8083 you will likely see far less access on it. If you cannot do it on your router like this for some reason I think you can also change it with the -rfbport option. I however never tried this and am not sure if the webui would still work when the VNC port has changed inside the container.

Just to give you an idea how many possible combinations there are in passwords to make you a bit more comfortable about your thouthands of requests. There are 26 letters in the alphapet. Lets just say we restrict ourselves to only lower case letter and 10 of them. That would mean you have 26! / (26-10)! options which if you type it into google (well... calculator on the go lul) it spits out 1.9275224e+13 possible combinations, so appearently google decides 19275224000000 is too big for the calculator already to display (e+13 means * (10^13)). You can play this game with bigger sets of possible characters and/or longer passwords. You will find that you very quickly reach a number that is unimaginable big in human terms. Meaning if your password is secure enough you probably cannot brute force it. They would need some exploit or social engineering to skip or get the password. They still try anyways as there are a lot of machines out there that run unsecure passwords you would find in common password lists, or combinations of those lists. Or itīs a well known default password from products that automatically configure VNC.
Title: Re: Docker Container for JRiver Media Center 26
Post by: HaWi on August 07, 2020, 03:29:58 pm
Thanks Max! This is very helpful. With my latest changes to the firewall and closing all unnecessary ports on my router, I haven't seen a single attempt coming through for >24 hours.
EDIT: I realized that I could NOT fwd ports 5800/5900 and still get local access to the UI via a browser which is all I need.
I will look into SECURE_CONNECTION, as long as it doesn't break JRemote access, as this is the only app I use to access the library remotely.
In case I wanted to change the default VNC ports I know how to forward them from my router but I am unsure how to tell the container since I am running in host mode. Would I have to switch to bridge mode? Or could I just change the remote port and fwd to 5800, for example.
Your are right, of course, the number of combinations is huge, even for 6 characters. JRiver assign a unique, random VNC password for every installation, so worries are unfounded. I also have 3-2-1 backups, so if anything nasty should happen, I should be OK.
Thank you so much again, Max, for giving us the opportunity to run MC on a NAS.
cheers,
Hans
Title: Re: Docker Container for JRiver Media Center 26
Post by: max096 on August 07, 2020, 08:47:52 pm
EDIT: I realized that I could NOT fwd ports 5800/5900 and still get local access to the UI via a browser which is all I need.
I will look into SECURE_CONNECTION, as long as it doesn't break JRemote access, as this is the only app I use to access the library remotely.

It does not impact MC in any way. VNC is just the remote desktop server running in the container. When you go to the website at :5800 thatīs the novnc webui (which is just a client for the VNC Server running on the web, so youīd see an access from 127.0.0.1 in the docker logs when you use the webui, no matter from where you do that). Otherwise, youīd use a program such as https://www.realvnc.com/en/connect/download/viewer/ or http://www.karlrunge.com/x11vnc/ssvnc.html and access the "desktop" that way using port 5900. If you donīt do that ever. You might as well block 5900 entierly.

About the SECURE_CONNECTION this itīs just another environment variable. Remember how you set the USER_ID thing. Do the same thing except this one is just on or off. So 1 would be on. When you access your browser it will then tell you "this is not a secure connection" (or something similar to that, ironically). This is because you created your own certificate (or the container did anyways on first startup with that flag). You are not an authorized certificate provider that sells certificates. So your certificate isnīt trusted automatically. Itīs used to make https work, so you actually have an encrypted connection. This is a lot better than not having https/ssl.

In case I wanted to change the default VNC ports I know how to forward them from my router but I am unsure how to tell the container since I am running in host mode. Would I have to switch to bridge mode? Or could I just change the remote port and fwd to 5800, for example.

What i was suggesting is to forward port 8083 on your router to port 5900 on your NAS. So, then if you where outside your local lan youd have to use :8083 for VNC instead of 5900 inside your Lan still 5900. It does not make the VNC server disappear entierly, but it does make it harder to discover.


Your are right, of course, the number of combinations is huge, even for 6 characters. JRiver assign a unique, random VNC password for every installation, so worries are unfounded. I also have 3-2-1 backups, so if anything nasty should happen, I should be OK.

Youīre probably talking about the 6 digigs access key in Media Center (now I also know where you got the idea from that there would be a limit for the lenghts...). Thatīs not your vnc password. Nobody tried to access media center in the PDF you sent. And nobody really wants to do that either (at least it would surprise me). They donīt know the "desktop" they are trying to get into is literally just media center without anything else running. It could be any machine, like a Windows desktop where you can encrypt random peoples harddrives and then send them emails to pay you xyz money so that you supposedly unencrypt it again (maybe). It all does not really apply here. This is bearly even a working desktop and the only program is MC. As I laid it out earlier whoever is or was trying to get into it would be very disappinted when he acutally sees whatīs there. A whole lot of nothing. If they wanted songs they could just pirate them it would be much easier than trying to get into random peoples media libraries.
Title: Re: Docker Container for JRiver Media Center 26
Post by: HaWi on August 08, 2020, 11:07:34 am
Thank you, Max!
Now I understand better how it works. I had no idea that the VNC Access Key is not the VNC password because the Access Key is what I plug in every time I open the UI on the browser. Also, I only need to access the webui locally so I have removed both 5800 and 5900 from my router.
One more question, to update the container, do I just download the latest image and then re-run the script I originally used to install the container or is there a way to just update from the new image?
cheers,
Hans
Title: Re: Docker Container for JRiver Media Center 26
Post by: max096 on August 08, 2020, 11:44:43 am
One more question, to update the container, do I just download the latest image and then re-run the script I originally used to install the container or is there a way to just update from the new image?

Yes, thats how I would recommend you do it with this image.

Now I understand better how it works. I had no idea that the VNC Access Key is not the VNC password because the Access Key is what I plug in every time I open the UI on the browser. Also, I only need to access the webui locally so I have removed both 5800 and 5900 from my router.

Maybe I got lost here as well. The one you enter into the webui is indeed the vncpassword. But you also said that it is random for every media center installation and that itīs limited to 6 characters. Both of those things are not true for the vncpassword, but would be if you are talking about the access key media center creates. You defined the vncpassword when you created the container, you choose it with any lengths you want. The access key is this thing https://wiki.jriver.com/index.php/Access_Key and has nothing to do with VNC.
Title: Re: Docker Container for JRiver Media Center 26
Post by: HaWi on August 08, 2020, 02:15:32 pm
Thanks Max, that makes sense. My faulty assumption was that the VNC password had to be the VNC Access Code, so that‘s what I put as the VNC password. Now I understand that I can put anything as the VNC password. I will change that, next time I update.
Title: Re: Docker Container for JRiver Media Center 26
Post by: Afrosheen on August 10, 2020, 06:06:55 pm
I figured out what was wrong. In the start command of MC I set the home directory to /config and in the command I now entered I did not do that.

So this is how you can activate the container with the mjr file. First get the mjr file and place it into the config folder. I just named it key.mjr, because I copied it with scp and it was less to type. Also my container is named jrivermc26, yours might have a different name.

Code: [Select]
docker exec -it jrivermc26 /bin/bash
exec env HOME=/config mediacenter26 /RestoreFromFile /config/key.mjr

As I said I'm probably gonna just make this happen on startup when the config directory contains any file with the .mjr extension. But for now this works.

I have just pushed a new version of it. It looks for .mjr files within the config directory every 30 seconds. When it finds one it tries to activate jriver with it. If it's successful it get's rid of the .mjr file.

Hi, I hope this message receives you all well.  I'm having trouble with keeping the app licensed upon restarting my NAS.  Each time I restart I have to retype the license key before being able to use the app.  Instead of doing that, I'm trying to follow your method of just having the license key file stored in the "config" folder, but one wasn't created when I installed it via QNAP's Container Station app.  I've created a screenshot of the folder structure and have placed the file in every folder that seems reasonable, but no avail.  I'm not familiar with using the command line with QNAP's Container Station.  I appreciate the consideration.
Title: Re: Docker Container for JRiver Media Center 26
Post by: Scobie on August 10, 2020, 09:57:03 pm
You can get around this issue by assigning a Mac address to the container. The license blows up because it is looking for the same Mac address it used before and when it doesnt find it it assumes it is running on a different host.

Doesn't have to be a accurate, just valid, and there are places online to generate one.
Title: Re: Docker Container for JRiver Media Center 26
Post by: max096 on August 12, 2020, 09:55:16 am
Hi, I hope this message receives you all well.  I'm having trouble with keeping the app licensed upon restarting my NAS.  Each time I restart I have to retype the license key before being able to use the app.  Instead of doing that, I'm trying to follow your method of just having the license key file stored in the "config" folder, but one wasn't created when I installed it via QNAP's Container Station app.  I've created a screenshot of the folder structure and have placed the file in every folder that seems reasonable, but no avail.  I'm not familiar with using the command line with QNAP's Container Station.  I appreciate the consideration.

Was this resolved now? By the looks of it your _data folder is mounted to /config. Since the user chooses the path to mount it to the only way I can refer to it is "the config directory", in your case it means _data then.

The MJR file wonīt help you if your license key gets accepted. Itīs only a fallback way to activate if the license key does not work at all.

As @Scobie said you might have to specify a mac address for the license to stay activated (this is only neccessary when using bridge networking). If you do not need the ablity to remap ports I would recomend you use host networking, then you also do not need to specify a mac address as it uses your hosts network interface instead of generating a virtual one.
Title: Re: Docker Container for JRiver Media Center 26
Post by: Afrosheen on August 12, 2020, 01:35:54 pm
Yes it’s resolved! Thank you!! I just rebuilt the container with a specified MAC address last night and then restarted and it opens without the splash screen!

I’ve had to build it with bridge networking because using the same LAN IP as the NAS itself makes things go haywire. Maybe I’m missing something but I just wanted to get a stable MC server running again.

Thanks again for the help @Scobie & @max096
Title: Re: Docker Container for JRiver Media Center 26
Post by: HaWi on August 13, 2020, 10:19:52 am

I’ve had to build it with bridge networking because using the same LAN IP as the NAS itself makes things go haywire. Maybe I’m missing something but I just wanted to get a stable MC server running again.

Strange, I am running MC in host mode on my Synology DS1891+ and, apart from all the rookie mistakes I made, I haven't had a problem. I activated MC in docker by using the MC27 master license .mjr key file through the WebUI. I do have to put in the Access Key every time I reload the UI on my browser, though.
Title: Re: Docker Container for JRiver Media Center 26
Post by: Afrosheen on August 13, 2020, 12:32:37 pm
I’d love to be able to do that as I’ve been wanting to connect to the server remotely outside of JRemote. But I’ve had to install the container through QNAPs Container Station app, so I’m not sure how it handles all of the behind the scenes networking. Most QNAP apps outside of Container Station just need a unique port suffix to connect, but when I last did *hosting* with JRiver as a docked container with its own unique port, I couldn’t connect to my NAS and had to reset the main network configs.

I don’t mind to try it again as I now know what to do if it goes sideways again, but I’m not sure if I could do anything differently to the container without coming back to the same problem.

Maybe someone here with a QNAP NAS could show how they set things up?
Title: Re: Docker Container for JRiver Media Center 26
Post by: Scobie on August 13, 2020, 07:21:30 pm
I'm running this setup using the QNAP Container Station and can hit my container MC server from outside using JRemote, so I think I can do whatever it is you are looking for...?

Happy to help, what exactly are you looking to achieve?
Title: Re: Docker Container for JRiver Media Center 26
Post by: Afrosheen on August 16, 2020, 01:34:25 pm
Thanks @Scobie!

Since I'm not well versed with using the command line when installing docker images, I went with using the app's GUI when installing the container for JRiver.  But I am willing to learn either way.  The end goal is to be able to set the IP address to the container so that I can set a hostname to it and then connect to it remotely. Currently I can only connect to the main client when I am connected to the LAN. 
Title: Re: Docker Container for JRiver Media Center 26
Post by: Scobie on August 16, 2020, 06:05:07 pm
I use the Container Station wizard/UI as it provides all the required options and saves having to putty or SSH into the QNAP and run docker commands.

If you're able to connect internally it sounds like you're just about there, and the only thing left to do is sort networking.

I have my Container Network mode set to Bridge and use a static IP to set a unique address for the MC instance on my network. Once it is in this state, MC is behaving no differently to how it would on a physical host on your internal network. If you use DLNA quite a bit in your setup you might want to use DHCP instead, and reserve the address for MC to use. DLNA often works better that way but I find it makes no difference in my setup so leave it at static. Pretty simple, have attached a screenshot.

Only thing to remember is to also add a Mac Address as noted in this thread, I've scrubbed mine out in the screenshot.

Just remember as well to back your library up before making a change to a container setting, as it will most likely cause the image to generate a new container.



To access MC from outside your network you either need to configure port forwarding on your router, or possibly DDNS from within the QNAP.

I use port forwarding, and configure anything coming in on port 5800 to go to the IP Address I configured in my Container Station setup. Similarly for JRemote I configure port 52199.





Title: Re: Docker Container for JRiver Media Center 26
Post by: Afrosheen on August 16, 2020, 10:51:09 pm
Ok I’m with you so far. Now this is where I have trouble. When you open ports 5800 and 52199 which IP do you list those ports under? I’ve had to set mine to the IP set for JRiver container and not the IP for QNAP. But this means that I can only locally connect because I have to type the local IP with the port suffix; using the hostname for QNAP with the port for JRiver doesn’t allow me to connect like I would with QNAP apps.
Title: Re: Docker Container for JRiver Media Center 26
Post by: Scobie on August 16, 2020, 11:10:14 pm
What you are actually looking to do is tell your router/firewall to perform an action based on an incoming request for a specific port on a service inside your network.

So when you are outside your network, you need to know your external facing (or public) IP address. Type whatsmyip in a browser and this will tell you.

It is this external/public address, with port 5900 that you use to access MC from outside your network. In you router /firewall config, you tell it to redirect incoming requests on port 5900 to the IP address of your actual container instance, not the QNAP address.

So with my config, I have a rule on my firewall that says anything that hits the external IP looking for port 5900 gets redirected to 192.168.1.126 on the same port for protocols TCP & UDP, in effect routing <externalIP>:5900 to 192.168.1.126:5900 which is MC. In your router or firewall config this will be called "Port Address Translation" or "Virtual Server" or similar.

There is a separate translation for JRemote/Panel requests for Port 52199.
Title: Re: Docker Container for JRiver Media Center 26
Post by: HaWi on August 20, 2020, 11:07:31 am
I am having trouble updating the MC26 container. When I run   
Code: [Select]
docker pull shiomax/jrivermc26:latestI get this error
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.39/images/create?fromImage=shiomax%2Fjrivermc26&tag=latest: dial unix /var/run/docker.sock: connect: permission denied

What am I doing wrong?
Many thanks
Hans
EDIT: Sorry, I got it. Needed to use sudo
All set now.
Title: Re: Docker Container for JRiver Media Center 26
Post by: HaWi on September 01, 2020, 09:46:40 am
I have been trying to update to the latest image but when I run the install script I get this error:
docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.39/containers/create?name=jrivermc26: dial unix /var/run/docker.sock: connect: permission denied.
See 'docker run --help'.

This is what I get when I run with sudo:
Unable to find image 'shiomax-jrivermc26:latest' locally
docker: Error response from daemon: pull access denied for shiomax-jrivermc26, repository does not exist or may require 'docker login'.
See 'docker run --help'.

What am I doing wrong?
Many thanks for any help
Hans
EDIT: I was able to install the latest MC (26.0.107) via Docker. I manually had to add/update the Volumes and IDs but it works. Not sure why the CL script didn't work (I definitely had the latest image downloaded).
Title: Re: Docker Container for JRiver Media Center 26
Post by: max096 on September 04, 2020, 03:52:59 pm
Unable to find image 'shiomax-jrivermc26:latest' locally
docker: Error response from daemon: pull access denied for shiomax-jrivermc26, repository does not exist or may require 'docker login'.

You just wrote it wrong. It should be shiomax/jrivermc26:latest. You can also add your user to the docker group then you donīt need sudo anymore.

Code: [Select]
sudo usermod -aG docker $USER

Log out, log back in and it should be able to operate docker without sudo. Itīs mainly a convinience feature and does not actually really change anything.
Title: Re: Docker Container for JRiver Media Center 26
Post by: HaWi on September 05, 2020, 07:02:34 am
Thank you Max. I appreciate your help as always
Hans
Title: Re: Docker Container for JRiver Media Center 26
Post by: NH on September 08, 2020, 06:44:32 am
I have version 25 and am using QNAP TS 253A. I have the docker image installed in the container station.

I am missing a step by step guide to be able to successfully install it and get it running.

I have installed a music tagging software SongKong in the docker station which came with very detailed instructions (a screenshot and instructions for every step) and it worked seamlessly. Have attached that link as an example (http://www.jthink.net/songkong/install_docker_qnap.jsp)

Will be very grateful if someone could take the trouble of sharing such instructions. Will make a big difference in that I can have our favorite MC running all the time on the NAS and operate it remotely.

Many thanks in advance.

Best

NH
Title: Re: Docker Container for JRiver Media Center 26
Post by: HaWi on September 08, 2020, 07:10:36 am

https://gitlab.com/shiomax/jrivermc-docker
This should give you everything you need for successful installation.
Title: Re: Docker Container for JRiver Media Center 26
Post by: KBoz on September 11, 2020, 05:19:55 pm
I'd like to do the container station set up for QNAP.  How do I reference the git location of jrivermc26 or 27 and then can I do host networkig and still access from outside with port forwarding?  I'm likely going to have problems with setting up my music folder but I'll work on that after I get the basics done.

I'll also be doing JRemote and possibly House Band.  I was easily running this on my MAc Server but I've been having problems with it for a while (After Catalina 10.14).

I'll also want to stream to my OPPO UDP-205 via DLNA I believe.

I have an instance of jrivermc26 docker running and on the NAS I can get to a GUI but it doesn't find my Library and I haven't tried accessing from JRiver or externally since I had ports forwarded (House Band anyway) to my MAC.

Thanks for any help.
Title: Re: Docker Container for JRiver Media Center 26
Post by: HaWi on September 12, 2020, 11:20:15 am
I'm afraid I cannot help you with QNAP specific issues. However, I would assume that Docker itself functions the same on a QNAP and a Synology. If that is the case, you can bring up the container and then add/set up all the environment variables (user ids, shared folders etc. ) in Docker. I am very new at this but with Max's help I was able to get it running perfectly on my Synology Docker. If you take the information from Max's write up ( https://hub.docker.com/r/shiomax/jrivermc26 ) you should be able to get everything set up properly from within Docker.
Title: Re: Docker Container for JRiver Media Center 26
Post by: NH on February 25, 2021, 08:05:35 am
I use the Container Station wizard/UI as it provides all the required options and saves having to putty or SSH into the QNAP and run docker commands.

If you're able to connect internally it sounds like you're just about there, and the only thing left to do is sort networking.

I have my Container Network mode set to Bridge and use a static IP to set a unique address for the MC instance on my network. Once it is in this state, MC is behaving no differently to how it would on a physical host on your internal network. If you use DLNA quite a bit in your setup you might want to use DHCP instead, and reserve the address for MC to use. DLNA often works better that way but I find it makes no difference in my setup so leave it at static. Pretty simple, have attached a screenshot.

Only thing to remember is to also add a Mac Address as noted in this thread, I've scrubbed mine out in the screenshot.

Just remember as well to back your library up before making a change to a container setting, as it will most likely cause the image to generate a new container.



To access MC from outside your network you either need to configure port forwarding on your router, or possibly DDNS from within the QNAP.

I use port forwarding, and configure anything coming in on port 5800 to go to the IP Address I configured in my Container Station setup. Similarly for JRemote I configure port 52199.

Scobie

Many thanks for this lead. I tried this out. Here the address becomes in my case x.x.x.x:52199.

However I am not able to get into via VNC. Get a message "connection closed unexpectedly". Dont know if its a QNAP issue or a docker image issue. So for me whether I use host or NAT or bridge as network options, there is no difference.

I also read on a QNAP forum that you need to change the color settings in VNC, which also I tried.

I also read somewhere that you need to use the password jriver. I havent managed to get to that screen only.

Would you have any advice? Many thanks in advance.

Best

NH