Jump to content

Cant connect to server on port 443


darkassassin07

Recommended Posts

darkassassin07

I have emby behind an nginx proxy and have for at least 6 months now. Im mainly connected from work playing music all day, and haven't had any issues in a while. (there has been absolutely no changes to config or anything between it working last and now)

 

Today I came back to work and suddenly my android app will not connect to my server.

Https://emby.mydomain.com (port 443) leads to my server and works perfectly through chrome on the same device+wifi, however if I try and add that info as a new server (i removed the old one when it wasnt working) in the android app it immediately says 'could not connect to server' with no delay. It pops up as soon as I hit the button.

 

If I enter a different port number (one I know im not using) it at least gives me a loading wheel for a couple secs then says couldn't connect.

 

I believe the android app updated in the last couple days. This is the first time I have been on WAN since that update.

 

/edit:

 

It also appears the android app isnt even attempting to connect to the correct host+port as there is nothing at all in the nginx access log.

Removing 'https://' from the 'host' field the app attempts to connect to emby.mydomain.com on port 443 using http (which is given http:400 response as I dont support plain http from wan)

If I put the full 'https://emby.mydomain.com' in host and keep port 443, it refuses to even try to connect. Nginx sees no incoming connection at all, and the app presents a 'failed to connect' screen immediately.

 

Emby server (on win 10 pro) 4.0.3.0

Emby for android 3.0.42

Android 8.0.0

Edited by darkassassin07
Link to comment
Share on other sites

darkassassin07

I am getting this exact same behavior regardless of how/where I'm connecting from.

 

Work wifi, cellular data, a friends wifi, my own lan (router provides correct lan ip through dnsmasq for my domain). If I give the app https and port 443, it doesn't even send a request to the server before saying 'couldn't connect'. Chrome on the same device has no problems connecting at all.

Edited by darkassassin07
Link to comment
Share on other sites

darkassassin07

Works perfectly from the device I'm having trouble on and chrome browser.

Edited by darkassassin07
Link to comment
Share on other sites

darkassassin07

Now that im on wan, app.emby.media is just giving me a perpetual loading wheel when loading the list of users

Link to comment
Share on other sites

darkassassin07

Ok...

Again I haven't changed anything:

 

Im currently at work and have been busy the last couple hrs. I just now opened my app again and was greeted by my home page.

 

Signing back out, then attempting to re-connect works fine, I get my home page again and streaming works fine too.

 

 

Https://app.emby.media gives me a solid black page with nothing else on it after a 1 sec loading wheel.

 

 

 

I dont understand what could be causing this...

Edited by darkassassin07
Link to comment
Share on other sites

darkassassin07

Back on LAN again, my app is working and the direct link still works in chrome as it always has, however https://app.emby.media in chrome does not work anymore. It just gives me a solid black screen after 1 second of loading wheel.

 

This behavior is currently the same for both LAN/WAN

Edited by darkassassin07
Link to comment
Share on other sites

darkassassin07

I have just ignored it for a couple days and functionality seems to have gone back to normal for now. The android app, direct link, and app.emby.media seem to all load again.

 

It just seems strange because I still haven't changed anything. I don't know what would have caused only one of the three methods to stop working at a time while the other two continue to work just fine despite all three methods taking the same route to the server (domain name > reverse proxy > emby).

 

And then to have the app failing to connect to any host on port 443 without even waiting long enough for a single request to timeout, while the server sees no incoming request at all.

 

Anyway, it's all working now so I guess I'll leave it at that.

Link to comment
Share on other sites

Ninko

I'm having the exact same problem.

Can port 443 not be used to connect with the Android app?

Link to comment
Share on other sites

I'm having the exact same problem.

Can port 443 not be used to connect with the Android app?

Hi, yes it can be used. Can you please describe your problem in more detail? Thanks !

Link to comment
Share on other sites

  • 2 weeks later...
darkassassin07

This problem has suddenly come back for me:

 

Using my domain name to connect via Chrome mobile works fine.

 

Using app.emby.media in chrome mobile works just fine as well.

 

Open my android app, and it gives me a list of servers instead of my dashboard as usual. Click on my server and select 'connect', it tries for a short while then says 'failed to connect'

 

 

If I delete my server from the list displayed in the app, then try to manually connect entering my https://mydomain.com into 'host:' and 443 into 'port:' and it immediately with no delay at all says 'failed to connect'.

 

 

 

This behavior is the exact same for both wifi and mobile data connecting via wan.

 

 

 

/edit as before, I haven't made any real changes to emby. In the last couple days I have moved the metadata/cache folders around and moved a bit of media. Thats it.

Edited by darkassassin07
Link to comment
Share on other sites

darkassassin07

24hrs later, Im getting the same results:

 

Im connected to the internet via a wifi connection outside my local network.

If I open chrome mobile and try my domain name or app.emby.media I get connected to my server as I should.

 

If I open my android app, it displays the select a server page instead of connecting. Clicking on my server in the list and clicking connect gives me the message 'unable to connect to the selected server right now'.

 

If I remove my server from that list and attempt to re-add it manually entering my domain into 'host:' and 443 into 'port:' it gives me the same connection failure message, but this time without waiting any delay for an http request to timeout.

 

 

