[HOW TO] run LMS 8.x in a docker container

dolan.m
Starting out
Posts: 27
Joined: Fri Apr 17, 2009 9:49 pm

Re: [HOW TO] run LMS 7.9 in a docker container

Post by dolan.m »

Ok, I see. Now how do I reconfigure docker/docker-containerd to lower log level than "debug"? I mean in the special case of qnap container-station. Have been looking for it several hours now with no result...
When i run ps on qnap, I get a relevant process:

Code: Select all

container-station/docker-containerd -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --metrics-interval=0 --start-timeout 2m --state-dir /var/run/docker/libcontainerd/containerd --shim docker-containerd-shim --runtime docker-runc --debug
Seems like docker-containerd is executed with debug parameter. I didn't find where this command is parsed.
User avatar
oyvindo
Experience counts
Posts: 1399
Joined: Tue May 19, 2009 2:08 am
Location: Norway, Oslo

Re: [HOW TO] run LMS 7.9 in a docker container

Post by oyvindo »

dolan.m wrote:I'm very happy running my LMS in qnap docker container. Only one annoyance: absolutely every 3 seconds (!) docker writes to docker.log the same message
I see exactly the same phenomena in my setup, And I have always been curious as to what causes this to happen.
What I experience, is that if I stop the LMS container, then the "problem" is gone.
So my conclusion (false or not) has been that this is not a generic Docker thing, but closely linked to LMS.
ImageImageImage
dolan.m
Starting out
Posts: 27
Joined: Fri Apr 17, 2009 9:49 pm

Re: [HOW TO] run LMS 7.9 in a docker container

Post by dolan.m »

Well that's interesting. I only have LMS container running. Anyway, I don't mind LMS server/container doing whatever maintenance jobs, but don't need these be written in log. And this, to my understanding should be solved by lowering the logging lever, which is docker-wide. I'm by no means an expert on this, however.
User avatar
oyvindo
Experience counts
Posts: 1399
Joined: Tue May 19, 2009 2:08 am
Location: Norway, Oslo

Re: [HOW TO] run LMS 7.9 in a docker container

Post by oyvindo »

Well, expert or not - let us know if you find a solution :-)
ImageImageImage
dolan.m
Starting out
Posts: 27
Joined: Fri Apr 17, 2009 9:49 pm

Re: [HOW TO] run LMS 7.9 in a docker container

Post by dolan.m »

Ok, solution is here and is simple. My Container Station install directory is /share/CACHEDEV1_DATA/.qpkg/container-station, I'm referring to it below as [INSTALL_DIR].
1. Edit [INSTALL_DIR]/script/run-docker.sh. It's the core of the solution and is absolutely safe to comment out the line (with '#'):

Code: Select all

DOCKER_OPTS="$DOCKER_OPTS -D"
2. Edit [INSTALL_DIR]/etc/supervisord.conf. Again safely disable debug in section [program:qbus]. If you have there 'environment=QBUS_DEBUG=1', set it to

Code: Select all

environment=QBUS_DEBUG=0

3. Additionally you can optimize the save options in

Code: Select all

 [INSTALL_DIR]/etc/redis.conf 
according to comments inside the file. I'm not really sure how far you can get in this optimization. I tried to disable "save" whatsover and then Container Station doesn't write to disk unless really needed by the containers. This setting probably impacts the behaviour of the Container Station, I guess mainly it's web interface.

All of the mentioned parameters cause the app to periodically write to disk, even without any activity inside the containers. First part of the solution is a result of communication with Qnap helpdesk. Absolutely awful: in about 2 months of lifetime of my ticker they twice requested a remote access session just to tell me (upon second reminder) that Container Station simply doesn't support disk spindown by design. I begged them to advice how to simply avoid the bloody useless debug mode. Ok, here it is.
TreeBark
Starting out
Posts: 29
Joined: Mon Mar 10, 2014 2:36 am

Re: [HOW TO] run LMS 7.9 in a docker container

Post by TreeBark »

dolan.m wrote: Tue Dec 18, 2018 5:25 am Ok, solution is here and is simple. My Container Station install directory is /share/CACHEDEV1_DATA/.qpkg/container-station, I'm referring to it below as [INSTALL_DIR].
1. Edit [INSTALL_DIR]/script/run-docker.sh. It's the core of the solution and is absolutely safe to comment out the line (with '#'):

