Spotty-Plugin icon indicating copy to clipboard operation
Spotty-Plugin copied to clipboard

Not working under "lmscommunity/logitechmediaserver" docker container

Open Intenos opened this issue 1 year ago • 11 comments

I installed LMS by the docker Container "lmscommunity/logitechmediaserver" and activated the Spotty plugin.

Unfortunately, I get following error message:

Spotty Spotify für Squeezebox Beim Ausführen der Spotty Helfer-Anwendung ist ein Fehler aufgetreten. Vermutlich wird diese auf ihrem System nicht unterstützt. Bitte wenden Sie sich an mich, unter Angabe der folgenden Plattform-Informationen:

Betriebssystem: Debian (Docker) / x86_64-linux

Ordner für Hilfsprogramme:
/lms/Bin/x86_64-linux
/lms/Bin
/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin
/sbin
/bin
/usr/libexec
/config/cache/InstalledPlugins/Plugins/Spotty/Bin/i386-linux
/config/cache/InstalledPlugins/Plugins/Spotty/Bin
ldd (Debian GLIBC 2.31-13+deb11u10) 2.31

In the Container log I have following entries:

Starting Logitech Media Server on port 9000...
Using additional arguments: --advertiseaddr=192.168.178.25
[24-09-09 21:00:56.8243] main::init (386) Starting Logitech Media Server (v8.5.2, 1716215514, Sun May 26 17:49:55 CEST 2024) perl 5.032001 - x86_64-linux-gnu-thread-multi
[24-09-09 21:00:57.8977] Plugins::Spotty::Connect::canSpotifyConnect (86) Cannot support Spotty Connect, need at least helper version 0.12.0

The rest of LMS as well as other plugins like Youtube are working properly.

Does anybody else use it succesfully or is it a known or reproducable problem?

Any hints for resolving it would be very welcome.

Intenos avatar Sep 09 '24 19:09 Intenos

Working fine here. Assuming you have mapped the config folder to the outside of the container, what is the underlying OS? Could there be a permissions problem?

If you open a shell in the container and run the following, what would you get?

# /config/cache/InstalledPlugins/Plugins/Spotty/Bin/i386-linux/spotty -x
ok spotty v1.3.0 - using librespot 0.4.1 c5b689f (Built on 2022-06-04, Build ID: 3mvdughq, Profile: release)
{"autoplay":true,"debug":false,"lms-auth":true,"ogg-direct":true,"podcasts":true,"save-token":true,"version":"1.3.0","volume-normalisation":true,"zeroconf-port":true}

or:

# /config/cache/InstalledPlugins/Plugins/Spotty/Bin/i386-linux/spotty-x86_64 -x
ok spotty v1.3.0 - using librespot 0.4.1 c5b689f (Built on 2022-06-04, Build ID: NGB9GMS0, Profile: release)
{"autoplay":true,"debug":false,"lms-auth":true,"ogg-direct":true,"podcasts":true,"save-token":true,"version":"1.3.0","volume-normalisation":true,"zeroconf-port":true}

michaelherger avatar Sep 10 '24 04:09 michaelherger

Thank a lot for your support. I mapped the config folder outside the container. My underlying operating system is Openmediavault 6 based on Shaitan with the Linux kernel 5.10.0-28-amd64.

When I run the command you provided in the docker cli, I get the info that the permission is denied. So there seems actually to be a permission issue.

root@8e32336fc4de:/config/cache/InstalledPlugins/Plugins/Spotty/Bin/i386-linux# /config/cache/InstalledPlugins/Plugins/Spotty/Bin/i386-linux/spotty-x86_64 -x
bash: /config/cache/InstalledPlugins/Plugins/Spotty/Bin/i386-linux/spotty-x86_64: Permission denied

root@8e32336fc4de:/config/cache/InstalledPlugins/Plugins/Spotty/Bin/i386-linux# ls -l spotty
-rwxr-xr-x+ 1 squeezeboxserver users 4162872 Sep 5 16:52 spotty

However, I played around with it already beforehand, and wasn´t able to solve the issue. It also seems to me that the permissions are automatically adapted in the config folder when creating the LMS container. At least I saw some chown commands in the container log when adapting the user for running the container.

Intenos avatar Sep 10 '24 08:09 Intenos

I dare to say that it's a configuration problem between OMV and your container. I know that Spotty does work in Docker, as I often get questions about the required host mode (I hope you've seen that hint 😉). And the permissions in the container seem to be correct. But maybe OMV prevents it from executing the binary?

michaelherger avatar Sep 10 '24 09:09 michaelherger

I used bridge as mode with the advertiseaddr variable. But when using host mode, it works neither.

For deploying the container, I use Portainer. Any experience with that?

Intenos avatar Sep 10 '24 10:09 Intenos

I'm sorry, no. I'm only using Docker either manually (development) or on my Synology NAS using its "Container Manager". You might have more success finding help by joining the community on https://forums.slimdevices.com. I'm confident there are other OMV users.

michaelherger avatar Sep 10 '24 14:09 michaelherger

When I run the command "//spotty -x" on the main system, not in the docker cli, I also get the permission denied error. Even when adding the execute permission to the file or adding all permissions by chown 777. Is that normal?

Intenos avatar Sep 10 '24 21:09 Intenos

Is it somehow possible to try different versions from the spotty-plugin?

The following issue sounds to be comparable to my problem and I wonder whether it is caused by system related changes or may an update of the plugin itself which may also be carried out automatically when auto-updates are enabled in LMS.

[https://github.com/michaelherger/Spotty-Plugin/issues/133]

Intenos avatar Sep 10 '24 21:09 Intenos

Please see my previous suggestion.

michaelherger avatar Sep 11 '24 04:09 michaelherger

Dear @michaelherger ,

As recommended, I discussed it also in the slimdevices forum: https://forums.slimdevices.com/forum/user-forums/logitech-media-server/1725128-spotty-plugin-not-working-lms-in-docker-container-portainer-omv6

Just now I found the solution how to get it running.

The following I posted also at the other forum:

First I bound the /config folder to a completey new folder on my data drive, without creating it before as a shared folder and applying any access right definitions or things like SMB shares with OMV before. Also with that, it didn´t work.

As a next step I bound the /config folder to a new folder on my root drive on which the operating system is installed. In general I split my main SSD drive into 2 files systems to have on one the operating system and on the other all the data. I haven´t had problems with any software yet when linking to this "data" drive. Independent whether it is running natively or via docker. However, in this case it makes a difference and Spotty is running now.

​​​​​​​Thanks to all for providing tips and support!

I like to thank also you, for your quick and valueable support!

Do you think something can be changed to allow Spotty also to run when storing it on another file sytem than the one of the operating system? One of the background having it separates is, that on the root drive I can´t create shared folders. And without a shared folders I can´t configure rsync for backup purposes.

Intenos avatar Sep 13 '24 07:09 Intenos

This is beyond Spotty's responsibilities. If the underlying system doesn't allow it to execute a binary, then there's nothing the plugin can do.

michaelherger avatar Sep 13 '24 08:09 michaelherger

I also hit the same problem with docker installation in OMV. As I found out, OMV has been mounting filesystems with the noexec option for a while, and that is the reason for the plugin to fail. I followed the example provided here and was able to make it work.

jhoms avatar Jan 06 '25 21:01 jhoms

With the recent changes Spotify applied to their infrastructure I'll have to re-implement Connect mode from scratch. I therefore decided to remove that feature from the current release. Let's collect new reports once I have found a way to re-implement Connect.

Thanks for your understanding.

michaelherger avatar Aug 13 '25 20:08 michaelherger