Closed microfx closed 4 months ago
So it didn't really crash. Your network stopped working for a bit and librespot could not (immediately) reconnect, but rather than retrying, the session connection network failure causes spirc to return an error and the program to then exit. This does look like a bug in the connection retrying, librespot should handle spirc network-related errors differently as they might be recoverable.
Yeah... my ISP has tons of dropouts everyday... Can I maybe tell systemd to restart it? That's how mine looks:
[Unit]
Description=Librespot
After=sound.target
Wants=network-online.target
After=network.target network-online.target
After=jack.target
[Service]
LimitRTPRIO=95
LimitMEMLOCK=infinity
Environment=JACK_NO_AUDIO_RESERVATION=1
Environment=JACK_PROMISCUOUS_SERVER=jack
User=jack
Group=jack
Environment="DEVICE_NAME=hostname"
Environment="DEVICE_TYPE=speaker"
Environment="BITRATE=320"
Environment="CACHE_ARGS=--disable-audio-cache"
Environment="VOLUME_ARGS=--volume-ctrl linear --initial-volume 60"
Environment="DEVICE_TYPE=speaker"
#Environment="OUTPUT=hw:1,0"
Environment="OPTIONS=--username myusername --password mypassword --onevent /SCRIPTS/p5_speaker_onoff.sh"
ExecStartPre=/bin/sleep 4
ExecStart=/usr/bin/librespot --name ${DEVICE_NAME} --device-type ${DEVICE_TYPE} --bitrate ${BITRATE} $CACHE_ARGS $VOLUME_ARGS $OPTIONS --backend rodiojack
[Install]
WantedBy=multi-user.target
I'll add
Restart=on-failure
RestartSec=5s
and report back if that fixed it.
I guess it's fixed. Still a few other weird issues – I will look into those now. Thx!
Describe the bug Saw that librespot is not available anymore this morning after having run for days without errors. I was sleeping and it crashed (no music was playing)
Log
When starting I get this - maybe is related?
Host (what you are running
librespot
on): OS: Raspbian GNU/Linux 11 (bullseye) aarch64 Kernel: Linux 6.1.69-v8-16k+ Raspberry Pi 5 8GBlibrespot 0.5.0-dev a245a3c (Built on 2023-12-23, Build ID: 0GbZXlzH, Profile: release)