Home assistant community addons : LMS the Lyrion Music Server Formerly the Logitech Media Server or SqueezeBox Server. Squeezelite Player

What and how is your player connected? This smells like some sort of networking issue either within the addon or client.

Both HA PC and the player are hard-wired ethernet via a dumb ethernet switch, as is the SMB server. If I use (e.g.) MPD on the same player it works fine, so that part of the network is fine. I can interact with / browse etc my HA server too.

Update, it works today! I changed nothing at my end. The error message is still in the logs, must not be related to the issue. LMS via ingress also works.

Sorry to waste your time, appreciate your input.

1 Like

Someone help me hereā€¦ I blew up my core install just so I could use this add-on by installing supervised (Debian in UTM on a mac). LMS has never been accessible via ingress or the web page and appears to be having permission issues despite me having turned off protection mode. /config/lms has permissions 744 and is owned by root- initially the group was also root but changing this to homeassistant didnā€™t help.

[23-07-08 20:08:39.4240] main::init (377) Starting Logitech Media Server (v8.3.0, 1667251155, Fri 04 Nov 2022 09:16:39 AM CET) perl 5.032001 - aarch64-linux-gnu-thread-multi
[23-07-08 20:08:39.4266] Slim::Utils::PluginManager::init (74) Failed to load plugin downloader: Can't locate Slim/Utils/PluginDownloader.pm:   /config/lms/cache/InstalledPlugins/Slim/Utils/PluginDownloader.pm: Permission denied at /usr/share/perl5/Slim/Utils/PluginManager.pm line 69.
[23-07-08 20:08:39.4301] Slim::Utils::PluginManager::_parseInstallManifest (675) Warning: Unable to parse XML in file [/usr/share/perl5/Slim/Plugin/PresetsEditor/install.xml]: [Can't use string ("1") as an ARRAY ref while "strict refs" in use at /usr/share/squeezeboxserver/CPAN/XML/Simple.pm line 231.

Edit: /usr/share/perl5/Slim doesnā€™t exist. I tried reinstalling several timesā€¦

even inside the addon docker container?

docker exec -it addon_fc57b866_lms  bash

you should then be able to find it.

I do have protection mode turned on.

@fmon sounds like a permissions issue try chown -Rh 1000 /config/lms in the terminal addon and restarting the addon

If this doesnā€™t work log an github issue and we can see if we can get to the bottom of whats going onā€¦

Ah thanks for showing me how to do that @nickrout.

@pssc that didnā€™t workā€¦ Iā€™ll file it on Github.

Probably doing something stupid, but my LMS wonā€™t even start ā€¦ It loops with the following log output:

Start Logitech Media Server...
[services.d] done.
[23:01:04] INFO: Waiting for lms before starting NGinx...
[23:01:04] INFO: Starting NGinx...
[23:01:04] INFO: Services up or timeout
[23:01:04] INFO: Event lms.service
{"message":"Event lms.service fired."}
[23:01:04] INFO: Starting the Home Assistant STDIN service for lms...
{"entity_id":"binary_sensor.entity_state_cli_test","state":"on","attributes":{},"last_changed":"2023-07-16T20:41:41.362693+00:00","last_updated":"2023-07-16T20:41:41.362693+00:00","context":{"id":"01H5G7091HFR8Q0P2KMJ296N6Y","parent_id":null,"user_id":"4814e8c983673844aa6c640fd1951c03"}}
squeezy error: could not connect to '127.0.0.1' port '9090'
[23-07-16 23:01:07.9429] main::init (377) Starting Logitech Media Server (v8.3.0, 1667251155, Fri 04 Nov 2022 09:16:39 AM CET) perl 5.032001 - arm-linux-gnueabihf-thread-multi-64int
[23-07-16 23:01:08.9436] Slim::Networking::UDP::init (40) FATAL: There is already another copy of the Logitech Media Server running on this machine. (Address already in use)
[23-07-16 23:01:08.9450] Log::Log4perl::Logger::and_die (868) Warning: FATAL: There is already another copy of the Logitech Media Server running on this machine. (Address already in use) at /usr/share/squeezeboxserver/lib/Log/Log4perl/Logger.pm line 900
Start Logitech Media Server...

Iā€™m trying to run the addon with itā€™s default config in home assistant on rpi-3 (and I did not install it multiple times) ā€¦ does anybody have a clue as to what Iā€™m doing wrong?

FATAL: There is already another copy of the Logitech Media Server running on this machine.

This is usually down to the network ports already being bound by something else or a stale copy, reboot, if it persists look see what has the ports this add-on uses in useā€¦

1 Like

Hi,

I also have no ingress interface,502 bad gateway
Portainer (on other port) show LMS is not in the network/has no ports


Protective mode is off, an no (permissions) issues in the log.
Everything is updated

Where are your lms logs please?

A 502 error often mean the addon is not running.

Also, if you are running and addon, you shouldnā€™t be running portainer (just sayinā€™)

No I used portainer to debug, thats all.
This is (I think) the most interesting part of the logs. I dont see errors above this


[07:37:41] INFO: Starting NGinx...
[07:37:41] INFO: Services up or timeout
[07:37:41] INFO: Event lms.service
{"message":"Event lms.service fired."}
[07:37:41] INFO: Starting the Home Assistant STDIN service for lms...
{"entity_id":"binary_sensor.entity_state_cli_test","state":"on","attributes":{},"last_changed":"2023-08-12T04:55:10.345963+00:00","last_updated":"2023-08-12T04:55:10.345963+00:00","context":{"id":"01H7M1JA89VJXZCR1J9D5WCXXJ","parent_id":null,"user_id":"ec0ec353cac54634ba8e7e37b662158b"}}
malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Can't connect to 127...") at /usr/share/perl5/JSON/RPC/Legacy/Client.pm line 180.
{"entity_id":"sensor.lms_players","state":"count","attributes":{},"last_changed":"2023-08-12T04:55:13.363732+00:00","last_updated":"2023-08-12T04:55:13.363732+00:00","context":{"id":"01H7M1JD6K6QMNA0Y50FCQZAR4","parent_id":null,"user_id":"ec0ec353cac54634ba8e7e37b662158b"}}
malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Can't connect to 127...") at /usr/share/perl5/JSON/RPC/Legacy/Client.pm line 180.
{"entity_id":"sensor.lms_albums","state":"count","attributes":{},"last_changed":"2023-08-12T04:55:16.014106+00:00","last_updated":"2023-08-12T04:55:16.014106+00:00","context":{"id":"01H7M1JFSDX87HFZKWWTHBFZE8","parent_id":null,"user_id":"ec0ec353cac54634ba8e7e37b662158b"}}
malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "Can't connect to 127...") at /usr/share/perl5/JSON/RPC/Legacy/Client.pm line 180.

I donā€™t think those are the addon logs, looks more like an HA log

Here is mine after a restart of the addon

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Add-on: Logitech Media Server
 Logitech Media Server, SqueezeBox Server & UPNP Media Server
-----------------------------------------------------------
 Add-on version: 0.0.53
 You are running the latest version of this add-on.
 System: Debian GNU/Linux 11 (bullseye)  (amd64 / qemux86-64)
 Home Assistant Core: 2023.8.2
 Home Assistant Supervisor: 2023.08.1
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] 02-timezone.sh: executing... 
Setting the timezone to : Pacific/Auckland
Current default time zone: 'Pacific/Auckland'
Local time is now:      Mon Aug 14 18:16:00 NZST 2023.
Universal Time is now:  Mon Aug 14 06:16:00 UTC 2023.
Date: Mon Aug 14 18:16:00 NZST 2023
[cont-init.d] 02-timezone.sh: exited 0.
[cont-init.d] 05-ha-options-json.sh: executing... 
[cont-init.d] 05-ha-options-json.sh: exited 0.
[cont-init.d] 07-ha-addon_name.sh: executing... 
[cont-init.d] 07-ha-addon_name.sh: exited 0.
[cont-init.d] 09-ha-config-to-env.sh: executing... 
[18:16:01] INFO: Option MOUNT to MOUNT=null
[18:16:01] INFO: Option TMPFS to TMPFS=null
[18:16:01] INFO: Option OPTIONS to LMS_OPTIONS=null
[18:16:01] INFO: Option LOGFILE to LMS_LOGFILE=null
[18:16:01] INFO: Option LOGDIR to LMS_LOGDIR=null
[18:16:01] INFO: Option NX to LMS_NX=null
[18:16:01] INFO: Option set_permissions to LMS_set_permissions=null
[18:16:01] INFO: Option autoupdate_notify to LMS_autoupdate_notify=null
[cont-init.d] 09-ha-config-to-env.sh: exited 0.
[cont-init.d] 11-ha-dirs.sh: executing... 
mkhadir /data/mnt/music
mkhadir /media/Media
[cont-init.d] 11-ha-dirs.sh: exited 0.
[cont-init.d] 15-ha-mounts.sh: executing... 
[cont-init.d] 15-ha-mounts.sh: exited 0.
[cont-init.d] 17-ha-links.sh: executing... 
[cont-init.d] 17-ha-links.sh: exited 0.
[cont-init.d] 17-packages.sh: executing... 
[cont-init.d] 17-packages.sh: exited 0.
[cont-init.d] 21-pulse.sh: executing... 
[18:16:02] INFO:  Fix pulse perms
[cont-init.d] 21-pulse.sh: exited 0.
[cont-init.d] 90-lms_paths_perms.sh: executing... 
[cont-init.d] 90-lms_paths_perms.sh: exited 0.
[cont-init.d] 95-nxgix.sh: executing... 
[cont-init.d] 95-nxgix.sh: exited 0.
[cont-init.d] 95-scripts.sh: executing... 
[cont-init.d] 95-scripts.sh: exited 0.
[cont-init.d] 99-print-env.sh: executing... 
[cont-init.d] 99-print-env.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Start Logitech Media Server...
[18:16:02] INFO: Waiting for lms before starting NGinx...
[18:16:05] INFO: Starting NGinx...
[18:16:05] INFO: Services up or timeout
[18:16:05] INFO: Event lms.service
{"message":"Event lms.service fired."}
[18:16:05] INFO: Starting the Home Assistant STDIN service for lms...
{"entity_id":"binary_sensor.entity_state_cli_test","state":"on","attributes":{},"last_changed":"2023-08-11T22:42:47.628858+00:00","last_updated":"2023-08-11T22:42:47.628858+00:00","context":{"id":"01H7KC8F6CDJXAKET6Z592SA4Z","parent_id":null,"user_id":"7de36704beba404aa881366d86dd89e0"}}
{"entity_id":"sensor.lms_players","state":"0","attributes":{"unit_of_measurement":"count"},"last_changed":"2023-08-13T00:16:09.316481+00:00","last_updated":"2023-08-13T00:16:09.316481+00:00","context":{"id":"01H7P404K4SYY83Q81C0T0VDVP","parent_id":null,"user_id":"7de36704beba404aa881366d86dd89e0"}}
{"entity_id":"sensor.lms_albums","state":"1170","attributes":{"unit_of_measurement":"count"},"last_changed":"2023-08-14T06:00:29.474160+00:00","last_updated":"2023-08-14T06:00:29.474160+00:00","context":{"id":"01H7SA3BH2V01XSSHJ6E7X3VZS","parent_id":null,"user_id":"7de36704beba404aa881366d86dd89e0"}}
{"entity_id":"sensor.lms_songs","state":"15151","attributes":{"unit_of_measurement":"count"},"last_changed":"2023-08-14T06:00:29.682669+00:00","last_updated":"2023-08-14T06:00:29.682669+00:00","context":{"id":"01H7SA3BQJHA20EQTPGVEXMYFK","parent_id":null,"user_id":"7de36704beba404aa881366d86dd89e0"}}
[23-08-14 18:16:04.6159] main::init (377) Starting Logitech Media Server (v8.3.0, 1667251155, Fri 04 Nov 2022 09:14:25 AM CET) perl 5.032001 - x86_64-linux-gnu-thread-multi
[23-08-14 18:16:04.9238] Slim::Utils::Misc::msg (1325) Warning: [18:16:04.9237] DBIx::Class::ResultSet::update_or_create(): Query returned more than one row.  SQL that returns multiple rows is DEPRECATED for ->find and ->single at /usr/share/perl5/Slim/Schema.pm line 1927
{"entity_id":"sensor.lms_genres","state":"162","attributes":{"unit_of_measurement":"count"},"last_changed":"2023-08-14T06:00:29.886414+00:00","last_updated":"2023-08-14T06:00:29.886414+00:00","context":{"id":"01H7SA3BXYV9KE626NDMXJAA2C","parent_id":null,"user_id":"7de36704beba404aa881366d86dd89e0"}}
{"entity_id":"sensor.lms_artists","state":"3263","attributes":{"unit_of_measurement":"count"},"last_changed":"2023-08-14T06:00:30.095738+00:00","last_updated":"2023-08-14T06:00:30.095738+00:00","context":{"id":"01H7SA3C4FE1EBSXWADGXTDN8X","parent_id":null,"user_id":"7de36704beba404aa881366d86dd89e0"}}
{"entity_id":"sensor.lms_duration","state":"3920550.75233336","attributes":{"unit_of_measurement":"seconds"},"last_changed":"2023-08-14T06:00:30.340293+00:00","last_updated":"2023-08-14T06:00:30.340293+00:00","context":{"id":"01H7SA3CC4DPTZMF5FFJ6Q0EHJ","parent_id":null,"user_id":"7de36704beba404aa881366d86dd89e0"}}

I like to think that my errors start around the Starting the Home Assistant STDIN service moment
Makes kinda sense if the container is not connected to the docker-network and/or cannot reach its host.

What are your LMS addon settings? Mine are very simple.

Thanks for your time.

Settings: Nothing at all. Just as it came out of the box. I did reintall it like 10 times. Even without portainer (normally runs on 9000 port) but same results

My full log is in this git issue

Are you absolutely sure that nothing (probably portainer) is running when you start the lms addon? Nothing on ports 9000, or 9090, or 3483?

I checked them all, and there is no add-on that uses any of these ports. I also tried to change all the ports of lms addon but that wonā€™t help. :frowning:

In my case, lms was conflicting with portainer, i changed the lms port but ingress link was hardcoded to 9000, so i was accessing directly with ip:port combination to lms.

Ah thanks, @anon63427907, but it does t work directly but I ll try a bit more. How does your portainer look, if you look at the lms container? Does it have a network, IP adress and ports binded?