![]() |
[PROBLEM] Spotify Connect Keeps Disconneting/Dropping - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7) +--- Thread: [PROBLEM] Spotify Connect Keeps Disconneting/Dropping (/showthread.php?tid=6976) |
Spotify Connect Keeps Disconneting/Dropping - StudioSeventeen - 10-08-2024 I have Moode set up on a Raspberry Pi 3b. Everything works fine except Spotify Connect randomly disonnects throughout the day. I can get it to reconnect by reselecting my Moode device from Spotify, but I want to know how I can prevent the disconnects form happening in the first place. My software is up to date and this problem has persisted for the last few months. Here is a snippet of the log which captured a dropout. At 10:36, it disconnected: 20241008 103541 DEBUG: chkSQL(): type in ('nfs', 'cifs') 20241008 103542 DEBUG: chkSQL(): param='aplactive' 20241008 103542 DEBUG: chkSQL(): param='spotactive' 20241008 103545 DEBUG: chkSQL(): param='aplactive' 20241008 103545 DEBUG: chkSQL(): param='spotactive' 20241008 103548 DEBUG: chkSQL(): param='aplactive' 20241008 103548 DEBUG: chkSQL(): param='spotactive' 20241008 103551 DEBUG: chkSQL(): param='aplactive' 20241008 103551 DEBUG: chkSQL(): param='spotactive' 20241008 103554 DEBUG: chkSQL(): param='aplactive' 20241008 103554 DEBUG: chkSQL(): param='spotactive' 20241008 103558 DEBUG: chkSQL(): param='aplactive' 20241008 103558 DEBUG: chkSQL(): param='spotactive' 20241008 103601 DEBUG: chkSQL(): param='aplactive' 20241008 103601 DEBUG: chkSQL(): param='spotactive' 20241008 103604 DEBUG: chkSQL(): param='aplactive' 20241008 103604 DEBUG: chkSQL(): param='spotactive' 20241008 103607 DEBUG: chkSQL(): param='aplactive' 20241008 103607 DEBUG: chkSQL(): param='spotactive' 20241008 103610 DEBUG: chkSQL(): param='aplactive' 20241008 103610 DEBUG: chkSQL(): param='spotactive' 20241008 103611 DEBUG: chkSQL(): type in ('nfs', 'cifs') 20241008 103613 DEBUG: chkSQL(): param='aplactive' 20241008 103613 DEBUG: chkSQL(): param='spotactive' 20241008 103613 DEBUG: chkValue(): On 20241008 103613 DEBUG: chkValue(): jukebox 20241008 103613 DEBUG: chkValue(): Jukebox 20241008 103613 DEBUG: chkValue(): Europe/London 20241008 103613 DEBUG: chkValue(): gb 20241008 103613 DEBUG: chkValue(): Default 20241008 103613 DEBUG: chkValue(): performance 20241008 103613 DEBUG: chkValue(): vc4-kms-v3d 20241008 103613 DEBUG: chkValue(): 1 20241008 103613 DEBUG: chkValue(): 1 20241008 103613 DEBUG: chkValue(): 1 20241008 103613 DEBUG: chkValue(): 1 20241008 103613 DEBUG: chkValue(): 90 20241008 103613 DEBUG: chkValue(): Value is blank 20241008 103613 DEBUG: chkValue(): Off 20241008 103613 DEBUG: chkValue(): Off 20241008 103613 DEBUG: chkValue(): Value is blank 20241008 103613 DEBUG: chkValue(): rw,sync,no_subtree_check,no_root_squash 20241008 103613 DEBUG: chkValue(): Value is blank 20241008 103613 DEBUG: chkValue(): Moode DLNA 20241008 103613 DEBUG: chkValue(): 1 20241008 103613 DEBUG: chkValue(): off 20241008 103613 DEBUG: chkValue(): Value is blank 20241008 103613 DEBUG: chkValue(): automatic 20241008 103613 DEBUG: chkValue(): on 20241008 103613 DEBUG: chkValue(): 1 20241008 103613 DEBUG: chkValue(): 1 RE: Spotify Connect Keeps Disconneting/Dropping - Tim Curtis - 10-08-2024 Turn off Debug logging, reboot and then post the contents of the startup log. The log can be viewed via the SSH command moodeutl -l or downloaded via the Logs section in System Config, or via Menu, System info from any of the Config screens. The startup log will be at the end of System info output. RE: Spotify Connect Keeps Disconneting/Dropping - StudioSeventeen - 10-08-2024 Hi Tim, Thanks for the quick reply. Here is the startup log: Code: 20241008 155833 worker: -- RE: Spotify Connect Keeps Disconneting/Dropping - Tim Curtis - 10-08-2024 I don't see anything suspicious in the log. I never experience issues with Spotify Connect but some users have reported these random disconnects and in some cases librespot has crashed. You can determine if it has crashed by running the command below. It returns 0 if librespot is not running or has crashed. Code: pgrep -c librespot When the disconnect occurs is librespot still running? RE: Spotify Connect Keeps Disconneting/Dropping - StudioSeventeen - 10-08-2024 I ran the command when Spotify dropped and got the following output: pi@jukebox:~ $ pgrep -c librespot 1 RE: Spotify Connect Keeps Disconneting/Dropping - Tim Curtis - 10-08-2024 (10-08-2024, 03:54 PM)StudioSeventeen Wrote: I ran the command when Spotify dropped and got the following output: That indicates it's still running which would suggest some sort of network issue external to moode and librespot RE: Spotify Connect Keeps Disconneting/Dropping - StudioSeventeen - 10-09-2024 Is there any way you could point me in the direction of finding out which part of my setup is causing the issue? RE: Spotify Connect Keeps Disconneting/Dropping - chaetura - 10-14-2024 I want to say "me too" here. I have 4 moode units each at different locations running on dedicated RPi4B's with Boss2 DACs, I have used at least one of them virtually every day with Spotify for years, and for at least a month now, Spotify connections drop constantly, sometimes in 2 minutes, sometimes but rarely as long as 20. I know my networks well and nothing has changed, all the more surely not in all locations simultaneously. Previously, connections would last indefinitely. If I accidentally left one playing at the end of the day having turned off the amp, it would still be playing the next day when I turn the amp on. I'm not sure whether the problems began with a Moode update or if so which one, as there have been quite a few in v9.x All machines are on 9.1.2 now. After the connection is dropped, it is interesting that after re-selecting the moode device, play resumes immediately, without a separate step of pressing "play." I have not tested to confirm, but I think this also happens when librespot loses its upstream connection temporarily. I'm using the upstream connection regularly on my computer and there is no problem with the upstream connection. Of course there are occasional glitches, but again they can't be happening so consistently at several locations over many weeks, without my noticing other upstream issues. The only thing in common is all upstreams are Comcast; could it be that Comcast is blacklisting Spotify servers? Audio traffic bandwidth is going to be trivial compared to video so I can't see why this would happen, I'm just thinking of plausible reasons which fit the evidence. I've just turned on debug logging and will monitor. I see in a recent release librespot is under watchdog, but I should be seeing that get caught and restart, right? I don't think that's happening because I don't think play wouldn't resume immediately on re-connect. RE: Spotify Connect Keeps Disconneting/Dropping - chaetura - 10-14-2024 (10-14-2024, 03:35 PM)chaetura Wrote: I want to say "me too" here. I have 4 moode units each at different locations running on dedicated RPi4B's with Boss2 DACs, I have used at least one of them virtually every day with Spotify for years, and for at least a month now, Spotify connections drop constantly, sometimes in 2 minutes, sometimes but rarely as long as 20. I know my networks well and nothing has changed, all the more surely not in all locations simultaneously. Previously, connections would last indefinitely. If I accidentally left one playing at the end of the day having turned off the amp, it would still be playing the next day when I turn the amp on.Today it seems like finally posting about this problem has made it go away: 90 minutes and counting, no drop so far today. If only doing this would reliably make problems go away. It's certainly plausible that some Spotify servers (i.e,. those serving some not all users) have been behaving poorly for weeks. RE: Spotify Connect Keeps Disconneting/Dropping - TheOldPresbyope - 10-14-2024 I don't see how Tim and his merry band of devs (including backbenchers like me) can solve this problem. Since moOde is simply a conduit for the output of the third-party librespot app it would seem disconnection/dropout issues arise in librespot or upstream. I note that there has been an ongoing librespot github discussion thread about how to "Handle reconnection for Sessions" that started in 2018 and continues today. The librespot devs don't seem to have a definitive answer. I don't understand the Spotify protocols well enough to know if that discussion topic covers your issue or not but it certainly rhymes. Recently, one of the participants on that thread remarked "I'm testing go-librespot now. My experiences are much better. Very stable connection." Another responded "I see that go-librespot is just retrying a bunch of times, rotating around the access points. That isn't what librespot does but we might as well go down this route and paper over whatever problem this is. Maybe it is just Spotify's shoddy servers." (Here, access points refers to Spotify servers.) The principal dev responds that this papering over might work but would require substantial code rewrite on their part. This doesn't suggest to me that they have even identified the root causes. Comcast is my ISP as well and I don't believe they're doing anything untoward with Spotify service (or any other music streaming service I dabble with). Spotify isn't my usual source but as a reference point, I've been listening to one of Spotify's "Radio" channels for the past hour without interruption. I'll keep it on in the background all today to see if it ever glitches. Perhaps we have different experiences because our clients are connecting to different Spotify access points. I'm in Maryland on the east coast of the USA. Where are you located. Regards, Kent |