MichaIng / DietPi

Lightweight justice for your single-board computer!
https://dietpi.com/
GNU General Public License v2.0
4.88k stars 497 forks source link

Shairport-Sync (airplay 2) Failing #6735

Closed vishnusure closed 12 months ago

vishnusure commented 1 year ago

Details:

Steps to reproduce:

  1. ...Select USB Soundcard from dietpi-config
  2. ...Install Shairport-Sync (Airplay 2) from dietpi-software, the installation fails with the error when executing systemctl stop shairport-syncshairport-sync

Expected behaviour:

Shairport-sync (airplay 2 should install sucessfully)

Actual behaviour:

Extra details:

Additional logs:

Failed to stop shairport-sync.service: Unit shairport-sync.service not loaded.
vishnusure commented 1 year ago

Issue Resolved

My System Details

Issue

  1. shairport-sync (airplay 2) was failing after a fresh install of DietPi on My Raspberry Pi 3.

  2. Upon further investigating found that nqptp is failing with the below error:

nqptp.service: Failed to determine user credentials: No such process nqptp.service: Failed at step USER spawning /usr/local/bin/nqptp: No such process

  1. Versions that came up with fresh install are:

nqptp -V Version: 1.2.5-dev-10-gcfa8315. Shared Memory Interface Version: smi10.

shairport-sync -V 4.3.2-AirPlay2-smi10-OpenSSL-Avahi-ALSA-stdout-pipe-soxr-metadata-mqtt-dbus-mpris-sysconfdir:/usr/local/etc


**Solution**

1. Stop avahi-daemon, nqptp and shairport-sync services as below:

systemctl status nqptp systemctl status shairport-sync.service systemctl status avahi-daemon


2. Type dietpi-software and use the GUI to uninstall avahi-daemon and shairport-sync.service

3. Remove old files of nqptp as per below: 

Type the below comand to find the location of nqptp
which nqptp
it should be installed at /usr/local/bin/nqptp. Remove it using the below commands

rm /lib/systemd/system/nqptp.service rm /usr/local/bin/nqptp systemctl daemon-reload


4. Build and Install both nqptp and shairport-sync manually as per below link:
https://github.com/mikebrady/shairport-sync/blob/master/BUILD.md

5. Working Versions after building manually as detailed in above link :

shairport-sync -V 4.3.2-1-g90c03bf0-AirPlay2-smi10-OpenSSL-Avahi-ALSA-soxr-sysconfdir:/etc

nqptp -V Version: 1.2.5-dev-10-gcfa8315. Shared Memory Interface Version: smi10.



The issue seems to be some version mismatch in the dependencies installed for nqptp. Remember nqptp is installed automatically when we use dietpi-software to install shairport-sync (airplay 2 dev version) 
MichaIng commented 1 year ago

Many thanks for reporting. Found it: The the NQPTP services runs now as nqptp user, which needs to be created: https://github.com/mikebrady/nqptp/commit/10969ea#diff-02c897cd7f1fe318c2321b0937845d24f6019eef8147ede65378b674044a96f9

New builds are running: https://github.com/MichaIng/DietPi/actions/runs/6798305839

vishnusure commented 1 year ago

Wonderful ! So no longer the issue occurrs when we install shairport through diet pi software after the new builds are implemented ?

MichaIng commented 1 year ago

Jep. Since your custom build implied the user creation as well, you could even just reinstall Shairport Sync now and it won't run into the error anymore. For everyone else:

useradd -rMU -d /nonexistent -s /usr/sbin/nologin nqptp
vishnusure commented 1 year ago

Wonderfull ! thanks for identifying and fixing it so quickly

MichaIng commented 1 year ago

New packages have been installed on the server.