spotifyd
spotifyd copied to clipboard
Cannot run spotifyd with multiple IPs on the same interface
Description Cannot launch spotifyd with discovery when there are 2 IPs (i.e. 2 IPv4 ) on the same interface. It gives the following error:
Message: called `Result::unwrap()` on an `Err` value: DnsSdError(Os { code: 98, kind: AddrInUse, message: "Address already in use" })
To Reproduce
- Run
spotifyd --no-daemonand ensure it works. Close the program. - Add an IPv4 to your network interface (e.g.
sudo ip add 192.168.1.123/24 dev enp1s0) - Run
spotifyd --no-daemonagain and it will get the error above.
Expected behavior
If the Zeroconf server is already listening on all interfaces with 0.0.0.0 it should not try to bind to the other IP.
Logs
Click to show logs
<!-- PLEASE PASTE YOUR LOGS BELOW THIS LINE WHEN REPORTING BUGS. Make sure to run spotifyd using the `--verbose` flag -->
spotifyd --no-daemon --verbose
No config file specified. Running with default values
CliConfig { config_path: None, no_daemon: true, verbose: true, pid: None, shared_config: SharedConfigValues { username: None, username_cmd: None, password: None, password_cmd: None, use_keyring: false, use_mpris: None, dbus_type: None, on_song_change_hook: None, cache_path: None, no-audio-cache: false, backend: None, volume_controller: None, device: None, control: None, mixer: None, device_name: None, bitrate: None, audio_format: None, initial_volume: None, volume_normalisation: false, normalisation_pregain: None, zeroconf_port: None, proxy: None, device_type: None, autoplay: false, max_cache_size: None } }
Found user shell: Some("/run/current-system/sw/bin/bash")
No username specified. Checking username_cmd
No username_cmd specified
No password specified. Checking password_cmd
No password_cmd specified
No proxy specified
registering event source with poller: token=Token(2147483649), interests=READABLE
Using software volume controller.
no usable credentials found, enabling discovery
Using device id '3ad21dfd52db1f2f20d8a9815c37bc58c8d0b643'
registering event source with poller: token=Token(0), interests=READABLE | WRITABLE
Zeroconf server listening on 0.0.0.0:35523
registering event source with poller: token=Token(1), interests=READABLE | WRITABLE
deregistering event source from poller
The application panicked (crashed).
Message: called `Result::unwrap()` on an `Err` value: DnsSdError(Os { code: 98, kind: AddrInUse, message: "Address already in use" })
Location: src/setup.rs:105
Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
Shutting down discovery server
deregistering event source from poller
<!-- They have to be betwenn the `/summary` and the `/details` HTML tags, and inside the backticks '`' -->
Compilation flags
- [ ] dbus_mpris
- [ ] dbus_keyring
- [x] alsa_backend
- [ ] portaudio_backend
- [ ] pulseaudio_backend
- [ ] rodio_backend
Versions (please complete the following information):
- OS:
NixOS 23.11 - Spotifyd:
spotifyd 0.3.5 - cargo: