I am trying to follow the setup guideline for the airplay speaker project (https://docs.onion.io/omega2-project-book-vol1/airplay-audio-receiver.html) but can't seem to work anymore.
So I successfully set it up on a different wifi network once, but then when I tried to use it somewhere else it stopped working. I knew I need to change the wifi setup, which I did too. I kinda wanted to get it down quickly so I thought I will just reformat it and then try to redo every step again, but then I couldn't make it work again.
When I started the service at the last step with shairport-sync -d
, I couldn't see it on my iPhone. So first I checked if the daemon is running with ps | grep shair
which showed it runs:
1887 root 4360 S /usr/bin/shairport-sync -c /var/etc/shairport-sync-shairport_sync.conf
2029 root 1216 S grep shair
Then I checked the following too: shairport-sync -v
alsa output device name is "default".
Version: "3.1.6-mbedTLS-tinysvcmdns-ALSA-metadata-sysconfdir:/etc"
statistics_requester status is 0.
daemon status is 0.
deamon pid file is "/var/run/shairport-sync/shairport-sync.pid".
rtsp listening port is 5000.
udp base port is 6001.
udp port range is 100.
player name is "Omega-AB33".
backend is "(null)".
on-start action is "(null)".
on-stop action is "(null)".
wait-cmd status is 0.
on-start returns output is 0.
mdns backend "(null)".
stuffing option is "0" (0-basic, 1-soxr).
resync time is 0.050000 seconds.
allow a session to be interrupted: 0.
busy timeout time is 120.
drift tolerance is 0.001995 seconds.
password is "(null)".
ignore_volume_control is 0.
volume_max_db is not set
playback_mode is 0 (0-stereo, 1-mono, 1-reverse_stereo, 2-both_left, 3-both_right).
disable_synchronization is 0.
use_mmap_if_available is 1.
output_rate is 44100.
output_format is 3 (0-unknown, 1-S8, 2-U8, 3-S16, 4-S24, 5-S24_3LE, 6-S24_3BE, 7-S32).
audio backend desired buffer length is 0.150000 seconds.
audio backend latency offset is 0.000000 seconds.
audio backend silence lead-in time is -1.000000 seconds. A value -1.0 means use the default.
volume range in dB (zero means use the range specified by the mixer): 0.
zeroconf regtype is "_raop._tcp".
decoders_supported field is 1.
use_apple_decoder is 0.
alsa_use_playback_switch_for_mute is 0.
no special mdns service interface was requested.
configuration file name "/etc/shairport-sync.conf" resolves to "/etc/shairport-sync.conf".
metadata enabled is 0.
metadata pipename is "(null)".
metadata socket address is "(null)" port 0.
metadata socket packet size is "500".
get-coverart is 0.
loudness is 0.
loudness reference level is -20.000000
Successful Startup
Unable to listen on IPv4 port 5000. The error is: "Address in use".
Unable to listen on IPv6 port 5000. The error is: "Address in use".
fatal error: Could not establish a service on port 5000 -- program terminating. Is another instance of Shairport Sync running on this device?
Request to shut down all rtsp conversation threads
asking playing threads to stop
So I could see there was some issues and couldn't start properly and has to do with port 5000. Then I wanted to check if something else maybe running on port 5000, so I did: netstat -nlp
, which resulted the following:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:5000 0.0.0.0:* LISTEN 1887/shairport-sync
tcp 0 0 0.0.0.0:4200 0.0.0.0:* LISTEN 1777/shellinaboxd
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 1294/uhttpd
tcp 0 0 192.168.100.128:53 0.0.0.0:* LISTEN 1836/dnsmasq
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 1836/dnsmasq
tcp 0 0 192.168.3.1:53 0.0.0.0:* LISTEN 1836/dnsmasq
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1258/dropbear
tcp 0 0 0.0.0.0:1883 0.0.0.0:* LISTEN 1589/mosquitto
tcp 0 0 :::5000 :::* LISTEN 1887/shairport-sync
tcp 0 0 :::9001 :::* LISTEN 1589/mosquitto
tcp 0 0 :::80 :::* LISTEN 1294/uhttpd
tcp 0 0 ::1:53 :::* LISTEN 1836/dnsmasq
tcp 0 0 fe80::42a3:6bff:fec0:ab35:53 :::* LISTEN 1836/dnsmasq
tcp 0 0 fe80::42a3:6bff:fec0:ab33:53 :::* LISTEN 1836/dnsmasq
tcp 0 0 fd1d:48c4:7633::1:53 :::* LISTEN 1836/dnsmasq
tcp 0 0 fe80::42a3:6bff:fec0:ab33:53 :::* LISTEN 1836/dnsmasq
tcp 0 0 fe80::42a3:6bff:fec0:ab34:53 :::* LISTEN 1836/dnsmasq
tcp 0 0 :::22 :::* LISTEN 1258/dropbear
udp 0 0 192.168.100.128:53 0.0.0.0:* 1836/dnsmasq
udp 0 0 127.0.0.1:53 0.0.0.0:* 1836/dnsmasq
udp 0 0 192.168.3.1:53 0.0.0.0:* 1836/dnsmasq
udp 0 0 0.0.0.0:67 0.0.0.0:* 1836/dnsmasq
udp 0 0 0.0.0.0:5353 0.0.0.0:* 1887/shairport-sync
udp 0 0 0.0.0.0:5353 0.0.0.0:* 1443/avahi-daemon:
udp 0 0 :::547 :::* 1194/odhcpd
udp 0 0 ::1:53 :::* 1836/dnsmasq
udp 0 0 fe80::42a3:6bff:fec0:ab35:53 :::* 1836/dnsmasq
udp 0 0 fe80::42a3:6bff:fec0:ab33:53 :::* 1836/dnsmasq
udp 0 0 fd1d:48c4:7633::1:53 :::* 1836/dnsmasq
udp 0 0 fe80::42a3:6bff:fec0:ab33:53 :::* 1836/dnsmasq
udp 0 0 fe80::42a3:6bff:fec0:ab34:53 :::* 1836/dnsmasq
udp 0 0 :::5353 :::* 1443/avahi-daemon:
raw 0 0 ::%1:58 ::%4460556:* 58 1194/odhcpd
raw 0 0 ::%1:58 ::%4460556:* 58 1194/odhcpd
I really don't know what is going on and why is it not deploying properly.
I am using an Omega2 with an Expansion Dock.
I also edited the config file at /etc/config/shairport-sync
like :
# Use OpenWrt UCI config
config shairport-sync 'shairport_sync'
option enabled '1'
option respawn '1'
...
option name 'Shairport-Sync-%v-%h'
option password ''
...
option mdns_backend 'tinysvcmdns' # avahi/external-avahi/dns-sd/external-dns-sd/tinysvcmdns
Does anyone have some ideas or suggestions how can I resolve the issue with port 5000? I tried to google it, but nothing useful came up.