OpenELEC / OpenELEC.tv

OpenELEC - The living room PC for everyone
http://openelec.tv
1.61k stars 881 forks source link

1.95.4 - Airplay doesn't work when booting from iSCSI #766

Closed jlesage closed 12 years ago

jlesage commented 12 years ago

I installed OpenELEC to boot from iSCSI using this guide: http://wiki.openelec.tv/index.php?title=Network_Boot_-_iSCSI

Everything works fine exept Airplay: OpenELEC is not seen at all by my Apple devices. Airplay is enabled in XBMC without password.

However, when I run OpenELEC (same version) from USB, Airplay works fine.

I use the ION build on my Asrock ION 330.

I can provide more information, just tell me what is required to start the investigation.

lrusak commented 12 years ago

Same thing for me, ISCSI PXE boot but I'm on the generic build

Here is my logfile with turned on.

http://pastebin.com/rCN3pJir

sraue commented 12 years ago

its still a issue with Beta 7 ?

lrusak commented 12 years ago

Yes, It still doesn't work for me

aaronhurt commented 12 years ago

I think I have this same issue with 2.0b7 pxe booted intel atom ... I found if I ssh into the box and killall avahi-daemon then restart it with the avahi-daemon init.d script that it starts advertising airplay and my devices can see and use it.

Could you confirm if this works for you as well?

aaronhurt commented 12 years ago

This may be just an avahi issue and/or a startup order issue that needs a bit of tweeking

lrusak commented 12 years ago

I tried killing avahi-daemon and restarting but it was a no go for me.

aaronhurt commented 12 years ago

That's odd ... I have been using airplay since my last post very reliably by just killing avahi-daemon once xmbc is up and then restarting it after a couple of seconds. Do you have another machine you can use to check the advertisements? .... example below from my home freebsd server when I do killall avahi-daemon; sleep 2; sh /etc/init.d/53_avahi on the openelec box (it's called 'mediabox')

-    em0 IPv4 mediabox [90:fb:a6:2e:50:8a]                  _workstation._tcp    local
-    em0 IPv4 XBMC (mediabox)                               _xbmc-events._udp    local
-    em0 IPv4 XBMC (mediabox)                               _xbmc-jsonrpc-h._tcp local
-    em0 IPv4 XBMC (mediabox)                               _xbmc-jsonrpc._tcp   local
-    em0 IPv4 XBMC (mediabox)                               _xbmc-web._tcp       local
-    em0 IPv4 XBMC (mediabox)                               _http._tcp           local
-    em0 IPv4 XBMC (mediabox)                               _airplay._tcp        local
-    em0 IPv4 90FBA62E508A@XBMC (mediabox)                  _raop._tcp           local
-    em0 IPv4 Web Server on mediabox                        _http._tcp           local
-    em0 IPv4 mediabox                                      _sftp-ssh._tcp       local
-    em0 IPv4 mediabox                                      _ssh._tcp            local
+    em0 IPv4 mediabox [90:fb:a6:2e:50:8a]                  _workstation._tcp    local
+    em0 IPv4 Web Server on mediabox                        _http._tcp           local
+    em0 IPv4 mediabox                                      _sftp-ssh._tcp       local
+    em0 IPv4 mediabox                                      _ssh._tcp            local
+    em0 IPv4 XBMC (mediabox)                               _airplay._tcp        local
+    em0 IPv4 90FBA62E508A@XBMC (mediabox)                  _raop._tcp           local
+    em0 IPv4 XBMC (mediabox)                               _xbmc-events._udp    local
+    em0 IPv4 XBMC (mediabox)                               _xbmc-jsonrpc-h._tcp local
+    em0 IPv4 XBMC (mediabox)                               _xbmc-jsonrpc._tcp   local
+    em0 IPv4 XBMC (mediabox)                               _xbmc-web._tcp       local
+    em0 IPv4 XBMC (mediabox)                               _http._tcp           local

You can see _airplay._tcp stop and start there .... the first time I did it airplay was NOT listed in the stop but it did startup when I restarted avahi-daemon ... make sure you have it checked in the xbmc options and restart xbmc and let it come all the way up before sshing into the box and restarting avahi.

FYI ... I just did an: 'avahi-browse -a' on the other machine

lrusak commented 12 years ago

When I did that on my openelec machine nothing showed up :/ but when I did it on my rpi everything appeared.

