mikebrady / shairport-sync

AirPlay and AirPlay 2 audio player
Other
7.29k stars 574 forks source link

Shairport-sync can not be started after service restart #1217

Closed dschuessler closed 3 years ago

dschuessler commented 3 years ago

First of all, thanks for your fantastic software.

I just installed shairport-sync on Raspberry Pi OS with apt install shairport-sync and it worked fine. Then I restarted the systemd service, shairport-sync crashed and I can not start it again.

sudo systemctl status shairport-sync:

● shairport-sync.service - ShairportSync AirTunes receiver
   Loaded: loaded (/lib/systemd/system/shairport-sync.service; enabled; vendor preset: enabled)
   Active: failed (Result: signal) since Sun 2021-07-04 20:29:14 BST; 3min 50s ago
     Docs: man:shairport-sync(7)
           file:///usr/share/doc/shairport-sync/README.md.gz
           https://github.com/mikebrady/shairport-sync
  Process: 2147 ExecStart=/usr/bin/shairport-sync --daemon $DAEMON_ARGS (code=killed, signal=ABRT)

Jul 04 20:29:14 raspberrypi shairport-sync[2149]: diagnostic_drop_packet_fraction is 0.000000. A value of 0.0 means no packets will be dropped deliberately.
Jul 04 20:29:14 raspberrypi shairport-sync[2149]: shutdown requested...
Jul 04 20:29:14 raspberrypi shairport-sync[2149]: Request to shut down all rtsp conversation threads
Jul 04 20:29:14 raspberrypi shairport-sync[2149]: asking playing threads to stop
Jul 04 20:29:14 raspberrypi systemd[1]: shairport-sync.service: Service RestartSec=100ms expired, scheduling restart.
Jul 04 20:29:14 raspberrypi systemd[1]: shairport-sync.service: Scheduled restart job, restart counter is at 5.
Jul 04 20:29:14 raspberrypi systemd[1]: Stopped ShairportSync AirTunes receiver.
Jul 04 20:29:14 raspberrypi systemd[1]: shairport-sync.service: Start request repeated too quickly.
Jul 04 20:29:14 raspberrypi systemd[1]: shairport-sync.service: Failed with result 'signal'.
Jul 04 20:29:14 raspberrypi systemd[1]: Failed to start ShairportSync AirTunes receiver.

If I run sudo systemctl status shairport-sync the terminal is blocked for over a minute and then prints:

Job for shairport-sync.service failed because a fatal signal was delivered to the control process.
See "systemctl status shairport-sync.service" and "journalctl -xe" for details.

If I run sudo systemctl status shairport-sync in a second terminal while the first one is blocked, I get:

● shairport-sync.service - ShairportSync AirTunes receiver
   Loaded: loaded (/lib/systemd/system/shairport-sync.service; enabled; vendor preset: enabled)
   Active: deactivating (stop-sigterm) (Result: signal)
     Docs: man:shairport-sync(7)
           file:///usr/share/doc/shairport-sync/README.md.gz
           https://github.com/mikebrady/shairport-sync
  Process: 2250 ExecStart=/usr/bin/shairport-sync --daemon $DAEMON_ARGS (code=killed, signal=ABRT)
    Tasks: 1 (limit: 2062)
   CGroup: /system.slice/shairport-sync.service
           └─2252 /usr/bin/shairport-sync --daemon

Jul 04 20:33:40 raspberrypi shairport-sync[2252]: use_mmap_if_available is 1.
Jul 04 20:33:40 raspberrypi shairport-sync[2252]: output_rate is 44100.
Jul 04 20:33:40 raspberrypi shairport-sync[2252]: output_format is 3 (0-unknown, 1-S8, 2-U8, 3-S16, 4-S24, 5-S24_3LE, 6-S24_3BE, 7-S32).
Jul 04 20:33:40 raspberrypi shairport-sync[2252]: audio backend desired buffer length is 0.150000 seconds.
Jul 04 20:33:40 raspberrypi shairport-sync[2252]: audio backend latency offset is 0.000000 seconds.
Jul 04 20:33:40 raspberrypi shairport-sync[2252]: audio backend silence lead-in time is -1.000000 seconds. A value -1.0 means use the default.
Jul 04 20:33:40 raspberrypi shairport-sync[2252]: volume range in dB (zero means use the range specified by the mixer): 0.
Jul 04 20:33:40 raspberrypi shairport-sync[2252]: zeroconf regtype is "_raop._tcp".
Jul 04 20:33:40 raspberrypi shairport-sync[2252]: decoders_supported field is 1.
Jul 04 20:33:40 raspberrypi shairport-sync[2252]: use_apple_decoder is 0.

Output of journalctl -xe:

Jul 04 20:35:12 raspberrypi shairport-sync[2306]: configuration file name "/etc/shairport-sync.conf" resolves to "/etc/shairport-sync.conf".
Jul 04 20:35:12 raspberrypi shairport-sync[2306]: metadata enabled is 0.
Jul 04 20:35:12 raspberrypi shairport-sync[2306]: metadata pipename is "(null)".
Jul 04 20:35:12 raspberrypi shairport-sync[2306]: metadata socket address is "(null)" port 0.
Jul 04 20:35:12 raspberrypi shairport-sync[2306]: metadata socket packet size is "500".
Jul 04 20:35:12 raspberrypi shairport-sync[2306]: get-coverart is 0.
Jul 04 20:35:12 raspberrypi shairport-sync[2306]: convolution is 0.
Jul 04 20:35:12 raspberrypi shairport-sync[2306]: convolution IR file is "(null)"
Jul 04 20:35:12 raspberrypi shairport-sync[2306]: convolution max length 8192
Jul 04 20:35:12 raspberrypi shairport-sync[2306]: convolution gain is 0.000000
Jul 04 20:35:12 raspberrypi shairport-sync[2306]: loudness is 0.
Jul 04 20:35:12 raspberrypi shairport-sync[2306]: loudness reference level is -20.000000
Jul 04 20:35:12 raspberrypi shairport-sync[2306]: disable resend requests is off.
Jul 04 20:35:12 raspberrypi shairport-sync[2306]: diagnostic_drop_packet_fraction is 0.000000. A value of 0.0 means no packets will be dropped deliberately.
Jul 04 20:35:12 raspberrypi shairport-sync[2306]: shutdown requested...
Jul 04 20:35:12 raspberrypi shairport-sync[2306]: Request to shut down all rtsp conversation threads
Jul 04 20:35:12 raspberrypi shairport-sync[2306]: asking playing threads to stop
Jul 04 20:35:12 raspberrypi systemd[1]: shairport-sync.service: Service RestartSec=100ms expired, scheduling restart.
Jul 04 20:35:12 raspberrypi systemd[1]: shairport-sync.service: Scheduled restart job, restart counter is at 6.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Automatic restarting of the unit shairport-sync.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Jul 04 20:35:12 raspberrypi systemd[1]: Stopped ShairportSync AirTunes receiver.
-- Subject: A stop job for unit shairport-sync.service has finished
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- A stop job for unit shairport-sync.service has finished.
-- 
-- The job identifier is 4828 and the job result is done.
Jul 04 20:35:12 raspberrypi systemd[1]: shairport-sync.service: Start request repeated too quickly.
Jul 04 20:35:12 raspberrypi systemd[1]: shairport-sync.service: Failed with result 'signal'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- The unit shairport-sync.service has entered the 'failed' state with result 'signal'.
Jul 04 20:35:12 raspberrypi systemd[1]: Failed to start ShairportSync AirTunes receiver.
-- Subject: A start job for unit shairport-sync.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- A start job for unit shairport-sync.service has finished with a failure.
-- 
-- The job identifier is 4828 and the job result is failed.
Jul 04 20:36:04 raspberrypi dhcpcd[616]: eth0: Router Advertisement from fe80::3a43:7dff:fe4c:1e78

Content of /etc/shairport-sync.conf

general =
{
  name = "Raspberry Pi";
};

diagnostics =
{
  log_verbosity = 1;
}

Rebooting didn't help. Reinstalling didn't help. Disabling and reenabling the service didn't help. I'm using the latest version of Raspberry Pi OS which is otherwise untouched. If you have any idea on how to troubleshoot this further, I would appreciate it.

shairport-sync -V: 3.2.2-OpenSSL-Avahi-ALSA-pa-dummy-stdout-pipe-soxr-convolution-metadata-sysconfdir:/etc

mikebrady commented 3 years ago

Thanks for the post. This is due to a bug in Shairport Sync 3.2.2 -- please see #1138.

dschuessler commented 3 years ago

Installed a more recent version from buster-backports and it works. Thank you!