MediaBrowser / plugin.video.emby

Integrate your Emby media library in Kodi
https://emby.media/community/index.php?/forum/99-kodi/
GNU General Public License v3.0
294 stars 169 forks source link

Can't login to emby server via domain #485

Closed kierankihn closed 9 months ago

kierankihn commented 10 months ago

I am trying to login to my emby server with my domain, but I received an error Can't connect to the server.

I've tried filling in https://emby.kierankihn.com for host, and filling in 443 for port.

In Kodi's log, the requested url is correct, like so:

2024-01-20 09:25:13.758 T:7920     info <general>: EMBY.emby.emby: tryConnect url: https://emby.kierankihn.com:443
2024-01-20 09:25:13.759 T:5544     info <general>: EMBY.emby.http: THREAD: --->[ async queue ]
2024-01-20 09:25:13.786 T:7920    error <general>: EMBY.emby.http: [ ServerUnreachable ]
2024-01-20 09:25:13.786 T:7920  warning <general>: EMBY.emby.http: Request no send, retry: 1
2024-01-20 09:25:13.806 T:7920    error <general>: EMBY.emby.http: [ ServerUnreachable ]
2024-01-20 09:25:13.808 T:3168     info <general>: EMBY.emby.emby: THREAD: --->[ Reconnecting ]  / 
2024-01-20 09:25:13.808 T:3168     info <general>: EMBY.emby.emby: Emby client already closed
2024-01-20 09:25:14.809 T:3168     info <general>: EMBY.emby.emby: Reconnect try again:  / 
2024-01-20 09:25:24.810 T:3168     info <general>: Skipped 9 duplicate messages..
2024-01-20 09:25:24.810 T:3168     info <general>: EMBY.emby.emby: Reconnect try again:  / 

But in my clash client (a network proxy tool), I can't find the request record

Snipaste_2024-01-20_09-55-39

I've also tried filling in emby.kierankihn.com for host, and filling in 443 for port.

In Kodi's log, the requested url is over http instead of https

2024-01-20 09:54:30.012 T:5416     info <general>: EMBY.emby.emby: tryConnect url: http://emby.kierankihn.com:443
2024-01-20 09:54:30.217 T:3132     info <general>: EMBY.emby.emby: Reconnect try again:  / 
2024-01-20 09:54:31.010 T:5416    error <general>: EMBY.emby.http: [ ServerUnreachable ]
2024-01-20 09:54:31.010 T:5416  warning <general>: EMBY.emby.http: Request no send, retry: 1
2024-01-20 09:54:31.217 T:3132     info <general>: EMBY.emby.emby: Reconnect try again:  / 
2024-01-20 09:54:32.018 T:5416    error <general>: EMBY.emby.http: [ ServerUnreachable ]
2024-01-20 09:54:32.217 T:3132     info <general>: EMBY.emby.emby: Reconnect try again:  / 
2024-01-20 09:54:42.220 T:3132     info <general>: Skipped 9 duplicate messages..
2024-01-20 09:54:42.220 T:3132     info <general>: EMBY.emby.emby: Reconnect try again:  / 
2024-01-20 09:54:52.222 T:3132     info <general>: Skipped 9 duplicate messages..
2024-01-20 09:54:52.222 T:3132     info <general>: EMBY.emby.emby: Reconnect try again:  / 

In my clash client's log, I found a request sent to emby.kierankihn.com on port 80 (not 443)

Snipaste_2024-01-20_09-54-46

In my nginx's log, my server returned a 301 to this request (redirected it to https).

If I fill in my server's IP address for host and fill 8096 for port, I can connect to my server successfully.

However, it's not secure to access directly with ip and port (especially when I need to expose the port to the public internet), so I'd like to access via my subdomain and https. Is there a way for me to do this?

quickmic commented 9 months ago

https://emby.media/community/index.php?/topic/125746-cant-login-to-emby-server-via-domain/