Code: Select all

DOCKER_OPTS="$DOCKER_OPTS -D"
2. Edit [INSTALL_DIR]/etc/supervisord.conf. Again safely disable debug in section [program:qbus]. If you have there 'environment=QBUS_DEBUG=1', set it to

Code: Select all

environment=QBUS_DEBUG=0

3. Additionally you can optimize the save options in

Code: Select all

 [INSTALL_DIR]/etc/redis.conf 
according to comments inside the file. I'm not really sure how far you can get in this optimization. I tried to disable "save" whatsover and then Container Station doesn't write to disk unless really needed by the containers. This setting probably impacts the behaviour of the Container Station, I guess mainly it's web interface.

All of the mentioned parameters cause the app to periodically write to disk, even without any activity inside the containers. First part of the solution is a result of communication with Qnap helpdesk. Absolutely awful: in about 2 months of lifetime of my ticker they twice requested a remote access session just to tell me (upon second reminder) that Container Station simply doesn't support disk spindown by design. I begged them to advice how to simply avoid the ** useless debug mode. Ok, here it is.
So was the QNAP helpdesk saying that you shouldn't make those edits?
dolan.m
Starting out
Posts: 27
Joined: Fri Apr 17, 2009 9:49 pm

Re: [HOW TO] run LMS 7.9 in a docker container

Post by dolan.m »

No, not at all. The first two edits are absolutely safe (well, not that I guarantee anyone anything :wink: ), they only disable unnecessary log writes.
I just wonder if these manual settings survive firmware and/or Container Station update. But no problem to replicate them anytime.
User avatar
oyvindo
Experience counts
Posts: 1399
Joined: Tue May 19, 2009 2:08 am
Location: Norway, Oslo

Re: [HOW TO] run LMS 7.9 in a docker container

Post by oyvindo »

dolan.m wrote: Tue Dec 18, 2018 10:56 pm No, not at all. The first two edits are absolutely safe.
I tried this (the two first) but it had absolutely no effect at all on my system. Docker still chit-chat's with disk every three seconds.
ImageImageImage
User avatar
Don
Guru
Posts: 12289
Joined: Thu Jan 03, 2008 4:56 am
Location: Long Island, New York

Re: [HOW TO] run LMS 7.9 in a docker container

Post by Don »

In case you didn’t know there is an LMS QPKG in the QNAP Club store that is actively maintained. No docker needed. There is also an active topic on it in the forum.
Use the forum search feature before posting.

Use RAID and external backups. RAID will protect you from disk failure, keep your system running, and data accessible while the disk is replaced, and the RAID rebuilt. Backups will allow you to recover data that is lost or corrupted, or from system failure. One does not replace the other.

NAS: TVS-882BR | F/W: 5.0.1.2346 | 40GB | 2 x 1TB M.2 SATA RAID 1 (System/VMs) | 3 x 1TB M.2 NMVe QM2-4P-384A RAID 5 (cache) | 5 x 14TB Exos HDD RAID 6 (Data) | 1 x Blu-ray
NAS: TVS-h674 | F/W: 5.0.1.2376 | 16GB | 3 x 18TB RAID 5
Apps: DNSMasq, PLEX, iDrive, QVPN, QLMS, MP3fs, HBS3, Entware, DLstation, VS, +
TreeBark
Starting out
Posts: 29
Joined: Mon Mar 10, 2014 2:36 am

Re: [HOW TO] run LMS 7.9 in a docker container

Post by TreeBark »

Don wrote: Wed Dec 19, 2018 12:03 am In case you didn’t know there is an LMS QPKG in the QNAP Club store that is actively maintained. No docker needed. There is also an active topic on it in the forum.
Is this the thread you're referring to? viewtopic.php?f=123&t=139286
And does that installed QPKG avoid the constant disk chatting?

It seems to be a more involved installation process than just running LMS in Docker, but if it cuts the chatter, it might be worth doing.
User avatar
oyvindo
Experience counts
Posts: 1399
Joined: Tue May 19, 2009 2:08 am
Location: Norway, Oslo

Re: [HOW TO] run LMS 7.9 in a docker container

Post by oyvindo »

