Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

raspotify fails to start on fresh install #7323

Open
gergokis opened this issue Dec 25, 2024 · 7 comments · Fixed by #7332
Open

raspotify fails to start on fresh install #7323

gergokis opened this issue Dec 25, 2024 · 7 comments · Fixed by #7332
Labels
Solution available 🥂 Definite solution has been done Upstream change
Milestone

Comments

@gergokis
Copy link

gergokis commented Dec 25, 2024

Creating a bug report/issue

  • [ x] I have searched the existing open and closed issues

Required Information

G_DIETPI_VERSION_CORE=9
G_DIETPI_VERSION_SUB=9
G_DIETPI_VERSION_RC=0
G_GITBRANCH='master'
G_GITOWNER='MichaIng'
G_LIVE_PATCH_STATUS[0]='applied'

  • Distro version: bookworm 0
  • Kernel version | Linux DietPi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
  • SBC model | RPi 4 Model B (aarch64)
  • Power supply used | IanCanada PurePI II
  • SD card used | Sandisk 64GB

Additional Information (if applicable)

  • Software title | raspotify
  • Was the software title installed freshly or updated/migrated? The whole system is a fresh new install.
  • Can this issue be replicated on a fresh installation of DietPi? Yes
    787bf0fa-f134-446a-a072-c9c4d4b6650c

Steps to reproduce

systemctl start raspotify

Expected behaviour

raspotify starts

Actual behaviour

raspotify does not start

Extra details

root@DietPi:/etc# systemctl status raspotify
× raspotify.service - Raspotify (Spotify Connect Client)
     Loaded: loaded (/lib/systemd/system/raspotify.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Wed 2024-12-25 14:55:44 GMT; 12ms ago
   Duration: 159ms
       Docs: https://github.com/dtcooper/raspotify
             https://github.com/librespot-org/librespot
             https://github.com/dtcooper/raspotify/wiki
             https://github.com/librespot-org/librespot/wiki/Options
    Process: 11379 ExecStart=/usr/bin/librespot (code=exited, status=1/FAILURE)
   Main PID: 11379 (code=exited, status=1/FAILURE)
        CPU: 158ms

Dec 25 14:55:44 DietPi systemd[1]: Started raspotify.service - Raspotify (Spotify Connect Client).
Dec 25 14:55:44 DietPi librespot[11379]: [2024-12-25T14:55:44Z ERROR librespot_discovery] Avahi error: Setting up dns-sd failed: I/O error: No such file or directory (os error 2)
Dec 25 14:55:44 DietPi librespot[11379]: [2024-12-25T14:55:44Z ERROR librespot] Discovery stopped unexpectedly
Dec 25 14:55:44 DietPi systemd[1]: raspotify.service: Main process exited, code=exited, status=1/FAILURE
Dec 25 14:55:44 DietPi systemd[1]: raspotify.service: Failed with result 'exit-code'.
Dec 25 14:55:44 DietPi systemd[1]: raspotify.service: Triggering OnFailure= dependencies.
root@DietPi:/etc#
@Joulinar
Copy link
Collaborator

I/O error: No such file or directory (os error 2)

Looks like file system corruption. Can you check for kernel error messages

dmesg -l 0,1,2,3

@gergokis
Copy link
Author

gergokis commented Dec 25, 2024

root@DietPi:# dmesg -l 0,1,2,3
[    0.621936] bcm2708_fb soc:fb: Unable to determine number of FBs. Disabling driver.
root@DietPi:#

@hawaltie
Copy link

hawaltie commented Dec 29, 2024

I have the same problem. dmesg -l 0,1,2,3 didn't show any problem.

When I enabled "Libespot_Disable_Discovery=on" the error changed to something about credentials and oAuth. When I read other forums about errors from the past, I understand the compiling the zerofig part in librespot could be a problem. But I am not sure....

From the librespot github release page: release 0.60 [discovery] librespot can now be compiled with multiple MDNS/DNS-SD backends (avahi, dns_sd, libmdns) which can be selected using a CLI flag. The defaults are unchanged (breaking).

This is also mentioned on the raspotify release page:

[discovery] librespot can now be compiled with multiple MDNS/DNS-SD backends (avahi, dns_sd, libmdns) which can be selected using a CLI flag. The defaults are unchanged (breaking).

.....

[discovery] Added a new MDNS/DNS-SD backend which connects to Avahi via D-Bus.
Full Changelog: dtcooper/raspotify@0.45.0...0.46.0

I tried the librespot --zeroconf-backend avahi command, that showed the error Avahi error: Setting up dns-sd failed: I/O error: No such file or directory (os error 2)

I also tried thelibrespot --zeroconf-backend dns-sdcommand that resulted in the error: Valid zerconf-backend values: Avahi

@Joulinar
Copy link
Collaborator

ok it's not an I/O error of file system. It's a connection issue to avahi-daemon Can you try to install Avahi??

dietpi-software install 152

@hawaltie
Copy link

hawaltie commented Dec 29, 2024

Works! Thank you for your fast support.

@Joulinar Joulinar linked a pull request Dec 29, 2024 that will close this issue
@gergokis
Copy link
Author

I can also confirm installing avahi fixes the issue. Thank you very much for the very effective support.

@Joulinar Joulinar added Workaround available 🆗 Workaround is available/has been implemented, but a definite solution should be found when possible. and removed Investigating 🤔 labels Dec 29, 2024
@MichaIng
Copy link
Owner

MichaIng commented Dec 30, 2024

Hmm, I guess the use of Avahi-Daemon can be disabled. Added here: librespot-org/librespot@94d174c
The env var is not set by default in Raspotify, hence enabled OOTB in librespot: https://github.com/dtcooper/raspotify/blob/master/raspotify/etc/raspotify/conf
So adding LIBRESPOT_ZEROCONF_BACKEND="" to /etc/raspotify/conf should disable that new MDNS backend and hence the dependency on Avahi-Daemon.

EDIT: Ah wait, we actually do not want to disable DNS discovery completely, but use the old dns-sd backend. But based on the commit description, it is not compiled in, if not set explicitly, and if so, it is also used by default. The fact that the Avahi-Daemon is used hence means it is not compiled with the old backend ... So either we have no DNS discovery, or we need the Avahi-Daemon, indeed.

But I'll test things, to be sure.

EDIT2: Indeed, only Avahi-Daemon is supported:

Dec 30 05:18:14 DietPi librespot[3104]: [2024-12-30T05:18:14Z ERROR librespot] Invalid `--zeroconf-backend`: "dns-sd"
Dec 30 05:18:14 DietPi librespot[3104]: Valid `--zeroconf-backend` values: avahi
Dec 30 05:18:14 DietPi librespot[3104]: Default: avahi

@MichaIng MichaIng added Upstream change Solution available 🥂 Definite solution has been done and removed Workaround available 🆗 Workaround is available/has been implemented, but a definite solution should be found when possible. labels Dec 30, 2024
@MichaIng MichaIng added this to the v9.10 milestone Dec 30, 2024
MichaIng pushed a commit that referenced this issue Dec 30, 2024
- DietPi-Software | Raspotify: Resolved an issue where the service failed to start, if Avahi-Daemon was not installed. librespot has it as new default DNS discovery backend, and official pre-compiled Raspotify binaries are not compiled with the old DNS-SD backend anymore. Avahi-Daemon is hence installed now by DietPi-Software as well. Many thanks to @gergokis for reporting this issue: #7323
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Solution available 🥂 Definite solution has been done Upstream change
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants