[HOW TO] run LMS 7.9 in a docker container

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

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

Post by dolan.m » Thu Oct 18, 2018 5:14 am

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: 1146
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 » Thu Oct 18, 2018 1:30 pm

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

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

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

Post by dolan.m » Thu Oct 18, 2018 11:29 pm

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: 1146
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 » Fri Oct 19, 2018 1:06 am

Well, expert or not - let us know if you find a solution :-)
ImageImageImageImage

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

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

Post by dolan.m » 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.

TreeBark
Starting out
Posts: 23
Joined: Mon Mar 10, 2014 2:36 am

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

Post by TreeBark » Tue Dec 18, 2018 5:53 am

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: 26
Joined: Fri Apr 17, 2009 9:49 pm

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

Post by dolan.m » Tue Dec 18, 2018 10:56 pm

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: 1146
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 » 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.
ImageImageImageImage

User avatar
Don
Guru
Posts: 12007
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 » 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.
Read the Online Manuals and use the forum search feature before posting.

It is a recommended to use RAID and have 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.

Submit bugs and feature requests to QNAP via their Helpdesk app.

NAS: TVS-882BR | F/W: 4.3.6.0895 | 40GB | 2 x M.2 SATA RAID 1 (System/VMs) | 4 x M.2 NMVe QM2-4P-384A RAID 5 (Cache) | 5 x 4TB HDD RAID 6 (Data) | 1 x Blu-ray
NAS: TVS-663 | F/W: 4.4.2.1320 | 16GB | 2 x M.2 NMVe QM2-2P RAID 1 (Cache) | 4 x 4TB RAID 5
Apps: Boinc, Squid, DNSMasq, PLEX, iDrive, QVPN, QLMS, MP3fs, HBS, Entware, DLstation, +others

TreeBark
Starting out
Posts: 23
Joined: Mon Mar 10, 2014 2:36 am

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

Post by TreeBark » Wed Dec 19, 2018 12:29 am

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: 1146
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 » Wed Dec 19, 2018 2:41 am

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!
ImageImageImageImage

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 » Mon Dec 24, 2018 10:22 pm

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: 43
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 » Sat Dec 29, 2018 10:15 am

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: 26
Joined: Fri Apr 17, 2009 9:49 pm

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

Post by dolan.m » Fri Jan 04, 2019 1:00 am

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.

Post Reply

Return to “Container Station”