mikebrady / shairport-sync

AirPlay and AirPlay 2 audio player
Other
7.17k stars 569 forks source link

Shairport enabled ubuntu 20.04 pc missing not showing up on ios 14.6 and 14.7 #1248

Closed s3vhub closed 3 years ago

s3vhub commented 3 years ago

Hi,

On my pc on 17th July i had installed Linux mint 20.04.In that once installed my pc was visible to my iphone as airplay device but as audio wasnt there even after trying all the troubleshooting steps i had to install pulse audio.It worked but i wanted to find out issue with alsa.So uninstalled pulse and reinstalled alsa.The whole cinnamon desktop crashed and so i now installed ubuntu 20.04LTS. ISSUE:- On 20.04 LTS since 19th july i am unable to find my PC as an airplay device as opposed to the linux mint version in which case it showed up seamlessly. I have tried many ways but it isnt working.Did all thats mentioned in read.me file.Didnt work. With everything else on the network constant other than the OS i fail to understand why the pc doesnt show up as airplay device on my iphone which was on 14.6 on 19th july and currently since today on 14.7.

Please find the o/p of

sudo systemctl status shairport-sync

shairport-sync.service - ShairportSync AirTunes receiver Loaded: loaded (/lib/systemd/system/shairport-sync.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2021-07-20 09:22:15 IST; 28min ago Docs: man:shairport-sync(7) file:///usr/share/doc/shairport-sync/README.md.gz https://github.com/mikebrady/shairport-sync Main PID: 916 (shairport-sync) Tasks: 9 (limit: 18993) Memory: 4.3M CGroup: /system.slice/shairport-sync.service └─916 /usr/bin/shairport-sync

Jul 20 09:22:15 ubuntupc systemd[1]: Started ShairportSync AirTunes receiver.

s3vhub commented 3 years ago

any help would be appreciated

mikebrady commented 3 years ago

Thanks for the post. Please take a look at TROUBLESHOOTING and REPORTING ISSUES -- there might be something there that could help you.

s3vhub commented 3 years ago

Thanks for the post. Please take a look at TROUBLESHOOTING and REPORTING ISSUES -- there might be something there that could help you.

Thanks for the reply Mike.I had done everything on the troubleshooting page with not much luck.However the thread in the reporting issues..i will follow that once again.It may not be of much help in my case but let me try again and will revert with my findings.

I believe its something to do with ubuntu 20.04,shairport and the network as if it had been just the ntw then it wouldnt have worked with linux mint on my machine just two days ago.I just am unable to find the root cause for it.

s3vhub commented 3 years ago

done everything i could with no luck.I even did reinstall ubuntu 20.04 multiple times and checked to reverse any changes.

On the current install i get this

$ shairport-sync -v
         0.000266362 "shairport.c:1626" Started!
         0.000033783 "shairport.c:1638" software version: "3.3.5-libdaemon-OpenSSL-Avahi-ALSA-pa-dummy-stdout-pipe-soxr-convolution-metadata-mqtt-dbus-mpris-sysconfdir:/etc"
         0.000004119 "shairport.c:1644" log verbosity is 1.
         0.000005530 "audio_alsa.c:1018" alsa: alsa_maximum_stall_time of 0.200000 sec.
         0.000029791 "audio_alsa.c:1300" alsa: disable_standby_mode is "never".
         0.000003115 "audio_alsa.c:1304" alsa: disable_standby_mode_silence_threshold is 0.040000 seconds.
         0.000003205 "audio_alsa.c:1306" alsa: disable_standby_mode_silence_scan_interval is 0.004000 seconds.
         0.000005669 "audio_alsa.c:1346" alsa: output device name is "default".
         0.000066848 "shairport.c:1692" disable resend requests is off.
         0.000006486 "shairport.c:1693" diagnostic_drop_packet_fraction is 0.000000. A value of 0.0 means no packets will be dropped deliberately.
         0.000017128 "shairport.c:1696" statistics_requester status is 0.
         0.000002747 "shairport.c:1698" daemon status is 0.
         0.000003068 "shairport.c:1699" daemon pid file path is "/run/shairport-sync/shairport-sync.pid".
         0.000002802 "shairport.c:1701" rtsp listening port is 5006.
         0.000002664 "shairport.c:1702" udp base port is 6001.
         0.000002642 "shairport.c:1703" udp port range is 10.
         0.000002619 "shairport.c:1704" player name is "Homepc".
         0.000020159 "shairport.c:1705" backend is "(null)".
         0.000002909 "shairport.c:1706" run_this_before_play_begins action is "(null)".
         0.000004865 "shairport.c:1707" run_this_after_play_ends action is "(null)".
         0.000002803 "shairport.c:1708" wait-cmd status is 0.
         0.000003533 "shairport.c:1709" run_this_before_play_begins may return output is 0.
         0.000002948 "shairport.c:1710" run_this_if_an_unfixable_error_is_detected action is "(null)".
         0.000003535 "shairport.c:1711" run_this_before_entering_active_state action is  "(null)".
         0.000002925 "shairport.c:1712" run_this_after_exiting_active_state action is  "(null)".
         0.000003051 "shairport.c:1713" active_state_timeout is  10.000000 seconds.
         0.000004386 "shairport.c:1714" mdns backend "(null)".
         0.000004531 "shairport.c:1716" interpolation setting is "auto".
         0.000003820 "shairport.c:1719" interpolation soxr_delay_threshold is 30.
         0.000002963 "shairport.c:1720" resync time is 0.050000 seconds.
         0.000003558 "shairport.c:1721" allow a session to be interrupted: 0.
         0.000003690 "shairport.c:1722" busy timeout time is 120.
         0.000003663 "shairport.c:1723" drift tolerance is 0.001995 seconds.
         0.000003895 "shairport.c:1724" password is "(null)".
         0.000003802 "shairport.c:1725" ignore_volume_control is 0.
         0.000003778 "shairport.c:1729" volume_max_db is not set
         0.000004907 "shairport.c:1730" volume range in dB (zero means use the range specified by the mixer): 0.
         0.000004474 "shairport.c:1732" volume_range_combined_hardware_priority (1 means hardware mixer attenuation is used first) is 0.
         0.000006462 "shairport.c:1735" playback_mode is 0 (0-stereo, 1-mono, 1-reverse_stereo, 2-both_left, 3-both_right).
         0.000005534 "shairport.c:1737" disable_synchronization is 0.
         0.000004642 "shairport.c:1738" use_mmap_if_available is 1.
         0.000004154 "shairport.c:1739" output_format automatic selection is enabled.
         0.000006616 "shairport.c:1743" output_rate automatic selection is enabled.
         0.000003311 "shairport.c:1747" audio backend desired buffer length is 0.200000 seconds.
         0.000004701 "shairport.c:1749" audio_backend_buffer_interpolation_threshold_in_seconds is 0.120000 seconds.
         0.000004684 "shairport.c:1751" audio backend latency offset is 0.000000 seconds.
         0.000004405 "shairport.c:1752" audio backend silence lead-in time is -1.000000 seconds. A value -1.0 means use the default.
         0.000004896 "shairport.c:1754" zeroconf regtype is "_raop._tcp".
         0.000004201 "shairport.c:1755" decoders_supported field is 1.
         0.000004581 "shairport.c:1756" use_apple_decoder is 0.
         0.000004698 "shairport.c:1757" alsa_use_hardware_mute is 0.
         0.000004441 "shairport.c:1761" no special mdns service interface was requested.
         0.000008148 "shairport.c:1764" configuration file name "/etc/shairport-sync.conf" resolves to "/etc/shairport-sync.conf".
         0.000005239 "shairport.c:1771" metadata enabled is 1.
         0.000004517 "shairport.c:1772" metadata pipename is "/tmp/shairport-sync-metadata".
         0.000004167 "shairport.c:1773" metadata socket address is "(null)" port 0.
         0.000004700 "shairport.c:1775" metadata socket packet size is "500".
         0.000004508 "shairport.c:1776" get-coverart is 1.
         0.000004067 "shairport.c:1779" mqtt is disabled.
         0.000004107 "shairport.c:1780" mqtt hostname is (null), port is 1883.
         0.000004489 "shairport.c:1781" mqtt topic is /Homepc.
         0.000004518 "shairport.c:1782" mqtt will not publish raw metadata.
         0.000004028 "shairport.c:1783" mqtt will not publish parsed metadata.
         0.000004051 "shairport.c:1784" mqtt will not publish cover Art.
         0.000004497 "shairport.c:1785" mqtt remote control is disabled.
         0.000003996 "shairport.c:1789" convolution is 0.
         0.000004090 "shairport.c:1790" convolution IR file is "(null)"
         0.000004430 "shairport.c:1791" convolution max length 8192
         0.000004067 "shairport.c:1792" convolution gain is 0.000000
         0.000004591 "shairport.c:1794" loudness is 0.
         0.000004346 "shairport.c:1795" loudness reference level is -20.000000
         0.000675330 "rtsp.c:2598" unable to listen on IPv4 port 5006. The error is: "Address already in use".
         0.000020170 "rtsp.c:2598" unable to listen on IPv6 port 5006. The error is: "Address already in use".
         0.000085698 "rtsp.c:2729" *warning: could not establish a service on port 5006 -- program terminating. Is another instance of Shairport Sync running on this device?

seeing the port stuff in the second last line i did edit config file and set port to 5006 after this same error was thrown for port 5005.However same issue. Any idea?or i would have to ditch ubuntu and move back to linux mint

mikebrady commented 3 years ago

Thanks. The log above indicates that Shairport Sync was already running as a daemon in the background when you tried to run another copy of it from the command line. Those ports are already in use because the daemon version of Shairport Sync has already started. In fact, it looks like the daemon version is running fine. It should appear as Homepc.

It is extremely unlikely that Ubuntu 20.04 is the cause of any problems -- it's been used to develop Shairport Sync.

Is the IP number it gets in the same subnet as the iPhone? (If it's a VM it might be in a different subnet.) Does it have a firewall running? Does the router have a firewall running? Have you tried using Discovery on the iPhone and avahi-browse on Ubuntu to see if mDNS is working?

s3vhub commented 3 years ago

Thanks. The log above indicates that Shairport Sync was already running as a daemon in the background when you tried to run another copy of it from the command line. Those ports are already in use because the daemon version of Shairport Sync has already started. In fact, it looks like the daemon version is running fine. It should appear as Homepc.

It is extremely unlikely that Ubuntu 20.04 is the cause of any problems -- it's been used to develop Shairport Sync.

Is the IP number it gets in the same subnet as the iPhone? (If it's a VM it might be in a different subnet.) Does it have a firewall running? Does the router have a firewall running? Have you tried using Discovery on the iPhone and avahi-browse on Ubuntu to see if mDNS is working?

This will sound damn crazy.moved back to mint again.same issue.Now my home braodband wifi missing there too. So just out of curiosity switched on mobile hotspot and connected by PC to it and bam..the pc was discoverable. So moved back both again to my home wifi.No luck.Again PC dissapears unlike yesterday. all this time the "discovery app" is running on my phn. Issue:- 1.Iphone and PC on my home wifi.discovery app keeps searching.nothing there. 2.Now move both to my mobile hotspot.The pc appears as airplay device.Discovery app shows the entries as expected.

firewalls been disabled all the time.i have henceforth added the exceptions.

I restarted my fiber modem+router.Still no luck when on home wifi.

You are right.Its neither ubuntu nor mint.what i cant figure out is this as to why yesterday it worked seamlessly on my home wifi but today not at all.havent changed anythng on router etc.Why its working on mobile hotspot but not on wifi.

i did avahi-browse -a. now it shows on hotspot

however on the wifi

Edit:- fixed on linux mint.It was the mac address binding hidden under the menu which was hard to find.refreshed and cleared out.That seems to have fixed it.Next let me go back and try this on ubuntu

s3vhub commented 3 years ago

Hi Mike, Sorry for the trouble.was able to spot the issue.Actually its the mobile hotspot that let me narrow it down. Removed the binding of the previous pc name before the uninstall of linux mint.Clearing and refreshing that on the ONU router fixed the issue.Installed ubuntu 20.04 LTS now and it works seamlessly now.

mikebrady commented 3 years ago

Yikes, it's great that you found the problem. Happy listening.