-   eth3 IPv4 openelec [b8:27:eb:80:88:a8]                  Workstation          local
-   eth3 IPv4 LUKES-RPI                                     Microsoft Windows Network local
-   eth3 IPv4 XBMC (lukes-RPi)                              _xbmc-events._udp    local
-   eth3 IPv4 XBMC (lukes-RPi)                              _xbmc-jsonrpc-h._tcp local
-   eth3 IPv4 XBMC (lukes-RPi)                              _xbmc-jsonrpc._tcp   local
-   eth3 IPv4 XBMC (lukes-RPi)                              _xbmc-web._tcp       local
-   eth3 IPv4 XBMC (lukes-RPi)                              _airplay._tcp        local
-   eth3 IPv4 XBMC (lukes-RPi)                              Web Site             local
-   eth3 IPv4 B827EB8088A8@XBMC (lukes-RPi)                 AirTunes Remote Audio local
-   eth3 IPv4 Web Server on openelec                        Web Site             local
-   eth3 IPv4 openelec                                      SFTP File Transfer   local
-   eth3 IPv4 openelec                                      SSH Remote Terminal  local
+   eth3 IPv4 lukes-RPi [b8:27:eb:80:88:a8]                 Workstation          local
+   eth3 IPv4 Web Server on lukes-RPi                       Web Site             local
+   eth3 IPv4 lukes-RPi                                     SFTP File Transfer   local
+   eth3 IPv4 lukes-RPi                                     SSH Remote Terminal  local
+   eth3 IPv4 LUKES-RPI                                     Microsoft Windows Network local
+   eth3 IPv4 XBMC (lukes-RPi)                              _airplay._tcp        local
+   eth3 IPv4 B827EB8088A8@XBMC (lukes-RPi)                 AirTunes Remote Audio local
+   eth3 IPv4 XBMC (lukes-RPi)                              _xbmc-events._udp    local
+   eth3 IPv4 XBMC (lukes-RPi)                              _xbmc-jsonrpc-h._tcp local
+   eth3 IPv4 XBMC (lukes-RPi)                              _xbmc-jsonrpc._tcp   local
+   eth3 IPv4 XBMC (lukes-RPi)                              _xbmc-web._tcp       local
+   eth3 IPv4 XBMC (lukes-RPi)                              Web Site             local

Soo I don't know what the issue is. I iscsi boot from my freenas server using an ipxe usb key.

I'm going to say this isn't an airplay issue but probably an entire avahi issue. Perhaps my machine cannot pass mdns via iscsi boot but I have installed openelec on a hard disk in the exactly same hardware and it works fine :/

What else can I try?

lrusak commented 12 years ago

holy crap I just got it to work.

so, i checked ifconfig to see if it showed anything there, and it showed this

root ~ # ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0E:0C:07:A9:87  
          inet addr:192.168.1.106  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20e:cff:fe07:a987/64 Scope:Link
          UP BROADCAST RUNNING  MTU:1500  Metric:1
          RX packets:375788 errors:0 dropped:0 overruns:0 frame:0
          TX packets:279093 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:413423743 (394.2 MiB)  TX bytes:56830202 (54.1 MiB)

eth1      Link encap:Ethernet  HWaddr 6C:62:6D:38:70:E4  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:42 Base address:0x8000

So i wondered why it said MULTICAST for eth1 and not eth0. so I did the command

ifconfig eth0 multicast

then checked ifconfig again

root ~ # ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:0E:0C:07:A9:87  
          inet addr:192.168.1.106  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20e:cff:fe07:a987/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:411845 errors:0 dropped:0 overruns:0 frame:0
          TX packets:283297 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:445176229 (424.5 MiB)  TX bytes:60080401 (57.2 MiB)

then executed

killall avahi-daemon; sleep 2; sh /etc/init.d/53_avahi

and bam it showed up immediatley on my iphone. I don't know why it's not doing this on it's own but that's a different issue.

So maybe I'll try and start avahi later via the init.d scripts and see if it changes. Thanks

lrusak commented 12 years ago

so, to fix this I just added

ifconfig eth0 multicast

to autostart.sh, I don't even need to restart avahi.

aaronhurt commented 12 years ago

very nice ... good catch

aaronhurt commented 12 years ago

Well I finally got around to fresh doing a complete power down and reboot of my mediabox and it actually comes up already with multicast enabled and airplay was still offline ... but just bouncing avahi fixes it ... my autostart.sh below

autostart.sh

#!/bin/sh
(sleep 30; \
killall avahi-daemon; sleep 2; sh /etc/init.d/53_avahi; \
) > /dev/null 2>&1 & 
lrusak commented 12 years ago

Please retest with RC1

aaronhurt commented 12 years ago

PXE boot with NFS root is working as expected for me with 1.99.1 downloaded from the main site without needing to bounce avahi or doing anything else out of the ordinary.