Jump to content

AndroidTV - Reverse Proxy & Blank Ports


Recommended Posts

Posted (edited)

Hi,

I'm running Emby Server for Windows 7 (Stable) behind an Apache Reverse proxy configured with SSL & Let's Encrypt. I 'think' I have it all setup correctly as I haven't really had any issues until recently.

 

I am able to connect via web browser, Android app, and I also believe the Roku App & IOS app.  The 2 clients I seem to be unable to connect with externally are the AppleTV & AndroidTV apps.  I first noticed it on a friend's AppleTV and was able to possibly recreate the issue on AndroidTV (I haven't verified logs against AppleTV tests).

 

Using an Android Phone & AndroidTV, I attempted to connect via bad ports to see what the logs would show.  I then proceeded to try and connect on both devices using a BLANK port.  Using a blank port is generally how I connect on the Android app but the AndroidTV app seems to be leaving a colon in the string.

 

Would this be a possible bug in the AndroidTV app? (maybe even the AppleTV one as well)

Is this an issue with my Apache Reverse Proxy config?  (I'm assuming no since web browsers & phone apps work; unless I just got lucky using a blank port?)

 

Any help with this would be much appreciated.

Thanks in advance

`Nyko

 

 

#ANDROID TV - PORT 1111
2017-10-19 00:59:16.211 Info HttpServer: HTTP GET http://localhost:<local http port>/:1111/emby/system/info/public?format=json. UserAgent: Dalvik/2.1.0 (Linux; U; Android 8.0.0; Nexus Player Build/OPR6.170623.021)
2017-10-19 00:59:16.211 Error HttpServer: Could not find handler for /:1111/emby/system/info/public
2017-10-19 00:59:16.211 Info HttpServer: HTTP Response 404 to <PUB IP A>. Time: 0ms. http://localhost:<localhttp port>/:1111/emby/system/info/public?format=json 
2017-10-19 00:59:16.680 Info HttpServer: HTTP POST http://localhost:<localhttp port>/Sessions/Playing/Progress. UserAgent: Mozilla/5.0 (SX11; Linxus armv7l) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.0 Safari/537.36 CrKey/1.27.96538
2017-10-19 00:59:16.681 Info HttpServer: HTTP Response 204 to <PUB IP B>. Time: 1ms. http://localhost:<localhttp port>/Sessions/Playing/Progress 
 
 
#ANDROID APP - PORT 2222
2017-10-19 00:59:17.574 Info HttpServer: HTTP GET http://localhost:<local http port>/:2222/emby/system/info/public. UserAgent: Mozilla/5.0 (Linux; Android 6.0.1; SM-N915V Build/MMB29M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36
2017-10-19 00:59:17.574 Error HttpServer: Could not find handler for /:2222/emby/system/info/public
2017-10-19 00:59:17.575 Info HttpServer: HTTP Response 404 to <PUB IP C>. Time: 1ms. http://localhost:<localhttp port>/:2222/emby/system/info/public 
2017-10-19 00:59:26.929 Info HttpServer: HTTP POST http://localhost:<localhttp port>/Sessions/Playing/Progress. UserAgent: Mozilla/5.0 (SX11; Linxus armv7l) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.0 Safari/537.36 CrKey/1.27.96538
2017-10-19 00:59:26.930 Info HttpServer: HTTP Response 204 to <PUB IP B>. Time: 1ms. http://localhost:<localhttp port>/Sessions/Playing/Progress 
2017-10-19 00:59:36.611 Info HttpServer: HTTP POST http://localhost:<localhttp port>/Sessions/Playing/Progress. UserAgent: Mozilla/5.0 (SX11; Linxus armv7l) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.0 Safari/537.36 CrKey/1.27.96538
2017-10-19 00:59:36.612 Info HttpServer: HTTP Response 204 to <PUB IP B>. Time: 1ms. http://localhost:<localhttp port>/Sessions/Playing/Progress 
 
 
#ANDROID TV & APP - PORT BLANK (there's a few extra lines from a Chromecast device)
2017-10-19 00:59:41.839 Info HttpServer: HTTP GET http://localhost:<localhttp port> /:/emby/system/info/public?format=json. UserAgent: Dalvik/2.1.0 (Linux; U; Android 8.0.0; Nexus Player Build/OPR6.170623.021)
2017-10-19 00:59:41.839 Error HttpServer: Could not find handler for /:/emby/system/info/public
2017-10-19 00:59:41.840 Info HttpServer: HTTP Response 404 to <PUB IP A>. Time: 1ms. http://localhost:<localhttp port>/:/emby/system/info/public?format=json 
2017-10-19 00:59:43.416 Info HttpServer: HTTP GET http://localhost:<localhttp port>/emby/system/info/public. UserAgent: Mozilla/5.0 (Linux; Android 6.0.1;  SM-N915V Build/MMB29M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36
2017-10-19 00:59:43.443 Info HttpServer: HTTP Response 200 to <PUB IP C>. Time: 27ms. http://localhost:<localhttp port>/emby/system/info/public 
2017-10-19 00:59:43.513 Info HttpServer: HTTP GET http://localhost:<localhttp port>/emby/system/info/public. UserAgent: Mozilla/5.0 (Linux; Android 6.0.1;  SM-N915V Build/MMB29M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36
2017-10-19 00:59:43.540 Info HttpServer: HTTP Response 200 to <PUB IP C>. Time: 27ms. http://localhost:<localhttp port>/emby/system/info/public 
2017-10-19 00:59:43.698 Info HttpServer: HTTP GET http://localhost:<localhttp port>/users/public. UserAgent: Mozilla/5.0 (Linux; Android 6.0.1;  SM-N915V Build/MMB29M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36
2017-10-19 00:59:43.699 Info HttpServer: HTTP Response 200 to <PUB IP C>. Time: 1ms. http://localhost:<localhttp port>/users/public 
2017-10-19 00:59:43.772 Info HttpServer: HTTP GET http://localhost:<localhttp port>/Branding/Configuration. UserAgent: Mozilla/5.0 (Linux; Android 6.0.1;  SM-N915V Build/MMB29M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36
2017-10-19 00:59:43.773 Info HttpServer: HTTP Response 200 to <PUB IP C>. Time: 1ms. http://localhost:<localhttp port>/Branding/Configuration 
2017-10-19 00:59:46.615 Info HttpServer: HTTP POST http://localhost:<localhttp port>/Sessions/Playing/Progress. UserAgent: Mozilla/5.0 (SX11; Linxus armv7l) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.0 Safari/537.36 CrKey/1.27.96538
2017-10-19 00:59:46.616 Info HttpServer: HTTP Response 204 to <PUB IP B>. Time: 1ms. http://localhost:<localhttp port>/Sessions/Playing/Progress 
2017-10-19 00:59:56.766 Info HttpServer: HTTP POST http://localhost:<localhttp port>/Sessions/Playing/Progress. UserAgent: Mozilla/5.0 (SX11; Linxus armv7l) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.0 Safari/537.36 CrKey/1.27.96538
2017-10-19 00:59:56.767 Info HttpServer: HTTP Response 204 to <PUB IP B>. Time: 1ms. http://localhost:<localhttp port>/Sessions/Playing/Progress 
2017-10-19 01:00:03.691 Info HttpServer: HTTP GET http://<local emby ip>:<local http port>/emby/System/Configuration. UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36
2017-10-19 01:00:03.692 Info HttpServer: HTTP Response 200 to <local emby ip>. Time: 1ms. http://<local emby ip>:<local http port>/emby/System/Configuration 
2017-10-19 01:00:04.440 Info HttpServer: HTTP GET http://<local emby ip>:<local http port>/emby/Users/<UUID>. UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36
2017-10-19 01:00:04.441 Info HttpServer: HTTP Response 200 to <local emby ip>. Time: 1ms. http://<local emby ip>:<local http port>/emby/Users/<UUID> 
2017-10-19 01:00:04.455 Info HttpServer: HTTP GET http://<local emby ip>:<local http port>/emby/System/Logs. UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36
2017-10-19 01:00:04.457 Info HttpServer: HTTP Response 200 to <local emby ip>. Time: 3ms. http://<local emby ip>:<local http port>/emby/System/Logs 
2017-10-19 01:00:04.457 Info HttpServer: HTTP GET http://<local emby ip>:<local http port>/emby/System/Configuration. UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36
2017-10-19 01:00:04.458 Info HttpServer: HTTP Response 200 to <local emby ip>. Time: 1ms. http://<local emby ip>:<local http port>/emby/System/Configuration 
2017-10-19 01:00:05.085 Info HttpServer: HTTP GET http://<local emby ip>:<local http port>/emby/System/Logs/Log?name=server-63643971043.txt. UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36
Edited by Nyko
Posted

So it looks like all your connections are coming in on insecure connections (HTTP not HTTPS). It also sounds like the Apple TV and Android TV are connecting to your Emby server from the public Internet. Please confirm. If so, is there any other devices that can connect to your Emby server from the public Internet?

 

There is a setting in your server (server dashboard - advanced) that may be blocking HTTP (insecure) Connections from the public Internet.

 

03710602dbf212195ae1c7b10e2a0856.png

 

Also, is it possible that Apple Tv and android tv are blocking insecure connections to the public Internet themselves?

 

 

 

Sent from my iPhone using Tapatalk

Posted

Why is there a '/' before the colon depicting the port?

local http port>/:2222/emby/system/info/public
Posted

I'm assuming the HTTP is because Apache is reverse proxying from HTTPS?  I setup my Nexus Player (Android TV) on my cell hotspot in order to recreate the scenario of the AppleTV being unable to connect.  The Nexus Player works fine when local but when trying to access the server via an 'external address' it fails to connect.  I am able to connect to the external URL of my Emby Server via Android App (cell / tablet), web browser, & Roku.

 

I would like to think I setup the Apache server correctly with my SSL cert?  It seems to be secure...

 

Screen cap from web browser

 59e97b9c35361_Emby_WebBrowser.jpg

 

Also I remember when my cert expired and I had to renew around a month ago, I was able to connect still I would just get the standard warning about the expired cert.

 

In the logs the only thing I replaced were external public IP (PUB IP) and the local emby IP.  The masked entries are in <brackets> but everything else you see it what is being output in the log.  I purposely used ports 1111 (nexus player) & 2222 (cell) during the setup to see what a failed attempt looked like.  The next tests I used a blank port, which is what I commonly do to connect.  

 

I dont know why the slash is there, maybe a bad rewrite rule from Apache?  I was assuming it wasn't my vhosts file since I was able to connect via browser, android app, ios app, roku.

 

<local http port>/:2222/emby/system/info/public would be something like 192.168.4.50/:2222/emby/system/info/public

Posted

My Apache Vhosts might help to explain why its so butchered?   :unsure:

 

59e98115c3a20_apache_vhosts.jpg

Posted

local http port>/:2222/emby/system/info/public would be something like 192.168.4.50/:2222/emby/system/info/public

 

Yeah, that's not a valid address...

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...