Shairport-sync: Shairport-sync is being used by someone else.

Created on 12 Oct 2017  Â·  15Comments  Â·  Source: mikebrady/shairport-sync

I installed shairport-sync in Beagle bone black device. I followed the following link for installation:
https://github.com/mikebrady/shairport-sync.
I am having systemd init system in my device.
Sometimes I get the error: "shairport-sync is being used by someone else". Even though I am the only one using it. Sometimes a service restart works and sometimes I have to restart the Beagle bone black device. Sometimes that even does not work.. Can you help me?

Most helpful comment

Yes indeed, it is proper behaviour, but you can allow “hijacking” — In the configuration file, look for the sessioncontrol section then find the allow_session_interruption setting, uncomment it and change the setting to “yes”, save and restart Shairport Sync or reboot.

All 15 comments

Thanks for the post. Can you post the exact error message please?

It's "RaspberryPi is being used by someone else", if I'm running shairport on raspberry pi named RaspberryPi.

Every time it happens, I have to reboot the pi to make the connection clean..

If shairport is "kick-able", this issue wouldn't exist.. what parameter do I need to change to make the shairport connection kick-able by new device?

Thanks for the post. This message only should come up if Shairport Sync is or has recently been playing a stream. If the player disappears suddenly, Shairport Sync will wait for two minutes before dropping the connection. So, when these messages come up, has a previous player (maybe you yourself) been using Shairport Sync and then disappeared without signing off? What players are you using? If this is caused by you having to reconnect following a dropout, then I suggest you check your network — look at the suggestions in the TROUBLESHOOTING page.

I am having this same problem and could use some clarification. If I am playing my iphone through shairport-sync on a raspberry pi, and my wife wants to hijack the raspberry by playing her iphone on that same raspberry, she gets the message Shairport-sync is being used by someone else. Is that proper behavior? Is there a setting that lets new connections kick off the current connection?

Yes indeed, it is proper behaviour, but you can allow “hijacking” — In the configuration file, look for the sessioncontrol section then find the allow_session_interruption setting, uncomment it and change the setting to “yes”, save and restart Shairport Sync or reboot.

Thank you for your help and for all the work you've put into to shairport-sync. I greatly appreciate it and I'm having fun playing with shairport-sync to learn linux and raspberry pi.
I did as you suggested and changed allow_session_interruption to "yes". (I had to learn a lot to get that one simple thing accomplished,... nano, sudo, putty...)
Unfortunately when I test the change it seems to crash the raspberry or at least it is stopping shariport-sync. The phone says it cannot connect, all audio stops. and the shairport-sync is no longer listed as an airplay device. HEY wait a minute! I was going through the process again so I could report exactly what the phone says when everything goes south and now, it just works. I used VNC to get to the raspberry desktop, opened the "run" dialog box and typed in "shairport-sync". The shairport-sync showed up on the iphones again and it just works now. Not sure what I did wrong but thanks again for your awesome efforts.

Good work. It’s worth noting that commands and settings have to be precisely and exactly specified, otherwise they won’t work and may even prevent the whole system from working...

Sorry for late reply...
The following is the exact error message I am getting
Airplay speaker not available
"Shairport" is used by someone else

We are using Default music player in iPhone

Thanks for the update. As I wrote in the previous posts on this thread, this is usually a sign that something is wrong with your setup, usually an intermittent network problem. However, you can allow Shairport Sync to always allow a new connection, as mentioned above.

Thanks for the reply. My device is statically placed and according to me it is unlikely that it is a network issue. How can find the exact problem (intermittent network or any other). Could you please guide me?

Thanks. I suggest looking at the issues mentioned in the TROUBLESHOOTING page first, particularly the power management stuff. Have you checked these these out?

You should try the allow_session_interruption that mike mentioned and see how that goes.

I had an issue with network connect interruptions. shairport thought that device uses the shairport, but it was disconnected in fact. i tried reconnect, but shairport did not allowing it.

@mikebrady, Thank you, this workaround was helpful for me
/etc/shairport-sync.conf:

//      allow_session_interruption = "no"; // set to "yes" to allow another device to interrupt Shairport Sync while it's playing from an existing audio source
allow_session_interruption = "yes";

Pretty sure this has been addressed in more recent versions of Shairport Sync! Closing this inactive issue. Please open a new one if necessary.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jeong840 picture jeong840  Â·  3Comments

PaulWieland picture PaulWieland  Â·  8Comments

fundix picture fundix  Â·  3Comments

PeterPablo picture PeterPablo  Â·  8Comments

ContraVarus picture ContraVarus  Â·  7Comments