Spotify connect stops playing randomly
anbugge opened this issue · 8 comments
After working fine for a while (2-10 minutes) Spotify Connect suddenly stops playback in the middle of a song.
Log output when this is happening:
[Vollibrespot] : Unable to load audio item.
[Vollibrespot] : SessionError: Connection reset by peer (os error 104)
volspotconnect2.service holdoff time over, scheduling restart.
Stopping Volspotconnect2 Daemon...
Starting Volspotconnect2 Daemon...
Started Volspotconnect2 Daemon.
vollibrespot v0.2.2 cd96399 2020-10-07 (librespot 08d8bcc 2020-10-07) -- Built On 2020-10-07
Reading Config from "volspotify.toml"
[Vollibrespot] : Using Alsa backend with device: softvolume
[Vollibrespot] : Failed to register IPv6 receiver: Os { code: 19, kind: Other, message: "No such device" }
Output of journalctl -u volspotconnect2.service
:
Dec 23 09:45:41 volumio volumio[18836]: [Vollibrespot] : Loading <Pills, Powders and Passion Plays> with Spotify URI <spotify:track:4L8PDcI09exJ9honCytDMT>
Dec 23 09:45:41 volumio volumio[18836]: [Vollibrespot] : <Pills, Powders And Passion Plays> (425826 ms) loaded
Dec 23 09:46:11 volumio volumio[18836]: [Vollibrespot] : Event: Next { track_id: SpotifyId { id: 207905265647686521779710940965906056619, audio_type: Track } }
Dec 23 09:46:11 volumio volumio[18836]: [Vollibrespot] : Event: TrackChanged { old_track_id: SpotifyId { id: 7767516898092647129683584008227915676, audio_type: Track }, track_id: SpotifyId { id: 207905265647686521779710940965906056619, audio_type: Track } }
Dec 23 09:52:47 volumio volumio[18836]: [Vollibrespot] : Loading <Doffen Ah Um> with Spotify URI <spotify:track:0g85XslKJe3xcELpOAzINt>
Dec 23 09:52:47 volumio volumio[18836]: [Vollibrespot] : <Doffen Ah Um> (297106 ms) loaded
Dec 23 09:53:17 volumio volumio[18836]: [Vollibrespot] : Event: Next { track_id: SpotifyId { id: 11362760154743967413889587577417840467, audio_type: Track } }
Dec 23 09:53:17 volumio volumio[18836]: [Vollibrespot] : Event: TrackChanged { old_track_id: SpotifyId { id: 207905265647686521779710940965906056619, audio_type: Track }, track_id: SpotifyId { id: 11362760154743967413889587577417840467, audio_type: Track } }
Dec 23 09:57:44 volumio volumio[18836]: [Vollibrespot] : Unable to load audio item.
Dec 23 09:57:44 volumio volumio[18836]: [Vollibrespot] : SessionError: Connection reset by peer (os error 104)
Dec 23 09:57:46 volumio systemd[1]: volspotconnect2.service holdoff time over, scheduling restart.
Dec 23 09:57:46 volumio systemd[1]: Stopping Volspotconnect2 Daemon...
Dec 23 09:57:46 volumio systemd[1]: Starting Volspotconnect2 Daemon...
Dec 23 09:57:46 volumio systemd[1]: Started Volspotconnect2 Daemon.
Dec 23 09:57:46 volumio volumio[1911]: vollibrespot v0.2.2 cd96399 2020-10-07 (librespot 08d8bcc 2020-10-07) -- Built On 2020-10-07
Dec 23 09:57:46 volumio volumio[1911]: Reading Config from "volspotify.toml"
Dec 23 09:57:46 volumio volumio[1911]: [Vollibrespot] : Using Alsa backend with device: softvolume
Dec 23 09:57:44 volumio volumio[18836]: [Vollibrespot] : SessionError: Connection reset by peer (os error 104)
You seem to have some network issues
Thanks. That would make sense, except everything else seems to work fine, including streaming FLAC internet radio and playing Spotify from Volumio directly. I'll keep an eye on things and see if I can make any sense of it.
Oh - 104
means as it says - connection rest by peer - i.e Spotify's servers requested a reset. Doesn't necessary mean your network is bad, just that their servers don't recognise our connection, so we restart the daemon..
That would make even more sense :)
After making myself more familiar with the project I guess this would basically be a feature request to Librespot to handle this error gracefully and re-establish the connection instead of erroring out?
Oh it's something that we really need to do, but involves quite a restructuring of the logic.. librespot-org/librespot#134
Librespot needs some love, I should try and find some time for it..
Ah, so not something for me to play with as a first foray into Rust programming in the holidays... :)
For what it's worth it's been working flawlessly for me after creating the issue. I think this issue can be closed unless you want to keep it around as motivation for the session handling work.
Thanks for the help and for a great product!
Good to know, it's normally caused by some hiccups along the way to Spotify's servers and goes away in some time.
Go ahead and close this, we have enough tracking issues for this :-)
Hey @anbugge, I had the same issue and tried almost everything I found on the internet, related to this. Then I was almost 100% positive that the problem was my junky ISP-router with WiFi built in (even though nothing else showed any issues). Due to working from home etc. I finally got a better router and it really solved the problem instantly. So nothing really new, but I was looking for a place to leave this comment, if somebody (like me beforehand) turns the internet upside down for a solution to this problem.
Doesn't mean that a decent error-handling would not be better, but at least something like a Pi4 instead of a Pi0 won't solve this problem either.