Giter VIP home page Giter VIP logo

slimserver-platforms's People

Contributors

awy avatar darrell-k avatar devdems avatar dnanian avatar franck-berry avatar gtallan avatar johansaaw avatar logitech-replication avatar markmiksis avatar mavit avatar mherger avatar michaelherger avatar mw9 avatar nixusminimax avatar pallfreeman avatar rlmoser avatar robho avatar tomscytale avatar triode avatar vergoh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

slimserver-platforms's Issues

Players lost after container restart

I'm running LMS in a docker container on a synology NAS.
There are a couple of players (BOOM) connected to LMS, and all is working well - until I restart the container:

After the restart, no players are known on LMS (when using the web UI).
When I start the players they have to go through initial setup - long press ON to restart the player which will then go through setup (getting IP address, searching for the server, etc).

Is this expected behavior, or does this point to a configuration error ?
If the latter, is there a recommended way to prevent losing the "connected players"?

Docker - slow startup on systems with spinning disks results in stuck deployment on Kubernetes chart

I run the LMS with the Kubernetes chart form Truecharts on my Truenas SCALE NAS with two spinning disks.

The chown command in the start-container.sh script takes around 10 minutes to complete. In particular, it is the /lms folder that takes that long.

This results in a "stuck deployment" in the above mentioned chart, because the chown command takes longer than the configured startupProbe settings:
Startup: tcp-socket :9000 delay=10s timeout=2s period=5s #success=1 #failure=60

Could this be solved by moving the chown also to the Dockerfile, like done with the /config and /playlist folders?
RUN mkdir -p /config /music /playlist /lms && chown -R squeezeboxserver:nogroup /config /playlist
the /lms folder is copied after that statement.

Is it then still necessary to run the chown inside the startup script?

Another solution would be to make the startupProbe configurable in the Truecharts chart, but that is only necessary if the command above could not be made faster.

Thanks for the work that is still put into the LMS!

Startup errors of LMS get obscured by squeezeboxserver_safe script

The squeezeboxserver_safe script starts up the actual server with ">/dev/null 2>&1" redirects.
I understand that this may be meaningful under normal conditions, because otherwise log output of the actual server would be logged twice.
On the other hand, when LMS cannot start (let's say because of Perl module dependency errors - as I recently had), no error will be logged at all!
I see several such error reports in forums on the net saying "Logitechmedia server died. Restarting." and there is no clue what actually happened, because the log file is empty.

How to solve that issue?

Secret(s) found: 2 - [Product Security - Secret Scanning]

This is automated issue created by Logitech Secret Scanner v1.0 - Nabil Hamzi

It seems that information looking like a secret (password, token, credentials, ...) has been identified in this github repository.
We should avoid as much as possible to store secrets in Github code repository. Github has an 'encrypted secrets' feature for this.
Please react on this thread with @nhamzi for any question.

Here are the findings, SecretLink contains the link to the sensitive value to be renewed, refreshed and deleted.

SecretLink=https://github.com/Logitech/slimserver-platforms/blob/2bb2489d488474d08d4522cb065d451c520e7354/win32/WHS Add-In/SqueezeCenter/SettingsTabUserControl.resx#L132-L132
SecretLink=https://github.com/Logitech/slimserver-platforms/blob/e14655ab3031cf10f7ce128d389e4ccb4dc70925/win32/WHS Add-In/SqueezeCenter/Properties/Resources.resx#L120-L120

FLAC playback fails

Hello,
sadly, with this docker container I run into the issue that trying to play any FLAC files leads to white noise coming from my Squeezelite clients.
I verified that it actually works with a straight install from AUR on Arch Linux.
The log output is

[21-08-09 16:01:25.2968] Slim::Player::Song::new (109) index 0 -> file:///music/Music/Kosheen/Resist/Kosheen%20-%20Resist%20-%2015%20-%20Gone.flac
[21-08-09 16:01:25.2969] Slim::Player::StreamingController::_setStreamingState (2386) new streaming state TRACKWAIT
[21-08-09 16:01:25.2980] Slim::Player::StreamingController::_playersMessage (796) Now Playing: file:///music/Music/Kosheen/Resist/Kosheen%20-%20Resist%20-%2015%20-%20Gone.flac
[21-08-09 16:01:25.2985] Slim::Player::Song::getNextSong (222) file:///music/Music/Kosheen/Resist/Kosheen%20-%20Resist%20-%2015%20-%20Gone.flac
[21-08-09 16:01:25.2986] Slim::Player::StreamingController::_nextTrackReady (744) 02:42:ac:11:00:05: nextTrack will be index 0
[21-08-09 16:01:25.2987] Slim::Player::StreamingController::_Stream (1210) Song queue is now 0
[21-08-09 16:01:25.2988] Slim::Player::StreamingController::_Stream (1213) 02:42:ac:11:00:05: preparing to stream song index 0
[21-08-09 16:01:25.2989] Slim::Player::Song::open (362) file:///music/Music/Kosheen/Resist/Kosheen%20-%20Resist%20-%2015%20-%20Gone.flac
[21-08-09 16:01:25.2991] Slim::Player::TranscodingHelper::getConvertCommand2 (493) Matched: flc->pcm via: [flac] -dcs --totally-silent $START$ $END$ -- $FILE$ | [sox] -q -t wav - -t wav  -b 24 --buffer 8192 -   gain -h  rate -v -I -b 90.7 -f 192000
[21-08-09 16:01:25.2993] Slim::Player::TranscodingHelper::getConvertCommand2 (490) Error: Didn't find any command matches for type: flc
[21-08-09 16:01:25.2994] Slim::Player::Song::open (386) seek=false time=0 canSeek=1
[21-08-09 16:01:25.2995] Slim::Player::TranscodingHelper::getConvertCommand2 (493) Matched: flc->pcm via: [flac] -dcs --totally-silent $START$ $END$ -- $FILE$ | [sox] -q -t wav - -t wav  -b 24 --buffer 8192 -   gain -h  rate -v -I -b 90.7 -f 192000
[21-08-09 16:01:25.2996] Slim::Player::Song::open (416) Transcoder: streamMode=I, streamformat=pcm
[21-08-09 16:01:25.2997] Slim::Player::Song::open (472) Opening stream (no direct streaming) using Slim::Player::Protocols::File [file:///music/Music/Kosheen/Resist/Kosheen%20-%20Resist%20-%2015%20-%20Gone.flac]
[21-08-09 16:01:25.2998] Slim::Player::Protocols::File::open (80) duration: [218.866] size: [27020401] endian [] offset: [0] for file:///music/Music/Kosheen/Resist/Kosheen%20-%20Resist%20-%2015%20-%20Gone.flac
[21-08-09 16:01:25.2998] Slim::Player::Protocols::File::open (97) Opening file /music/Music/Kosheen/Resist/Kosheen - Resist - 15 - Gone.flac
[21-08-09 16:01:25.2999] Slim::Player::Protocols::File::open (189) Seeking in 0 into /music/Music/Kosheen/Resist/Kosheen - Resist - 15 - Gone.flac
[21-08-09 16:01:25.3000] Slim::Player::Song::open (502) URL is a song (audio): file:///music/Music/Kosheen/Resist/Kosheen%20-%20Resist%20-%2015%20-%20Gone.flac, type=flc
[21-08-09 16:01:25.3002] Slim::Player::TranscodingHelper::tokenizeConvertCommand2 (667) Using command for conversion: "/lms/Bin/x86_64-linux/flac" -dcs --totally-silent -- - | "/lms/Bin/x86_64-linux/sox" -q -t wav - -t wav  -b 24 --buffer 8192 -   gain -h  rate -v -I -b 90.7 -f 192000
[21-08-09 16:01:25.3002] Slim::Player::Song::open (578) Tokenized command: "/lms/Bin/x86_64-linux/flac" -dcs --totally-silent -- - | "/lms/Bin/x86_64-linux/sox" -q -t wav - -t wav  -b 24 --buffer 8192 -   gain -h  rate -v -I -b 90.7 -f 192000
/lms/Bin/x86_64-linux/sox FAIL sox: `-' error writing output file: Broken pipe
[21-08-09 16:01:25.3162] Slim::Player::StreamingController::_Stream (1282) 02:42:ac:11:00:05: stream
[21-08-09 16:01:25.3170] Slim::Player::StreamingController::_Stream (1319) Song queue is now 0
[21-08-09 16:01:25.3171] Slim::Player::StreamingController::_setPlayingState (2377) new playing state BUFFERING
[21-08-09 16:01:25.3172] Slim::Player::StreamingController::_setStreamingState (2386) new streaming state STREAMING
[21-08-09 16:01:25.3239] Slim::Player::TranscodingHelper::getConvertCommand2 (493) Matched: flc->pcm via: [flac] -dcs --totally-silent $START$ $END$ -- $FILE$ | [sox] -q -t wav - -t wav  -b 24 --buffer 8192 -   gain -h  rate -v -I -b 90.7 -f 192000
[21-08-09 16:01:25.3241] Slim::Player::TranscodingHelper::getConvertCommand2 (490) Error: Didn't find any command matches for type: flc
[21-08-09 16:01:25.3941] Slim::Player::Squeezebox2::directHeaders (478) Processing headers for direct streaming:
HTTP/1.1 200 OK
Server: Logitech Media Server (8.2.0 - 1627922070)
Connection: close
Content-Type: audio/L16 
Set-Cookie: Squeezebox-albumView=; path=/
Set-Cookie: Squeezebox-expandPlayerControl=true; path=/
Set-Cookie: Squeezebox-expanded-MY_MUSIC=1; path=/
Set-Cookie: Squeezebox-expanded-FAVORITES=0; path=/
Set-Cookie: Squeezebox-expanded-PLUGINS=1; path=/
Set-Cookie: Squeezebox-expanded-PLUGIN_MY_APPS_MODULE_NAME=1; path=/
Set-Cookie: Squeezebox-expanded-RADIO=0; path=/

[21-08-09 16:01:27.4866] Slim::Player::StreamingController::playerTrackStarted (2200) 02:42:ac:11:00:05
[21-08-09 16:01:27.4867] Slim::Player::StreamingController::_setPlayingState (2377) new playing state PLAYING
[21-08-09 16:01:27.4868] Slim::Player::StreamingController::_Playing (368) Song 0 has now started playing
[21-08-09 16:01:27.4870] Slim::Player::StreamingController::_Playing (397) Song queue is now 0
[21-08-09 16:01:27.4877] Slim::Player::TranscodingHelper::getConvertCommand2 (493) Matched: flc->pcm via: [flac] -dcs --totally-silent $START$ $END$ -- $FILE$ | [sox] -q -t wav - -t wav  -b 24 --buffer 8192 -   gain -h  rate -v -I -b 90.7 -f 192000
[21-08-09 16:01:27.4879] Slim::Player::TranscodingHelper::getConvertCommand2 (490) Error: Didn't find any command matches for type: flc
[21-08-09 16:01:27.4889] Slim::Player::TranscodingHelper::getConvertCommand2 (493) Matched: flc->pcm via: [flac] -dcs --totally-silent $START$ $END$ -- $FILE$ | [sox] -q -t wav - -t wav  -b 24 --buffer 8192 -   gain -h  rate -v -I -b 90.7 -f 192000
[21-08-09 16:01:27.4890] Slim::Player::Protocols::File::open (80) duration: [218.866] size: [27020401] endian [] offset: [0] for file:///music/Music/Kosheen/Resist/Kosheen%20-%20Resist%20-%2015%20-%20Gone.flac
[21-08-09 16:01:27.4891] Slim::Player::Protocols::File::open (97) Opening file /music/Music/Kosheen/Resist/Kosheen - Resist - 15 - Gone.flac
[21-08-09 16:01:27.4892] Slim::Player::Protocols::File::open (189) Seeking in 0 into /music/Music/Kosheen/Resist/Kosheen - Resist - 15 - Gone.flac
[21-08-09 16:01:27.4894] Slim::Player::TranscodingHelper::tokenizeConvertCommand2 (667) Using command for conversion: "/lms/Bin/x86_64-linux/flac" -dcs --totally-silent -- - | "/lms/Bin/x86_64-linux/sox" -q -t wav - -t wav  -b 24 --buffer 8192 -   gain -h  rate -v -I -b 90.7 -f 192000

Do you have any idea how I could fix this?
Thanks!

Getting only "Operation is not permitted" errors

I would like to start LMS on my QNAP server. I start it using the following command:

docker run --name=lms --hostname=san --user=squeezeboxserver \
  -e PUID=1000 -e PGID=100 \
  -e EXTRA_ARGS="--advertiseaddr=192.168.173.10" \
  --mac-address=02:42:0a:00:03:03 \
  --env=TZ=Europe/Berlin \
  --volume=/share/Container/squeezeserver:/config:rw \
  --volume=/share/Multimedia/music/Corrected:/music:ro \
  --network=bridge -p 3483:3483 -p 3483:3483/udp -p 4070:4070 -p 9000:9000 -p 9090:9090 \
  --label='com.qnap.qcs.network.mode=nat' --label='com.qnap.qcs.gpu=False' \
  --log-opt max-file=10 --log-opt max-size=10m \
  --runtime=runc --memory="2147483648" --detach=true -t \
  lmscommunity/logitechmediaserver:stable

However, when I start it, I get the following errors:

usermod: user squeezeboxserver is currently used by process 1
groupmod: Permission denied.
groupmod: cannot lock /etc/group; try again later.
chown: changing ownership of '/config': Operation not permitted
chown: changing ownership of '/lms/Slim/Buttons/Alarm.pm': Operation not permitted
chown: changing ownership of '/lms/Slim/Buttons/Block.pm': Operation not permitted
chown: changing ownership of '/lms/Slim/Buttons/Common.pm': Operation not permitted
…
chown: changing ownership of '/lms/strings.txt': Operation not permitted
chown: changing ownership of '/lms/types.conf': Operation not permitted
chown: changing ownership of '/lms': Operation not permitted
Starting Logitech Media Server on port 9000...
Using additional arguments: --advertiseaddr=192.168.173.10

So the given User- and Group-IDs already exist on my QNAP. The config directory has mode 777, so in any case, someone should be able to write it. But the lms directory is only inside the Docker image. How can I get an "Operation not permitted" error here?

In the end, the server has not been started and is not reachable using the given address. Moreover, the config directory does not contain anything, not even the subdirectories logs, prefs´ and cache`.

Thankful for any advice.

Add libgomp1 to docker image

Hi,

I want to use the docker image with airplay plugin, but that plugin will need the libgomp1.

So can you add libgomp1 to the docker image?

root@fc751da3ca58:/config# /config/cache/InstalledPlugins/Plugins/RaopBridge/Bin/squeeze2raop-x86-64 -Z -I -f /config/logs/raopbridge.log -x /config/prefs/raopbridge.xml -i /config/prefs/raopbridge.xml
/config/cache/InstalledPlugins/Plugins/RaopBridge/Bin/squeeze2raop-x86-64: error while loading shared libraries: libgomp.so.1: cannot open shared object file: No such file or directory
root@fc751da3ca58:/config# apt-get install libgomp1
....

manifest unknown?

I am experiencing a strange issue with upgrading to the latest version with docker-compose (manual pull of container works).

dg1sek@raspberrypi:/opt$ docker-compose pull lms
Pulling lms ... error

ERROR: for lms  manifest for lmscommunity/logitechmediaserver:latest not found: manifest unknown: manifest unknown
ERROR: manifest for lmscommunity/logitechmediaserver:latest not found: manifest unknown: manifest unknown

my docker-compose.yaml:

  lms:
    container_name: lms
    image: lmscommunity/logitechmediaserver
    ports:
      - "9000:9000/tcp"
      - "9090:9090/tcp"
      - "3483:3483/tcp"
      - "3483:3483/udp"
    environment:
      - PUID=1000
      - PGID=1000
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
      - /mnt/timecapsuleSSD/Music:/music:ro
      - /opt/squeezebox-config:/config:rw
      - /opt/squeezebox-playlist:/playlist:rw
    restart: always

File limit is too low for larger playlists

The squeezeboxserver user has a open file limit of 1024 which causes lms to generate a lot of errors below when you have a larger playlist

Slim::Player::Protocols::File::open (101) Error: could not open ..... Too many open files

How to reproduce:-

  1. Start container
  2. run docker exec -it container-id bash
  3. run su - squeezeboxserver -c 'ulimit -n'

Result is 1024

Using the command line docker run --ulimit nofile=90000:90000 .... does not help as this changes the limit for the root user (which already has a high enough limit)

Please change it so that the number of files limit for the squeezeboxserver user is configurable from an environment variable (with the default as the current limit of 1024)

squeezeboxserver user in docker image is not added to group $PGID

The squeezeboxserver user is set up as part of the Dockerfile build process.

The line usermod -g $PGID squeezeboxserver has therefore already been executed when building the image, not with the user specified PGID at runtime.

If the user overrides the group using the PGID environment variable, this is used to chown various files in start-container.sh but the squeezeboxserver user is not added to this group. This prevents using the PGID to allow access to music files mounted from the host.

I would expect changing:

usermod -o -u "$PUID" squeezeboxserver
groupmod -o -g "$PGID" nogroup

to:

groupmod -o -g "$PGID" nogroup
usermod -o -u "$PUID" -g nogroup squeezeboxserver

in start-container.sh would make it work, however using a differently named group to "nogroup" would be semantically better since it is a group, and in my use case, one that serves an access role.

It might be cleanest to specify an (optional) group for the read/write files (i.e. what is affected at present) and a separate group that the squeezeboxserver user is put in by start-container.sh intended for access to the read only music.

How to use port 5353 UDP on Synology?

Hi,

does somebody know how I can run lms with port 5353 UDP on Synology?
I would need that in order to run Spotty (Spotifiy Plugin) properly...

Error message: "Local port 5353, ... conflicts with other ports used by other services"

It seems the port 5353 UDP is already in usage by avahi-daemon:

sudo netstat -tulpn | grep 5353
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           7500/avahi-daemon:

I stopped/disabled avahi...

sudo synoservice --stop avahi

... and I can confirm its not running anymore - even after a restart of the NAS. And the port is not in usage either.
Still same error message that the port is already in usage.

Tagged docker image build for 7.x to permit Squeezebox radio patching

Now that there is a Docker image available, and given that future patching of the Squeezebox Radio may still require version 7.x, would it be possible to set up a separate tagged image for the older release in the official docker hub repo? I believe switching docker images, or just using the docker image version to patch is a very low friction approach to helping to manage this issue.

Many thanks for all the hard work.

Should Dockerfile support passing in external ip using --advertiseaddr?

I just converted to a Docker install of 8.3.1 and have noticed at least one place where the browser is being passed a URL using the internal ip address of the Docker container (which of course fails). I noticed this in the "Customize Device" plugin, where I believe Slim::Plugin::JiveExtras::Settings is calling Slim::Utils::Network::serverURL() to construct the URLs for the image thumbnails, and this is ultimately using hostAddr() resulting in the internal ip address being used.

I can see that Slim/Utils/Network.pm recently (2021) added an --advertiseaddr parameter, which might have been to address this kind of issue. Would it be useful to formally support and document this as a parameter in the Dockerfile? Happy to try and create a PR if this makes sense.

Is the chown on /lms on startup actually neccessary?

I know this just adds a bit of delay during the container startup (as referenced in issue #44) - not a huge problem.

But I wonder why the chown is actually needed as all the file permissions under this path appear to have correct permissions for world read/execute access (and if there was doubt about this, it could be enforced during the container build). Are there any writes expected to this directory?

The LMS container appears to work correctly under a specified uid/gid even if the ownership change to /lms is removed.

Apologies if this is a naive question, I might be missing something!

EXTRA_ARGS is not passed to the startup script contrary to what documentation says for versions below 8.4

It is stated in documentation, that we can pass extra args to the lms. Indeed the start-container.sh in source code contains the line

su squeezeboxserver -c '/usr/bin/perl /lms/slimserver.pl --prefsdir /config/prefs --logdir /config/logs --cachedir /config/cache --httpport $HTTP_PORT $EXTRA_ARGS'

in public/8.4 code line, but $EXTRA_ARGS is missing in anything below. This is very misleading, since this possibility is mentioned in docker hub documentation without saying anything about the fact, that this will work only in 8.4 version, which has status dev (unstable) in docker hub

Cannot connect to github lugin repository even impelemented with proxy

Hi, I found a issue, when I use docker-compose to start the docker, everything looks fine except the plugin report:

Bad repository https://github.com/LMS-Community/lms-plugin-repository/raw/master/extensions.xml - Connect timed out: Resource temporarily unavailable

I understand it should be blocked by ISP, so I tried to use proxy to solve it. but even I configured proxy in web configuration-advance-network. it can not work. i tried to put the proxy in environment of docker-compose,

    environment:
      - http_proxy=http://192.168.1.11:1234
      - https_proxy=http://192.168.1.11:1234

I tried to use curl to test it, it looks OK, but still the system report:
Bad repository https://github.com/LMS-Community/lms-plugin-repository/raw/master/extensions.xml - Connect timed out:

Could someone give some support about it, thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.