Jump to content

Emby Android TV connection failure across subnets - trying to use wrong port


paul777

Recommended Posts

paul777

I am finding that the Android TV version running on an Android TV box won't connect across subnets/VLANs, where the "normal" Android one used on phones etc. will. While I can specify the port as 80 on the normal Android version on my phone, on the AndroidTV version I can't enter the port.

When I run tcpdump on router I can see that the Android TV version only tries port 8096 - which is only bound by Emby Server to be used from remote addresses so it won't connect from the LAN.

 

For background, I have multiple VLANs, my IoT devices (TVs, android boxes, phones etc.) live on VLAN2 (192.168.2.0/24) and my media center lives on VLAN3 (192.168.3.0/24). For phones etc. the Android app can connect to my server when I enter the name and port 80. The Android TV app however fails to connect when I enter the server name, and there is no option to enter the port.

All appropriate routing is working, as I say phones work and if I put a laptop onto VLAN20 I can connect to the web site on port 80 ok. 

 

It appears that the Android TV app is deciding that if the server ip is on a different subnet to the device it is running on then it should use the external 8096 port? That should really only be used if the server ip is not one of the private ip ranges which it should expect to be internally routed. The inability to enter the IP also means those running on custom ports can't connect.

 

Strangely my FireTV stick does something different again, it spends a good while spinning, then says it cannot connect to server "blah", then manages to connect anyway, as if it has been trying the wrong port, reports that and then tries the right one. This at least works even if it is tediously slow.

 

Any one got any ideas - do I need to wait for a fix to the connection method employed by the Android TV version so I can specify the port?

 

thanks

Paul

 

(If anyone wants to know why I have VLANs setup, it is for security. I have very little control over if/when/how all the various internet connected devices of this world are updated. Many devices will go un-patched for years exposing known exploits, TVs etc. many auto update their apps with no virus checking before running them. I see this as a security risk to my primary desktops and servers so I separate them with VLANs and hardware firewall. I expect this sort of setup to become increasingly common as people wake up to the dangers of these IoT devices we are filling our houses with)

Link to comment
Share on other sites

Hi, sorry to hear about this. What do you mean can't enter the port? The app has a manual connection screen that allows you to enter both ip address and port.

Link to comment
Share on other sites

That field should accept the port in that format.  However, the fact that it is port 80 could be a complicating factor...

Link to comment
Share on other sites

paul777

So I've made a little progress, a reboot of the android tv box seemed to clear some bad state that was making it report an instant error no matter what I tried. (mental note to self - remember rule 1 of computers - if something doesn't work reboot and try again...)

 

I then tried http://server.myhome.local:80 and on the tcp dump I saw it try to resolve server.myhouse.local.myhouse.local in dns - something is appending the domain name even when it is already a fqdn. So I then tried http://server:80 and it worked - hurray!

 

However if I quit and start the Emby app again it now behaves like the FireTV, it takes ages (c.30secs), says it has an error connecting, then connects.

If I look at the tcpdump on the router between the vlans I can see it is trying to connect to the old ip address of the emby server, taking about 30 seconds to time out then doing a dns lookup and connecting quickly. It seems that the original IP that was connected to is somehow stored and not being overwritten - in fact the emby server is on dhcp so really it doesn't want the ip address to get stored anywhere as it can change.

Link to comment
Share on other sites

paul777

I have found the slow connection to the server on start caused by trying to connect to the old ip can be fixed by deleting the applications data within Android. It then requires fresh input of the server next time and then works as expected.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...