Signing in to the app with emby connect re-adds my server to the server list but still doesnt allow me to connect to it.

 

 

 

These same results happen any time im outside my local network. Connecting while on lan works fine.

Edited by darkassassin07
Link to comment
Share on other sites

darkassassin07

I am running android 3.0.46

 

I have another user running 3.0.45 that is not having this problem. (both devices are Motorola z2 play with android 8.0.0, just running different versions of the app)

Edited by darkassassin07
Link to comment
Share on other sites

darkassassin07

@@Luke

 

Have I done something to earn the 'cold shoulder' from you? Have I wronged you in some way that I'm not aware of?

 

 

Why is this thread being totaly ignored.... Because of this, what I assume is a bug in the latest beta release, I am unable to use the android app on my phone at all. That particular client is, by a long way, the most active client on my server.

Link to comment
Share on other sites

KMBanana

Are you using a subfolder like /emby after the url?

Are you typing in the full address including https:// when adding the server?

Have you tried using the full https:// address and leaving the port field blank? 

Link to comment
Share on other sites

darkassassin07

I am not using a sub directory, only a sub domain (ie https://emby.example.domain just like that).

 

I am typing the full address including the scheme (https://)

 

 

I hadn't until now:

 

I just now tried to connect using

Host:https://emby.domain.example

Port: 443

And got the exact same results as above.

I then tried using the same host but left port blank, and got a connection to my server. Now when I log out, change server, remove my server from that list, then manually re-add it using Host:https://emby.domain.example

Port: 443

I no longer have any issues.

 

 

Thank you @@KMBanana for taking the time to reply and give me something to try. I really appreciate it.

 

 

 

 

I still dont know what has been causing this problem, but its now happened twice a couple weeks appart so it's not a complete fluke.

 

Probably at least something to look into @@Luke

Edited by darkassassin07
  • Like 1
Link to comment
Share on other sites

octvcdrc

Many many thanks !

 

I had the exact same issue since a couple of weeks and thought i had misconfigured something.

Your trick to delete the server & re-add it without specifying the port fixed the issue for me.

 

If it is useful for debug purposes :

 

Emby server on linux version 4.0.2.0

Emby app 3.0.45 on Android 8.0.0

 

Emby server is behind a reverse proxy (haproxy) which connects to emby server using http.

 

I had no issue viewing the list of media & downloading them (even transcoding)... just the streaming didn't work. The Emby server log didn't show anything useful.

Edited by octvcdrc
Link to comment
Share on other sites

  • 3 weeks later...
darkassassin07

Well, this was working again but I just went to open the app and got a server list instead of my homepage.

 

Click on my server and click connect and I get a 'could not connect' message. I then deleted the server from the list and tried to re-add it using

Host: https://emby.mydomain.com

Port: 443

Same thing, 'could not connect'

 

I then tried leaving the port field blank,

Exact same thing. 'could not connect'

 

 

 

I can still access my server directly just fine with a browser and my domain, as well as via app.emby.media

Link to comment
Share on other sites

darkassassin07

Im actually thinking this could be a dns issue.

 

While on my local network emby.mydomain.com resolves to the local ip of my emby server. Outside my lan, it resolves to a cloudflare ip which proxies the connection to my nginx server and then to my emby server.

 

 

Is emby for android caching the dns results at all? If its remembering the lan ip and not performing a dns request to get the wan ip when the network changes, it would try to connect to an unrelated lan device on my current network (a network seprate from my own lan) which would refuse the connection.

 

 

 

 

That's the only explanation I can think of for why there would be almost no delay at all when it tries and fails to connect. Its trying to connect to the wrong ip, and that ip leads to an accessible device which is refusing the connection.

 

 

 

/edit: is there a good way I could see what ip emby for android is trying to connect to?

Edited by darkassassin07
Link to comment
Share on other sites

darkassassin07

Ok, so I got home and was able to connect via lan just fine however if I turned off my wifi switching to mobile data I was still unable to connect (still with nodelay at all)

 

I tried removing app from recent apps, as well as opening the apps details in android settings and 'force stop'ing it.

I then tried again to connect but had the same results.

 

Then I force stopped it again, but this time cleared the apps cache in android settings (not 'clear data', just the cache). Now I'm able to connect again.

 

Android 8.0.0

Emby for android V3.0.48

Edited by darkassassin07
Link to comment
Share on other sites

If you use app.emby.media and watch the browser debug console, the Android app should behave identically.

Link to comment
Share on other sites

darkassassin07

*should

 

Whenever I have had this connection issue come up, app.emby.media has still functioned perfectly. Its only the android app that is having this issue.

 

If you were answering the last question in post 21, I meant is there a way to see what exactly the android app itself is trying and failing to connect to?

When that is happening, nothing at all shows up in my server logs, which means its not the server rejecting the connection, the app is either connecting to something different altogether or it's sending such a mangled request cloudflare doesn't know what to do with it.

 

Have you added any sort of debugging to the app at all?

 

 

This time I was able to get it working by clearing the cache, and that will likely work in the future but that doesn't really give you anything useful to work with and get this problem solved...

Edited by darkassassin07
Link to comment
Share on other sites

  • 2 weeks later...

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