Closed dejanzelic closed 1 year ago
This might be related but the --zeroconf-interface
option doesn't do anything:
/app # librespot --verbose --zeroconf-interface="10.0.2.14" --zeroconf-port 1234
[2023-05-05T02:21:38Z INFO librespot] librespot 0.5.0-dev VERGEN_IDEMPOTENT_OUTPUT (Built on 2023-05-05, Build ID: nfFiwYuI, Profile: release)
[2023-05-05T02:21:38Z TRACE librespot] Command line argument(s):
[2023-05-05T02:21:38Z TRACE librespot] verbose
[2023-05-05T02:21:38Z TRACE librespot] zeroconf-interface "10.0.2.14"
[2023-05-05T02:21:38Z TRACE librespot] zeroconf-port "1234"
[2023-05-05T02:21:38Z DEBUG librespot_core::session] new Session
[2023-05-05T02:21:38Z DEBUG librespot_discovery::server] Zeroconf server listening on 0.0.0.0:1234
[2023-05-05T02:21:38Z WARN librespot] Could not initialise discovery: Attempt to create entity that already exists { Address in use (os error 98) }.
[2023-05-05T02:21:38Z ERROR librespot] Discovery is unavailable and no credentials provided. Authentication is not possible.
The discovery feature of librespot
is using two different ports:
So your problem is presumably that - as your ss
output suggests - you have a different service running on 5353 and handling mdns communication. So you'll need to find out what this other service is and stop it in order to use the discovery feature (or use the dns-sd
feature instead, if the other service is avahi).
Hope this helps!
Edit: The 0.0.0.0
in your second comment is hardcoded and only applies to the HTTP server listening for the connection requests, while the zeroconf-interface
applies only to mdns
traffic.
Thanks for the response @eladyn!
I'm compiling now with-dns-sd to try that. But I stopped the avahi-daemon and am still getting the same issues:
/app # ss -tulpn
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
udp UNCONN 0 0 0.0.0.0:8472 0.0.0.0:*
udp UNCONN 0 0 10.0.2.13:7946 0.0.0.0:*
udp UNCONN 0 0 0.0.0.0:68 0.0.0.0:*
tcp LISTEN 0 4096 10.0.2.13:7472 0.0.0.0:*
tcp LISTEN 0 4096 127.0.0.1:6444 0.0.0.0:*
tcp LISTEN 0 4096 127.0.0.1:10256 0.0.0.0:*
tcp LISTEN 0 4096 127.0.0.1:10249 0.0.0.0:*
tcp LISTEN 0 4096 127.0.0.1:10248 0.0.0.0:*
tcp LISTEN 0 4096 10.0.2.13:7946 0.0.0.0:*
tcp LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
tcp LISTEN 0 4096 127.0.0.1:10010 0.0.0.0:*
tcp LISTEN 0 128 [::]:22 [::]:*
tcp LISTEN 0 4096 *:10250 *:*
/app # librespot --verbose
[2023-05-05T16:15:29Z INFO librespot] librespot 0.5.0-dev VERGEN_IDEMPOTENT_OUTPUT (Built on 2023-05-05, Build ID: nfFiwYuI, Profile: release)
[2023-05-05T16:15:29Z TRACE librespot] Command line argument(s):
[2023-05-05T16:15:29Z TRACE librespot] verbose
[2023-05-05T16:15:29Z DEBUG librespot_core::session] new Session
[2023-05-05T16:15:29Z DEBUG librespot_discovery::server] Zeroconf server listening on 0.0.0.0:46373
[2023-05-05T16:15:29Z WARN librespot] Could not initialise discovery: Attempt to create entity that already exists { Address in use (os error 98) }.
[2023-05-05T16:15:29Z ERROR librespot] Discovery is unavailable and no credentials provided. Authentication is not possible.
I was able to get this to work by using your suggestion @eladyn and compiling using the feature with-dns-sd
. I had to make a couple more changes to my set up. For starters, I had to add the avahi
package to my container and start the avahi-daemon
before I start librespot.
I then added this to my Docker build:
sed -i 's/#enable-dbus=yes/enable-dbus=no/g' /etc/avahi/avahi-daemon.conf
I also had to mount /var/run/dbus
from the host to the container.
With these changes in place, librespot starts, I'm able to connect, and I get the new events!
I'm going to close this issue since my problem is resolved.
Describe the bug
When starting a build from the dev branch I get the following error:
The error makes it sound like the port is in use and zeroconf can't start. I found this: https://github.com/librespot-org/librespot/issues/1111 issue which complained about a similar problem. If this is the issue, I should be able to change the port with the
--zeroconf-port
argument. However, if I add this with any open port, I still get the same error.The reason I believe this might be a bug is because v0.4.2 works without a problem (and so does v0.3.1). I only get this error on the dev branch.
To reproduce
I get this error only when running the service in my kubernetes cluster. The container has host level network access and I do see avahi-daemon is running in another service. But what I don't understand is v0.4.2 doesn't have this issue in the same environment. While I know my problem is localized, I'll do my best to provide as much information as I can to reproduce.
Here is the deployment:
The Kubernetes environment is fairly default install of k3s with metallb (however, metallb isn't in use for this container)
Log
I can confirm that nothing else is running on port 33135
Host (what you are running
librespot
on):Additional context
I'm running librespot with remote pulseaudio.
I know this is the dev branch and I shouldn't expect it to work. However, I really need the
session_connected
events which is only available on dev. Any chance I can get an eta on when that will be released?Any help is appreciated!