Closed khink closed 1 year ago
This looks like a system-level issue, not a librespot bug. The Raspotify project should be able to help you.
Fundamentally the issue is that the librespot binary packaged in Raspotify provides its own Zeroconf server. Your system seems to also have a standalone Zeroconf server running (e.g. Avahi). It probably got installed by another package during your recent system updates. When librespot tries to start its integrated zeroconf server, it finds the port is already taken by Avahi. A solution is to remove Avahi. That might break something else on your system which is using Avahi. An alternate solution is the config change you already did. There is no librespot bug here.
There's some info at https://github.com/dtcooper/raspotify/search?q=with-dns-sd&type=issues
Thanks for taking the time to reply!
Indeed i have avahi.
pi@raspberrypi:~ $ apt list avahi-daemon
Listing... Done
avahi-daemon/stable,now 0.8-5+deb11u1 armhf [installed]
But disabling it doesn't help:
pi@raspberrypi:~ $ sudo service avahi-daemon stop
Warning: Stopping avahi-daemon.service, but it can still be activated by:
avahi-daemon.socket
pi@raspberrypi:~ $ sudo vi /etc/raspotify/conf # comment out LIBRESPOT_DISABLE_DISCOVERY=
pi@raspberrypi:~ $ sudo systemctl restart raspotify
pi@raspberrypi:~ $ tail -f /var/log/syslog
...
Jan 26 14:27:10 raspberrypi librespot[23953]: [2023-01-26T13:27:10Z WARN librespot] Could not initialise discovery: Setting up dns-sd failed: Address already in use (os error 98)
...
Even when i completely remove it:
pi@raspberrypi:~ $ sudo apt remove avahi-daemon
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
bind9-host bind9-libs libavahi-core7 libdaemon0 libfstrm0 libmaxminddb0 libprotobuf-c1 libuv1
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
avahi-daemon ipp-usb libnss-mdns
0 upgraded, 0 newly installed, 3 to remove and 1 not upgraded.
After this operation, 5,160 kB disk space will be freed.
Do you want to continue? [Y/n] Y
After restart:
Jan 26 14:32:00 raspberrypi librespot[24421]: [2023-01-26T13:32:00Z WARN librespot] Could not initialise discovery: Setting up dns-sd failed: Address already in use (os error 98)
So are we sure another zeroconf server is running, and if yes how do we find out which one it is? (Also, not sure how the issue search you refer to relates to this though, as none of them is about this "Address already in use" error.)
Update edit: After a reboot, the problem has gone. :100: for your avahi suggestion. Thanks!
Describe the bug
raspotify keeps crashing with the message "Setting up dns-sd failed: Address already in use (os error 98)".
I filed this in raspotify first, but the error is from librespot, so i thought it made sense to ask/report here.
To reproduce
1.
tail -f /var/log/syslog
sudo systemctl start raspotify
Log
Host (what you are running
librespot
on):I'm running a standard raspotify on bullseye on a Pi 3. It's running without a monitor (only SSH access), although lxde is installed (i think from when i first set it up a year or two ago).
Additional context
LIBRESPOT_ZEROCONF_PORT
) has no effect