WHat's the deal with shairport-sync?

This thing seems to have a mind of its own. It only works when it wants to.

My problem is that shairport-sync sometimes works sometimes doesn’t and by that I mean it doesn’t show up in Airplay on my mac or idevice. I have to reboot my pi several times and sometimes I can get it to show up in my idevice but a lot of times it just ends in frustration.

Sometimes it works flawlessly for weeks and then all of a sudden, without me ever even touching my pi it stops working.

Restarting the shairport service never ever works. Sometimes rebooting my router works, sometimes it doesn’t. Sometimes fiddling with the WMM setting in my router works… sometimes it doesn’t.

What’s the deal man? Do I have to sacrifice a goat or a virgin for this thing to work reliably and consistently?

Here’s an even better question: What logs can I look into to troubleshoot shairport-sync and where are they located? What general troubleshooting steps should I follow when troubleshooting shairport-sync specifically?

Thanks peeps.

Hi there. I’m the developer of Shairport Sync, and let me say at the outset: no sacrifices please! Imagine the shipping, customs, agriculture and immigration hassles!

Problems with an already-functioning Shairport Sync are almost invariably caused by network issues.

Many routers don’t handle multicasting well (needed by Bonjour/Avahi for advertising AirPlay), even between, say, 2.4 and 5GZ and Ethernet networks on the same router. Sometimes it works for weeks and then stops and the only remedy is to reboot. It might be worth checking for firmware updates for your router.

There are utilities for investigating Bonjour/Avahi at both ends of the network – avahi-browser on Linux and dns-sd on a Mac, or Bonjour Browser on Mac and Discovery on iOS.

Sometimes (though this is unlikely in your case, I think) a WiFi adapter can drop into a low-power mode and be only partly connected to the network. This can usually be fixed with a setting somewhere.

Sometimes, it seems, when new devices are introduced to the network, other devices seem to be disturbed – maybe it’s just reception or something.

If you set the log verbosity in /etc/shairport-sync.conf to 1 and enabled statistics, you’ll get some detail in the system logs.

Finally, drop over to the Shairport Sync Repository and raise an issue if you wish.

But again – hold the sacrifices! – sheesh.

Awesome! This shall be my weekend project!

Thank you so very much for all the info. This is enough to get me started on troubleshooting shairport. Once I set verbosity in shairport-sync.conf to 1 which system logs do I need to look into?

I will post my findings here as I come across them.

And don’t worry, the goat is safe… for now. :stuck_out_tongue:

If you’re on Jessie, use sudo journalctl .... If you’re on an older system it’s in /var/logs/system.log.
Good luck!

Welp, the CanaKit wifi dongle that was attached to my pi musicbox just completely died on me.

I guess you were right on the money about network issues :stuck_out_tongue:

I’ve ordered a better one so hopefully that will resolve the issues I was having with shairport.