Docker images for Roon [Please Note: Using Dockers and VMs isn't supported by Roon]

The docker container is not the problem, neither your CPU. Depending on how many VMs and docker apps you are running, 16GB of RAM maybe insufficient. You will need to isolate the problem. Disable all VMs and other containers. Once you do that, try to use Roon and see if you still have the same problem.
Sometimes docker apps misbehave when docker size reaches allocated capacity. I have seen also problems with apps after upgrades. It is mostly due to developer’s errors. It happens. You may want too also run plugin Fix Common Errors. That kind of skipping is most likely due to container competing for resources. The last step would be to delete container and RoonServer image and start from scratch. You could leave all the settings in appdata folder. If there is no improvement, delete that to and do clean install.
I was getting update notification within Roon app on iPhone. I did that and it wiped out my database, so did not do update in unRaid. As I said before, I do not have any problems with this Docker and I have 6 containers and 2 VMs running

unraid

Thanks ! This is the only docker and there’s no VM running.
This is now a new install, I tried several new installs in fact. Fix common Errors is green and doesn’t return any error. I agree with you that it’s is competing for resources somewhere and it’s not happening all the time. I have been playing an album for 20 min and it skipped only once. I think I did push the update on my iPad and not the unread server and that was a mistake. But I thought that a clean install would fix it. Clearly many people are running this way without problem, so it has to be something on my side.

Can you describe what exactly happens when it is skipping. It goes to the next song?
What version of unRaid are your running?

Unraid 6.8.3
And I talked too soon. It has started skipping again. Yes most of the time it goes to the next song. “An audio file is loading slowly…”

How do you play this file? Using app? Web browser? Streaming to device?
Your server is powerful enough to play multiple video and audio files at the same time. I don’t think Roon docker is the culprit. You could try to delete main Docker image in settings. Restart server. I noticed that initaly your appdata and docker.img file were located in /mnt/user directory.
Both appdata and docker.img should be located on separate SSD cache drive.
Also you separated /app and /data into two different directories. Let RoonServer manage it, so both /app and /data should point to the same location

/mnt/cache/appdata/roonserver/

unraid3

Ah, I’m now very confused as I got different advice regarding the configuration This is currently how it is set. The library is on the Unraid and the Roon server is in the docker. It distributes to a Mac mini with the Stereo connected via USB to DAC. I control using Roon on iPad.
I only have one SSD drive used as cache. So when I add music to the array it writes on the cache before writing on the array every night. Are you suggesting that I add another SSD drive?

Maybe I don’t understand unraid, but on “normal” docker instances don’t do this. My interpretation is that the container will see two different folders /app and /data while physically there is only one. This will almost certainly cause problems on core updates as reported in my GitHub page for this docker image.

So the advice to separate these two folders on the host came from me.

On the playback issues: no clue what the problem can be other than the earlier suggested fast ssd for the database. If I interpret your setup correctly you already did that.

My docker runs on a dual Xeon 5420 @ 2.4Ghz with 24Gb Ram. It runs on Ubuntu server 18.04 LTS on ZFS Pools. Docker, app and database on mirroring pool of 2 Samsung SSD’s, local music on mirroring pool of 8 HDD’s of different brands. Besides Roon server it runs Plex, nextcloud, syncthing, minio, nexus and a reversed proxy for terminating SSL.

I have almost no playback issues. Sometimes they are there but mostly in a specific short time window which can be tracked back to heavy network (internet) usage or problems at the streaming service I use for Roon (Qobuz).

Steef

1 Like

That’s Nucleus+ / mobile i7 territory, and explains the ram usage :wink:

We don’t judge :stuck_out_tongue:

Making sure the docker.img and appdata are on your cache drive is the same advice you’d gotten before :wink:

I understand your concerns about paths, but we really do not know internal workings of this application. These paths are only a gateway to outside environment

As you see from this picture, there are no separate /app & /data folders
And there are no hidden folders either

unraid5

I have some experience building docker files. Mapping and mounting is little bit tricky and we do not really know how it is referenced within app

This screenshot shows folders inside docker

unraid6

There is data folder, but from other picture you san see that there is no requirement for data folder outside of docker app

Leave your music files on unRaid’s array. You do not need to move these files.

Move main docker image to your existing SSD. Create folder to store file.
Go to settings/docker

Since you have only 2 containers running, the docker image can be small 20Gb or less.

You have to remember that unRaid array is being protected all the time and data is written to Parity drive. You may want to initially disable mover script that copies files from cache drive to your array.

On more thing. Sometimes content of some folders may exist in two different locations: cache & array. You need to ensure that whatever exist in appdata is not copied to array. Use Krusader to see if you have folder named appdata under /mnt/user/appdata. It should be only /mnt/cache/appdata

The /app folder inside the container contains one folder: RoonServer.

# docker exec roon.service ls -l /app
total 2
drwxrwxrwx 5 1000 1000 8 Oct 20 18:00 RoonServer

The /data folder inside the container contains three folders including RoonServer.

# docker exec roon.service ls -l /data
total 3
drwxr-xr-x 5 root root 5 Jun 18 09:53 RAATServer
drwxr-xr-x 3 root root 3 Oct 18  2017 RoonGoer
drwxr-xr-x 7 root root 7 Oct 20 18:00 RoonServer

See the potential problem here? On your host those two RoonServer subfolders have their contents mixed up.

Steef

1 Like

Yes and that is strange. It looks like whatever supposed to reside in RoonServer folder is split between two locations. The application (RoonCore) not container, has to resolve RoonServer path into two different locations. This is bad practice from developer point of view

Ok Thanks !
So I need to change this…
But if I disable the mover script, what happens when I add up new files to my library? I should get them to write directly onto the array, bypassing the cache?

You may try with and without mover and see if it makes any difference. I do not use mover script. Instead I use Krusader to do the job. You can mount any PC or share from your LAN using Unassigned Devices plugin. The reason I disabled mover is that some files stayed on cache drive and other were copied. If I want to move more files I fire up Krusader and copy files directly to protected shares.

Yep, well, unless you’re one of those people who absolutely cannot live with the uncached write speeds, that is.

No there are two totally separate RoonServer folders.

The /app one contains the app which is downloaded on first run by the container. It’s contents is managed by the container startup script on first run and by the core updater after that.

The data one is created and managed by the Roon core and contains the Roon database and other files needed by the core.

There are two different folder exports for a reason. Do not maps those two on one and the same host folder.

@PeterL your knowledge of unraid surpasses mine, so can we work on enhancing the documentation and/or the startup script of my image so it causes less problems on unraid under normal operation and especially on core updates?

Steef

https://github.com/steefdebruijn/docker-roonserver/issues/8

I think you did fantastic job with this docker and I appreciate all your work.

When I installed Roon core I was bit confused about two different mappings /app and /data. I figured that it will be Roon core that will manage this location after all. Hence, I put the same folder for both. From my experience, Roon core works great. I have no issues at all. Except for upgrading, which seems to be common problem for most users.

I have experience with programming in dotnet core. I’m working on some app that I dockerized. Development is still in progress. Volumes and mappings are tricky. I looked at your github and I see that you are using Linux version of Roon. I will be happy to help you.

2 Likes

I would like to add a solution where the Roon core is running in several different IP networks.

Problem

I’m running @Steef_de_Bruijn docker image (many thanks for this contribution) and have several networks (devices like Roon bridge, IOT, guests, kids and so on) running at home. But how to allow the Roon core to be remote controlled by devices located in users network but stream music to amplifier or Roon Bridges located in the IOT network.

Solution

  • Make use of a docker-compose file configuring the network components the Roon core

  • That would give a Roon core multiple network interfaces,

  • the traffic from that leafs the PC/server is being tagged by Docker according to the configuration below and leaf the computer running the Roon core using a single Ethernet interface

  • A managed switch could then be used to separate the traffic into all the different IP sub networks.

    roon:
      image: steefdebruijn/docker-roonserver:latest
      init: true
      container_name: "roon"
      hostname: roon
      domainname: your.domain.com
      restart: unless-stopped
      environment:
        TZ: "Europe/Stockholm"
      volumes:
        - roon-app:/app
        - roon-db:/data
        - /mnt/media/music:/music:ro
        - roon-backups:/backup
      networks:
        macvlan201:
          ipv4_address: 10.60.XX1.10
        macvlan202:
          ipv4_address: 10.60.XX2.10
        macvlan200:
          ipv4_address: 10.60.XX0.10
    
    volumes:
      roon-db:
        name: roon-db
      roon-app:
        name: roon-app
      roon-backups:
        name: roon-backups
    
    networks:
      macvlanXX1:
        name: vlanXX1
        driver: macvlan
        driver_opts:
          parent: your-interface-name.XX1
        ipam:
          config:
            - subnet: 10.60.XX1.0/24
              gateway: 10.60.XX1.1
      macvlanXX2:
        name: vlanXX2
        driver: macvlan
        driver_opts:
          parent: your-interface-name.XX2
        ipam:
          config:
            - subnet: 10.60.XX2.0/24
              gateway: 10.60.XX2.1
      macvlanXX0:
        name: vlanXX0
        driver: macvlan
        driver_opts:
          parent: your-interface-name.XX0
        ipam:
          config:
            - subnet: 10.60.XX0.0/24
              gateway: 10.60.XX0.1
1 Like

There might be something there as I continue to have the problem and I certainly have plenty of activity on the network at this time. How do you implement that? In simple terms :wink:

I think I have the server properly set now.