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

Post Reply
browellm
Know my way around
Posts: 120
Joined: Wed Apr 08, 2015 11:42 pm

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

Post by browellm »

I use your instructions too, thanks very much for publishing them.

I do get this repeated error in from Slimserver in the console every 1 minute:
Slim::Networking::Discovery::Players::_players_error (146) Unable to get players: 404 Not Found

There doesn't seem to be a lot of information from Google. I use a couple of players (a Boom and an SBR) and neither seems to have any problems, but does anyone have any insight into what the error really means and how I can fix it?
TS-451
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 »

First of all, your most welcome :-)
I have seen that message too, but I just ignored it and one day it disappeared. Have you tried to upgrade to the latest version of LMS (A new update was released today)?
ImageImageImage
browellm
Know my way around
Posts: 120
Joined: Wed Apr 08, 2015 11:42 pm

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

Post by browellm »

Edit: was able to updgrade now, but still seeing the same error in the console. Maybe it's something to do with the network settings I have applied for the container.
TS-451
jgarini
First post
Posts: 1
Joined: Wed Aug 12, 2015 8:33 am

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

Post by jgarini »

Only host or bridged networking mode will allow the LMS to discover players. The default network config (NAT) won't work.
kmrodgers
New here
Posts: 5
Joined: Sun May 22, 2016 4:56 am

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

Post by kmrodgers »

I'm trying this on a QNAP TS-251+ (8 GB RAM) running 4.2.3 build 20170213, and it's not working. I keep getting errors like this:

17-02-26 00:35:42.0356] Slim::Utils::Prefs::Namespace::savenow (338) Error: can't save /mnt/state/prefs/plugin/remotelibrary.prefs: Permission denied at /usr/share/perl5/Slim/Utils/Prefs/Namespace.pm line 327.

and

Slim::Plugin::InternetRadio::Plugin::_initRadio failed:
[17-02-26 00:36:24.0044] Slim::Utils::Update::checkVersionError (184) There was an error while checking for updates to Logitech Media Server:
Couldn't resolve IP address for: www.mysqueezebox.com

I followed the instructions as closely as possible...any ideas?
kmrodgers
New here
Posts: 5
Joined: Sun May 22, 2016 4:56 am

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

Post by kmrodgers »

Following up on my post, part of the problem seems to be that my shared folders aren't getting mounted. I created a new share /Music, and specified /Music as the new volume, new mount point, and picked it off the selector box for the "from host" location. But it doesn't seem to be available once the container is running.
kmrodgers
New here
Posts: 5
Joined: Sun May 22, 2016 4:56 am

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

Post by kmrodgers »

Another follow-up to the saga: I keep searching around these forums, and ran across two tips: one, make sure that the music folder isn't owned by admin; two, turn off advanced folder permissions. I did both and voila! it mostly works now! The main issue left, which I'm not sure if it's an issue or not, is these errors:

[17-02-26 05:36:42.3375] Slim::Utils::Prefs::Namespace::savenow (338) Error: can't save /mnt/state/prefs/plugin/fulltext.prefs: Permission denied at /usr/share/perl5/Slim/Utils/Prefs/Namespace.pm line 327.
[17-02-26 05:36:52.2374] Slim::Utils::Prefs::Namespace::savenow (338) Error: can't save /mnt/state/prefs/plugin/fulltext.prefs: Permission denied at /usr/share/perl5/Slim/Utils/Prefs/Namespace.pm line 327.
[17-02-26 05:37:03.0015] Slim::Utils::Prefs::Namespace::savenow (338) Error: can't save /mnt/state/prefs/plugin/fulltext.prefs: Permission denied at /usr/share/perl5/Slim/Utils/Prefs/Namespace.pm line 327.
[17-02-26 05:40:14.0032] Slim::Utils::Prefs::Namespace::savenow (338) Error: can't save /mnt/state/prefs/plugin/fulltext.prefs: Permission denied at /usr/share/perl5/Slim/Utils/Prefs/Namespace.pm line 327.

and so forth. Any thoughts?
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 »

I'm sorry - I have no idea why you're getting these errors.
The only advice I have, is that you ask in the slimdevice forum.
ImageImageImage
keg415
Starting out
Posts: 33
Joined: Sat Jun 25, 2016 2:18 am

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

Post by keg415 »

kmrodgers wrote:Another follow-up to the saga: I keep searching around these forums, and ran across two tips: one, make sure that the music folder isn't owned by admin; two, turn off advanced folder permissions. I did both and voila! it mostly works now! The main issue left, which I'm not sure if it's an issue or not, is these errors:

[17-02-26 05:36:42.3375] Slim::Utils::Prefs::Namespace::savenow (338) Error: can't save /mnt/state/prefs/plugin/fulltext.prefs: Permission denied at /usr/share/perl5/Slim/Utils/Prefs/Namespace.pm line 327.
[17-02-26 05:36:52.2374] Slim::Utils::Prefs::Namespace::savenow (338) Error: can't save /mnt/state/prefs/plugin/fulltext.prefs: Permission denied at /usr/share/perl5/Slim/Utils/Prefs/Namespace.pm line 327.
[17-02-26 05:37:03.0015] Slim::Utils::Prefs::Namespace::savenow (338) Error: can't save /mnt/state/prefs/plugin/fulltext.prefs: Permission denied at /usr/share/perl5/Slim/Utils/Prefs/Namespace.pm line 327.
[17-02-26 05:40:14.0032] Slim::Utils::Prefs::Namespace::savenow (338) Error: can't save /mnt/state/prefs/plugin/fulltext.prefs: Permission denied at /usr/share/perl5/Slim/Utils/Prefs/Namespace.pm line 327.

and so forth. Any thoughts?
Try removing the ACLs from the host share that is mounted on /mnt/state, e.g. if Advanced Settings >> Shared Folders shows:

Code: Select all

/share/CACHEDEV1_DATA/Container/container-station-data/lib/docker/volumes/...
then ssh into the NAS and run the command:

Code: Select all

setfacl -Rb /share/CACHEDEV1_DATA/Container
That got LMS running for me, but now the problem is that my /share/Multimedia/Music folder is not mounted in the container, maybe because that folder is owned by admin and I have advanced folder permissions enabled, as you've noted. I suspect that Container Station isn't compatible with advanced folder permissions, and I'm not willing to disable them.
kmrodgers
New here
Posts: 5
Joined: Sun May 22, 2016 4:56 am

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

Post by kmrodgers »

I'm close to having everything working as I want. As I mentioned, I solved most of the problems by getting rid of advanced folder permissions; I seem to have solved the preference permissions saving problem by updating the permissions on the folder the container is in so that other than admin can write to it. I'm not sure if I'm going to continue with this or go through installing LMS directly or switch over to LMS using LinuxStation; we'll see. But it's mostly doing what I want now.

There is still one fly in the ointment: in the LMS prefs, whenever I enter my my squeezebox.com username and password, it tells me "Invalid my squeezebox.com username or password". I'm certain that it is actually a good username and password, because I can log into it just fine through my normal web browser. Any ideas on this?
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 »

Could you explain briefly why you need to "mess" with folder permission in the first place?
What gain are you seeking by doing whatever it is you are doing with folder permission?

Secondly, keep in mind that squeezebox.com is a free service run by Logitech. It doesn't get much attention from them (in fact, some users fail to even understand why Logitech bothers to keep it alive), and it is inherently unstable. So what you are experiencing could be just temporarily. As I have hardly used squeezebox myself (It never struck me as very useful for any purpose), I'd be interesting to hear what value you see in it (or expect from it)?
ImageImageImage
othpolein
First post
Posts: 1
Joined: Fri Jan 27, 2017 4:52 am

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

Post by othpolein »

This post helped me get LMS up and running on my QNAP and was a big help. I used the larsks/logitech-media-server docker image.

On thing that ran into that I wanted to share in case anyone else has trouble was an issue with the Triode Spotify plugin. The plugin appeared to be working fine in that I could browse playlists, etc, but whenever I tried to play anything it wouldn't work: I'd get no audio and after about 15-20 seconds playback would advance to the next track. There was nothing in the spotifyd logs that indicated why this was happening. After digging around today I finally found that the issue was due to my choosing to set up the network in NAT mode instead of Host mode as recommended by the OP (while configuring initially I'd changed the host ports to match the container ports and that all worked fine for playing local music). It seems that the plugin starts listening on port 9005 (by default, it's configurable in the plugin settings) and that the players need to connect to this port to stream the music. Since I hadn't forwarded this port, the player wasn't able to connect.

So I recreated the container and forwarded the port; but this was also not enough. The spotify plugin directs the players to connect to it at the ip address of the LMS, but since the container is running in a NAT the address it gets is the internal NAT address and not the address of the NAS that the players actually need to connect to. When I realized what the issue was I just recreated the container with the network in host mode - there's nothing running in it other than the LMS/plugins anyway - and spotify playback started working. Another option apparently is to modify a couple of the spotify plugins perl files and hard code your external ip (https://forums.lime-technology.com/topi ... ent=417446) but that seemed like a maintenance nightmare to me so I did not pursue that path.

I hope this saves someone a few hours of pain and suffering.
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 »

Hi @othpolein,
Thanks for sharing your findings. I have never used Spotify myself (I do not have an account). Using HOST-mode is on the top of my recommended settings for an LMS image.
You should - BTW - consider changing to the Justifiable image of LMS (see the first post in this thread). Also, as you may be aware of, Michael just released the first stable version of LMS 7.9.0
Check out his support thread at: http://forums.slimdevices.com/forumdisp ... dia-Server

Happy listning :-)
ImageImageImage
User avatar
dedda
First post
Posts: 1
Joined: Tue Jul 07, 2015 8:32 pm

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

Post by dedda »

Great thx - Funzt
Well done !
NAS:
QNAP TS-251 8GB
2x3TB RAID1
QTS 4.2.4
crystalgipsy
Starting out
Posts: 20
Joined: Sun Dec 06, 2015 6:48 am

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

Post by crystalgipsy »

On the latest 4.3.3 build on my TS-453 pro and trying to get LMS up and running but failing miserably. I have followed the instructions but not one of the many dockers work. I seem to get different errors for each one all of which I have little understanding of whats wrong. I want to have external squeezeboxes connect, so can anybody recommend a docker image thats working for you and what you had to do to get it too work using hosts or bridge network mode.
Post Reply

Return to “Container Station”