Please don't hijack this thread into yet another discussion about docker or not docker. This thread deals exclusively with how to run LMS in Docker!
ImageImageImage
DIMM777
First post
Posts: 1
Joined: Mon Dec 24, 2018 10:15 pm

Re: [HOW TO] run LMS 7.9 in a docker container

Post by DIMM777 »

oyvindo wrote: Thu Jun 23, 2016 4:01 am Here is my cookbook on how to install and run Logitech Media Server 7.9 in a docker container under Container Station.
This works well for me, and I hope it will for you too...



I am successfully running not only LMS in a container, but also Plex and Madsonic, all using the same Music library. For obvious reasons, it doesn't make much sense to run Kodi (XBMC) in a container as Kodi is not a server, and the main purpose of Kodi is to shine on you living room TV. I haven't found a way to make the HDMI i/f available to a container. I guess that's why QNAP released Linux Station and HD Station (?) :lol:
[/code]
[Edit] Since I wrote this guide, I have decided to replace the container image I first used, with another - in my opinion - better image, that - among other things - support automatic update to new versions of LMS by simply restarting the container. This image is called: justifiably/logitechmediaserver. You will find it if you search for the word "justifiably" under Create Container
[Edit1] I just updated to QTS 4.3.3 and CS was automatically updated to 1.7.2320 and everything works just fine on first reboot.
[Edit2] Added recommendation to assign a share folder location in CS Advanced Setting to /state, in order to prevent access privilege errors which I've had some reports of.
Hi Oyvindo!

I need your help. I want install LMS to QNAP TS-119 (QTS 4.3.3 ). What do you thinking about it? Will the CPU power of QNAP TS-119P be enough?

Thank you.
docterry
Starting out
Posts: 44
Joined: Mon Jan 14, 2008 12:46 am
Location: Seattle, WA
Contact:

Re: [HOW TO] run LMS 7.9 in a docker container

Post by docterry »

Quite easy to install/test/play with LMS installs following Oyvindo's instructions.

However, I have not been able to get AirPlay (or ShairTunes2) to work with any of the Docker installations. I have no problem connecting when I use a QPKG based LMS. Has anyone else noticed this behavior?

The other thing that I have found is that I cannot get Google Play Music to work, even when I use the apnar/Logitech-Media-Server container, which supposedly has all of the dependencies preinstalled. Has anyone ever successfully gotten this to work on QNAP?

Thanks!
TS-119 / fw 4.3.3 / Samsung Spinpoint F3 HD103SJ 1Tb
TS-253 Pro / fw 4.3.3 / WD Red 3 TB x 2
dolan.m
Starting out
Posts: 27
Joined: Fri Apr 17, 2009 9:49 pm

Re: [HOW TO] run LMS 7.9 in a docker container

Post by dolan.m »

oyvindo wrote: Tue Dec 18, 2018 11:59 pm
dolan.m wrote: Tue Dec 18, 2018 10:56 pm No, not at all. The first two edits are absolutely safe.
I tried this (the two first) but it had absolutely no effect at all on my system. Docker still chit-chat's with disk every three seconds.
Ok, seems the third one is also needed. I'm having no problem with redis shortest save period set to several hours. But I only use container station for LMS and use it very lightly. In my opinion the redis database is used only for correct display of container data in QTS.
skinda0
Starting out
Posts: 11
Joined: Thu Dec 03, 2020 6:30 pm

Re: [HOW TO] run LMS 7.9 in a docker container

Post by skinda0 »

oyvindo wrote: Thu Dec 08, 2016 4:04 am Congratulations! :-)
Now, the next thing you should do is to buy a Google Chromecast Audio and install the Chromebridge LMS plug-in and enjoy the high quality DAC of the Chromecast, fed right into your high end Hi-Fi amplifier :-)
Hi all,

I have recently moved over to a QNAP NAS from Synology where I had a LMS server setup and the chromecast plugin working. Since I have transferred over, I can not for the life of me get the plugin to generate the XML file!

I have installed a container with V8.0.0 of LMS. The LMS server is running perfectly and can see all of my files. I am thinking there may be some permissions issue? I have a copy of the old XML file that I can place in the correct location if I need to, but I can't find that either!

Any help would be greatly appreciated!
Post Reply

Return to “Container Station”