LMS-Community / slimserver

Server for Squeezebox and compatible players. This server is also called Lyrion Music Server.
https://lyrion.org
Other
1.17k stars 294 forks source link

player name occasionally forgotten and displays 'nil' #867

Open JKDingwall opened 1 year ago

JKDingwall commented 1 year ago

I have two squeeze box radios with stock firmware ( 7.7.3-r16676) with LMS version 8.3.0. Occasionally "Player Name" in the player settings is forgotten and reverts to 'nil'. I've not noticed this problem with any other settings field but I think most of them are probably default values.

mherger commented 1 year ago

I can't remember if this has ever happened to me...

Can you share more information about your system? What platform/OS you're running it on? What players are you using? Where would you even see "nil"? It's nothing Perl produces - it would probably be the frontend you're using failing on some response?

JKDingwall commented 1 year ago

LMS host:

$ uname -a
Linux hostname 5.19.0-35-generic #36~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Feb 17 15:17:25 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.2 LTS
Release:        22.04
Codename:       jammy

$ apt-cache policy logitechmediaserver
logitechmediaserver:
  Installed: 8.3.0
  Candidate: 8.3.0
  Version table:
 *** 8.3.0 100
        100 /var/lib/dpkg/status

Player 1:

Player Model: Squeezebox Radio
Player Type: baby
Firmware: 7.7.3-r16676
Player IP Address: x.x.x.x
Player MAC Address: 00:11:11:11:11:11

Player 2:

Player Model: Squeezebox Radio
Player Type: baby
Firmware: 7.7.3-r16676
Player IP Address: x.x.x.x
Player MAC Address: 00:22:22:22:22:22

I have a daily cron script which backs up the preferences directory with a command like this:

echo "$(date) info: creating logitechmedia server configuration backup"
find "${PREFS_DIR}" | tee /dev/stderr | cpio -H newc -o | gzip > "${BACKFILE}"

If I check through the old backups I find this diff between 22/23 Feb where SBKitchen becomes nil. Everything else just looks like timestamp information.

diff -ur 22/var/lib/squeezeboxserver/prefs/clientplaylist_0004202e47d2.m3u 23/var/lib/squeezeboxserver/prefs/clientplaylist_0004202e47d2.m3u
--- 22/var/lib/squeezeboxserver/prefs/clientplaylist_0004202e47d2.m3u   2023-02-21 06:30:00.000000000 +0000
+++ 23/var/lib/squeezeboxserver/prefs/clientplaylist_0004202e47d2.m3u   2023-02-22 06:30:20.000000000 +0000
@@ -1,5 +1,5 @@
 #CURTRACK 0
 #EXTM3U
 #EXTURL:sounds://_LIVE_bbc_radio_fourfm
-#EXTINF:3600,BBC Radio 4
+#EXTINF:2700,BBC Radio 4
 sounds://_LIVE_bbc_radio_fourfm
diff -ur 22/var/lib/squeezeboxserver/prefs/clientplaylist_0004202e5088.m3u 23/var/lib/squeezeboxserver/prefs/clientplaylist_0004202e5088.m3u
--- 22/var/lib/squeezeboxserver/prefs/clientplaylist_0004202e5088.m3u   2023-02-21 18:00:07.000000000 +0000
+++ 23/var/lib/squeezeboxserver/prefs/clientplaylist_0004202e5088.m3u   2023-02-22 17:42:04.000000000 +0000
@@ -1,5 +1,5 @@
 #CURTRACK 0
 #EXTM3U
 #EXTURL:sounds://_LIVE_bbc_radio_fourfm
-#EXTINF:-1,BBC Radio 4
+#EXTINF:10800,BBC Radio 4
 sounds://_LIVE_bbc_radio_fourfm
diff -ur 22/var/lib/squeezeboxserver/prefs/server.prefs 23/var/lib/squeezeboxserver/prefs/server.prefs
--- 22/var/lib/squeezeboxserver/prefs/server.prefs      2023-02-21 19:22:15.000000000 +0000
+++ 23/var/lib/squeezeboxserver/prefs/server.prefs      2023-02-22 18:52:56.000000000 +0000
@@ -24,7 +24,7 @@
   _ts_bass: -1
   _ts_bufferThreshold: 1447485533
   _ts_clockSource: 0
-  _ts_currentSong: 1676964601
+  _ts_currentSong: 1677051019
   _ts_defeatDestructiveTouchToPlay: 1532637920
   _ts_digitalOutputEncoding: 0
   _ts_digitalVolumeControl: -1
@@ -64,7 +64,7 @@
   _ts_pitch: 1447485533
   _ts_playDelay: 1447485533
   _ts_playername: 1675355013
-  _ts_playingAtPowerOff: 1673335802
+  _ts_playingAtPowerOff: 1677051019
   _ts_playingDisplayMode: 0
   _ts_playtrackalbum: 1447485532
   _ts_plugin.audioscrobbler.account: 0
@@ -72,8 +72,8 @@
   _ts_plugin.audioscrobbler.enable_scrobbling: 0
   _ts_plugin.audioscrobbler.include_radio: 0
   _ts_polarityInversion: 0
-  _ts_positionAtDisconnect: 1669185056
-  _ts_power: 1676964601
+  _ts_positionAtDisconnect: 1677047599
+  _ts_power: 1677051019
   _ts_powerOffBrightness: 0
   _ts_powerOffDac: 0
   _ts_powerOnBrightness: 0
@@ -94,9 +94,9 @@
   _ts_scrollRateDouble: 1447485532
   _ts_sensAutoBrightness: 0
   _ts_shuffle: 1447485533
-  _ts_snLastSyncDown: 1676624979
-  _ts_snLastSyncUp: 1676964631
-  _ts_snSyncInterval: 1676624979
+  _ts_snLastSyncDown: 1677047622
+  _ts_snLastSyncUp: 1677051049
+  _ts_snSyncInterval: 1677047621
   _ts_startDelay: 1447485533
   _ts_stereoxl: 0
   _ts_syncPower: 1447485533
@@ -193,7 +193,7 @@
   playername: SBBed1
   playingAtPowerOff: ''
   playtrackalbum: 1
-  positionAtDisconnect: 0
+  positionAtDisconnect: 1856.208
   power: 0
   powerOnResume: PauseOff-PlayOn
   preampVolumeControl: 0
@@ -233,9 +233,9 @@
   scrollRate: 0.033
   scrollRateDouble: 0.033
   shuffle: 0
-  snLastSyncDown: 1676624979
-  snLastSyncUp: 1676964631
-  snSyncInterval: 18273981
+  snLastSyncDown: 1677047622
+  snLastSyncUp: 1677051049
+  snSyncInterval: 18358510
   startDelay: 0
   syncPower: 0
   syncVolume: 0
@@ -270,7 +270,7 @@
   _ts_bass: -1
   _ts_bufferThreshold: 1446573444
   _ts_clockSource: 0
-  _ts_currentSong: 1677006893
+  _ts_currentSong: 1677090599
   _ts_defeatDestructiveTouchToPlay: 1614869943
   _ts_digitalOutputEncoding: 0
   _ts_digitalVolumeControl: -1
@@ -309,8 +309,8 @@
   _ts_packetLatency: 1446573444
   _ts_pitch: 1446573444
   _ts_playDelay: 1446573444
-  _ts_playername: 1675355022
-  _ts_playingAtPowerOff: 1677007294
+  _ts_playername: 1677047611
+  _ts_playingAtPowerOff: 1677091936
   _ts_playingDisplayMode: 0
   _ts_playtrackalbum: 1446573443
   _ts_plugin.audioscrobbler.account: 0
@@ -318,8 +318,8 @@
   _ts_plugin.audioscrobbler.enable_scrobbling: 0
   _ts_plugin.audioscrobbler.include_radio: 0
   _ts_polarityInversion: 0
-  _ts_positionAtDisconnect: 1675361219
-  _ts_power: 1677007295
+  _ts_positionAtDisconnect: 1677047599
+  _ts_power: 1677091936
   _ts_powerOffBrightness: 0
   _ts_powerOffDac: 0
   _ts_powerOnBrightness: 0
@@ -340,9 +340,9 @@
   _ts_scrollRateDouble: 1446573444
   _ts_sensAutoBrightness: 0
   _ts_shuffle: 1446573444
-  _ts_snLastSyncDown: 1676624979
-  _ts_snLastSyncUp: 1677007325
-  _ts_snSyncInterval: 1676624979
+  _ts_snLastSyncDown: 1677047623
+  _ts_snLastSyncUp: 1677091966
+  _ts_snSyncInterval: 1677047623
   _ts_startDelay: 1446573444
   _ts_stereoxl: 0
   _ts_syncPower: 1446573444
@@ -431,10 +431,10 @@
   packetLatency: 2
   pitch: 100
   playDelay: 0
-  playername: SBKitchen
+  playername: nil
   playingAtPowerOff: 1
   playtrackalbum: 1
-  positionAtDisconnect: 420.492
+  positionAtDisconnect: 1857.583
   power: 0
   powerOnResume: PauseOff-PlayOn
   preampVolumeControl: 0
@@ -474,9 +474,9 @@
   scrollRate: 0.033
   scrollRateDouble: 0.033
   shuffle: 0
-  snLastSyncDown: 1676624979
-  snLastSyncUp: 1677007325
-  snSyncInterval: 18398337
+  snLastSyncDown: 1677047623
+  snLastSyncUp: 1677091966
+  snSyncInterval: 18482866
   startDelay: 0
   syncPower: 0
   syncVolume: 0
@@ -1029,7 +1029,7 @@
 _ts_cachedir: 1532632217
 _ts_checkVersion: 1446133434
 _ts_checkVersionInterval: 1446133434
-_ts_checkVersionLastTime: 1676967243
+_ts_checkVersionLastTime: 1677053643
 _ts_composerInArtists: 1446133434
 _ts_conductorInArtists: 1446133434
 _ts_coverArt: 1446133434
@@ -1149,7 +1149,7 @@
 cachedir: /var/lib/squeezeboxserver/cache
 checkVersion: 1
 checkVersionInterval: 86400
-checkVersionLastTime: 1676967243.29031
+checkVersionLastTime: 1677053643.71535
 composerInArtists: 0
 conductorInArtists: 0
 coverArt: ''

/var/log/squeezeboxserver/server.log doesn't contain much over those dates:

[23-02-19 18:07:51.6186] Plugins::BBCSounds::ProtocolHandler::new (219) Live stream to old after pause, stopping the continuation.
[23-02-19 18:07:51.6188] Slim::Player::Song::open (499) Warning: stream failed to open [sounds://_LIVE_bbc_radio_fourfm].
[23-02-20 06:30:00.7386] Plugins::BBCSounds::ProtocolHandler::new (219) Live stream to old after pause, stopping the continuation.
[23-02-20 06:30:00.7975] Slim::Player::Song::open (499) Warning: stream failed to open [sounds://_LIVE_bbc_radio_fourfm].
[23-02-22 06:30:12.0070] Plugins::BBCSounds::ProtocolHandler::new (219) Live stream to old after pause, stopping the continuation.
[23-02-22 06:30:12.9426] Slim::Player::Song::open (499) Warning: stream failed to open [sounds://_LIVE_bbc_radio_fourfm].
[23-02-22 07:14:18.9330] Plugins::BBCSounds::ProtocolHandler::__ANON__ (1046) Retrying of https://as-dash-uk-live.akamaized.net/pool_904/live/uk/bbc_radio_fourfm/bbc_radio_fourfm.isml/dash/bbc_radio_fourfm-audio=320000-262039061.m4s
[23-02-22 07:14:19.0795] Plugins::BBCSounds::ProtocolHandler::__ANON__ (1046) Retrying of https://as-dash-uk-live.akamaized.net/pool_904/live/uk/bbc_radio_fourfm/bbc_radio_fourfm.isml/dash/bbc_radio_fourfm-audio=320000-262039061.m4s
[23-02-22 17:42:04.8536] Plugins::BBCSounds::ProtocolHandler::new (219) Live stream to old after pause, stopping the continuation.
[23-02-22 17:42:04.8538] Slim::Player::Song::open (499) Warning: stream failed to open [sounds://_LIVE_bbc_radio_fourfm].
[23-02-23 06:30:01.8814] Plugins::BBCSounds::ProtocolHandler::new (219) Live stream to old after pause, stopping the continuation.
[23-02-23 06:30:01.8821] Slim::Player::Song::open (499) Warning: stream failed to open [sounds://_LIVE_bbc_radio_fourfm].
[23-02-23 18:23:01.0227] Plugins::BBCSounds::ProtocolHandler::new (219) Live stream to old after pause, stopping the continuation.
[23-02-23 18:23:01.0232] Slim::Player::Song::open (499) Warning: stream failed to open [sounds://_LIVE_bbc_radio_fourfm].
[23-02-24 06:30:35.9608] Plugins::BBCSounds::ProtocolHandler::new (219) Live stream to old after pause, stopping the continuation.
[23-02-24 06:30:36.6925] Slim::Player::Song::open (499) Warning: stream failed to open [sounds://_LIVE_bbc_radio_fourfm].
[23-02-24 06:30:50.1102] Plugins::BBCSounds::ProtocolHandler::new (219) Live stream to old after pause, stopping the continuation.
[23-02-24 06:30:50.1107] Slim::Player::Song::open (499) Warning: stream failed to open [sounds://_LIVE_bbc_radio_fourfm].

I'm using MariaDB on another host for the database:

dbsource: dbi:mysql:some.other.host;port=3306;database=lms

I don't use the interface much, usually only to update the presets/alarms, most interaction is with the radios directly. The most recent change I remember making via :9000 was on 7 Feb (according to file times) to install the BBC Sounds plugin.

I've had a search in the source and these seem to be possible sources of the 'nil' value:

CPAN/HTML/TreeBuilder.pm:          " (Moving on up to ", $p ? $p->{'_tag'} : 'nil', ")\n"
CPAN/SOAP/Constants.pm:$NS_XSI_NILS = join join('|', map { my $class = $XML_SCHEMAS{$_} . '::Serializer'; "\{($_)-instance\}" . $class->nilValue
CPAN/SOAP/Lite.pm:sub nilValue { 'null' }
CPAN/SOAP/Lite.pm:sub nilValue { 'nil' }
CPAN/SOAP/Lite.pm:            # store null/nil attribute if value is undef
CPAN/SOAP/Lite.pm:            local $attr->{SOAP::Utils::qualify(xsi => $self->xmlschemaclass->nilValue)} = $self->xmlschemaclass->as_undef(1)
CPAN/SOAP/Lite.pm:    return [$name, {%$attr, SOAP::Utils::qualify(xsi => $schemaclass->nilValue) => $schemaclass->as_undef(1)}] unless defined $value;
michaelherger commented 1 year ago

Do you have a MySqueezebox.com account? Does the player show up there?

What kind of controllers are you using? Web UI? Material skin? Smartphone app?

JKDingwall commented 1 year ago

Do you have a MySqueezebox.com account? Does the player show up there?

Yes: Enabled, keep player settings in sync. I did sign in yesterday for the first time in years and saw that the players are registered there and the player name is a synchronised field. The SBKitchen was registered as 'nil' though. Do you think it is possible that if there is timeout in the sync it can result in the name being lost? I don't think I really get any benefit so if the solution is to disable sync or not use the mysqueezebox integration then I can do that.

What kind of controllers are you using? Web UI? Material skin? Smartphone app?

Only the Web UI which is part of LMS.