Jellyfin Forum
Automatic server discovery busted over https - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: Automatic server discovery busted over https (/t-automatic-server-discovery-busted-over-https)



Automatic server discovery busted over https - n8jadams - 2023-11-10

I've got an Unraid machine with Portainer, trying to get my Jellyfin server to work.

I've got the following docker-compose.yml

Code:
version: '3'

services:
  jellyfin:
    image: jellyfin/jellyfin:latest
    container_name: jellyfin_official
    user: 99:100
    group_add:
      - "18" # output from `getent group video | cut -d: -f3` command, which ls -lart /dev/dri on Unraid gave for the devices
    environment:
      - PUID=99
      - PGID=100
      - UMASK=000
      - TZ=America/Denver
      # Optional - alternative address used for autodiscovery
      - JELLYFIN_PublishedServerUrl=https://jellyfin.MYDOMAIN
    network_mode: 'host'
    volumes:
      - /mnt/user/cloud-storage/apps/Jellyfin/media:/media # Media
      - /mnt/user/cloud-storage/apps/Jellyfin/appdata/config:/config # Jellyfin files
      - /mnt/user/cloud-storage/apps/Jellyfin/appdata/cache:/cache # Jellyfin cache
    devices:
    - /dev/dri:/dev/dri
    ports:
      - 8096:8096
    restart: unless-stopped
    # Optional - may be necessary for docker healthcheck to pass if running in host network mode
    extra_hosts:
      - "host.docker.internal:host-gateway"

I am using a Cloudflare zero trust tunnel to expose my internal 8096 port and handling SSL.

Strangely enough, when in my browser I visit my lan ip for jellyfin, http://MYLOCALIP:8096/ I correctly get redirected to the setup Wizard. But when I visit https://jellyfin.MYDOMAIN I see this in the console:

GET https://jellyfin.MYDOMAIN/System/Info/Public net::ERR_TOO_MANY_REDIRECTS

It looks like Jellyfin spams the /System/Info/Public url path, gets a bunch of 301 redirects, and then finally it just gives up and gives me that "too many redirects" message.

On the UI I see the "Select Server -  No servers have been found using the automatic server discovery." message.

EDIT: After going through the setup wizard, now I see the "Connection Failure -- We're unable to connect to the selected server right now. Please ensure it is running and try again." message. I will note that in iOS Safari it seems to work fine. Maybe it's a desktop Chrome problem.

EDIT 2: Nope, none of my content is playing on any client.

What am I doing wrong?


RE: Automatic server discovery busted over https - mcarlton00 - 2023-11-11

You should really not expose your server to the internet before you complete the install wizard.  There's basically no security on that page and it's just asking for your server to get hijacked.

In regards to your docker container, having both "network_mode" and "ports" is conflicting.  One of these is doing nothing, probably the ports section.  The ports section also doesn't have enough ports listed for the automatic discovery to work, as it requires UDP ports as well.

> "Connection Failure -- We're unable to connect to the selected server right now. Please ensure it is running and try again."

This usually means that the browser has cached information about a server but can't reach it, due to an update or changing address or a handful of other situations.  Usually clearing your cookies will fix it.

For any playback issues, you're really going to need to include logs from the server.  There's nowhere near enough information here to help.