Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chromecast doesn't work on a Jellyfin installation via Docker+Traefik when accessing the server via jellyfin.domain.com #2348

Closed
titooo7 opened this issue Jan 28, 2020 · 46 comments
Labels
bug Something isn't working

Comments

@titooo7
Copy link

titooo7 commented Jan 28, 2020

System:

  • OS: Docker (Linux)
  • Client: Chromecast
  • Jellyfin Version: 10.4.3 installed with docker via pgblitz branch v8.6
  • Installed Plugins: Playback reporting and Reports
  • Reverse proxy: Traefik
  • Cloudfare enabled: Yes

Jellyfin Network Settings:

  • Lan networks: blank
  • Bind to local network address: blank
  • Local and Public HTTP port; 8096
  • Local and Public HTTPS port: 8920
  • Allow remote connections: yes
  • Remote ip addres filter: blank
  • Remote ip address filter mode: Whitelist,
  • Baseurl: Tried with /jellyfin and also leaving it blank
  • Custom ssl certificate and Certificate password: blank
  • Secure connection: Tried disabled and Behind Proxy
  • Enable automatic port mapping: Tried enabled and disabled.

Describe the bug
Remote Jellyfin server installed via docker with Traefik accessing the server with jellyfin.domain.com = Chromecast doesn't work.
The tv will just display the Jellyfin logo with the "Ready to cast message" but nothing will be sent to the tv.

I made few modifications jellyfin.yml, traefik.yml and traefik.toml files with help from @Artiume and then I was able to logging into the server with wanip:8096 and Chromecast worked! But then I could only access to my Jellyfin server with wanip:8096 but then jellyfin.domain.com is no longer accessible....

Solution:
My current jellyfin.yml: https://github.com/titooo7/Apps-Core/blob/v8.6/apps/jellyfin.yml
My current traefik.yml: https://github.com/titooo7/Traefik/blob/v8.6/traefik.yml
My current traefik.toml: https://github.com/titooo7/Traefik/blob/v8.6/templates/traefik.toml

@titooo7 titooo7 added the bug Something isn't working label Jan 28, 2020
@Artiume
Copy link
Contributor

Artiume commented Jan 28, 2020

Hey there, so we need finish up your traefik configuration in host_mode so you can access traefik.domain.com again. Also, keep the network to Disabled, not preferred or handled by rp. There's abnormal behavior that and the team and I discovered and need to figure out how to recode properly.

I documented the results here #2259

Using this ticketing system will make it much easier to assist you :)

@Artiume
Copy link
Contributor

Artiume commented Jan 28, 2020

So if I remember correctly, you had a VPS with only a wan IP. With jellyfin accessible via wanip:8096, insert that address into the jellyfin toml section. Restart your services and see what happens. Remember that labels need to be disabled for jellyfin's yml because we're using a static label, not dynamic labels.

If traefik isn't talking to jellyfin after the restart, I'd like to see your traefik logs.

@titooo7
Copy link
Author

titooo7 commented Jan 28, 2020

I have a dedicated server with only a wan IP.
And yes, after I made the modifications you sugged to jellyfin.yml (modified file here: https://github.com/titooo7/Apps-Core/blob/v8.6/apps/jellyfin.yml) I can access to wanip:8096 only

Not sure how I can get the traefik logs and I can't access traefik dashboard either. I'm using pgblitz branch v8.6 (installation 8.7.5).

I tried to modify traefik.yml and traefik.toml file following your pgblitz v90 branch fork, but it fails on the installation due to errors related to {{pgrole}}not being defined on traefik.yml or something similar.
I tried replacing that line with jellyfin.domain.com then it shows an error related to {{gauth}} on traefik.yml

@Artiume
Copy link
Contributor

Artiume commented Jan 28, 2020

So I wrote the fork on the fly for you, it might need to be fixed. Take the original and add in my additions since I took out too much of the original code.

Here's some good commands to know

sudo docker container logs traefik

sudo docker container ls

sudo docker container ps | grep jellyfin

@titooo7
Copy link
Author

titooo7 commented Jan 28, 2020

I'm using the original traefik.yml and traefik.toml files from pgblitz v8.6 branch. I tried to add your additions but it kept failing so I decided to stick to the original one (but still I can access to wanip:8096 with the jellyfin.yml file I linked above)

sudo docker container logs traefik

time="2020-01-28T18:15:01+01:00" level=error msg="Unable to obtain ACME certificate for domains \"mydomain.com\" : unable to generate a certificate for the domains [mydomain.com]: acme: error: 429 :: POST :: https://acme-v02.api.letsencrypt.org/acme/new-order :: urn:ietf:params:acme:error:rateLimited :: Error creating new order :: too many certificates already issued for exact set of domains: mydomain.com: see https://letsencrypt.org/docs/rate-limits/, url: "                                                                          
time="2020-01-28T18:15:01+01:00" level=error msg="Unable to obtain ACME certificate for domains \"*.mydomain.com\" : unable to generate a certificate for the domains [*.mydomain.com]: acme: error: 429 :: POST :: https://acme-v02.api.letsencrypt.org/acme/new-order :: urn:ietf:params:acme:error:rateLimited :: Error creating new order :: too many certificates already issued for exact set of domains: *.mydomain.com: see https://letsencrypt.org/docs/rate-limits/, url: "                                                                    
2020/01/28 18:18:31 reverseproxy.go:447: httputil: ReverseProxy read error during body copy: unexpected EOF                                                                         
2020/01/28 18:18:31 reverseproxy.go:447: httputil: ReverseProxy read error during body copy: unexpected EOF                                                                         
time="2020-01-28T18:18:45+01:00" level=error msg="vulcand/oxy/forward/websocket: Error when copying from backend to client: websocket: close 1006 (abnormal closure): unexpected EOF"                                                                                                                                                                                   
time="2020-01-28T18:18:45+01:00" level=error msg="vulcand/oxy/forward/websocket: Error when copying from backend to client: websocket: close 1006 (abnormal closure): unexpected EOF"                                                                                                                                                                                   
time="2020-01-28T18:18:45+01:00" level=error msg="vulcand/oxy/forward/websocket: Error when copying from backend to client: websocket: close 1006 (abnormal closure): unexpected EOF"                                                                                                                                                                                   
time="2020-01-28T18:24:56+01:00" level=warning msg="A new release has been found: 2.1.3. Please consider updating."                                                                 
time="2020-01-28T18:28:05+01:00" level=warning msg="Could not find network named 'plexguide' for container '/jellyfin'! Maybe you're missing the project's prefix in the label? Defaulting to first available network."                                                                                                                                              
time="2020-01-28T19:11:26+01:00" level=error msg="vulcand/oxy/forward/websocket: Error when copying from client to backend: read tcp 172.17.0.3:443->SOME-WAN-IP-ADDRESS:18704: use of closed network connection"                                                                                                                                                              
time="2020-01-28T19:11:26+01:00" level=error msg="vulcand/oxy/forward/websocket: Error when copying from client to backend: read tcp 172.17.0.3:443->SOME-WAN-IP-ADDRESS:9172: use of closed network connection"                                                                                                                                                            
time="2020-01-28T19:11:26+01:00" level=error msg="vulcand/oxy/forward/websocket: Error when copying from client to backend: read tcp 172.17.0.3:443->SOME-WAN-IP-ADDRESS:17028: use of closed network connection"                                                                                                                                                           
time="2020-01-28T19:11:26+01:00" level=error msg="vulcand/oxy/forward/websocket: Error when copying from client to backend: read tcp 172.17.0.3:443->SOME-WAN-IP-ADDRESS:44306: use of closed network connection"                                                                                                                                                           
time="2020-01-28T19:11:26+01:00" level=error msg="vulcand/oxy/forward/websocket: Error when copying from client to backend: read tcp 172.17.0.3:443->SOME-WAN-IP-ADDRESS:36516: use of closed network connection"                                                                                                                                                           
time="2020-01-28T19:11:26+01:00" level=error msg="vulcand/oxy/forward/websocket: Error when copying from client to backend: read tcp 172.17.0.3:443->SOME-WAN-IP-ADDRESS:50500: use of closed network connection"                                                                                                                                                           
time="2020-01-28T19:11:26+01:00" level=error msg="vulcand/oxy/forward/websocket: Error when copying from client to backend: read tcp 172.17.0.3:443->SOME-WAN-IP-ADDRESS:36518: use of closed network connection"                                                                                                                                                           
time="2020-01-28T19:11:26+01:00" level=error msg="vulcand/oxy/forward/websocket: Error when copying from client to backend: read tcp 172.17.0.3:443->SOME-WAN-IP-ADDRESS:62500: use of closed network connection"                                                                                                                                                           
time="2020-01-28T19:11:26+01:00" level=error msg="vulcand/oxy/forward/websocket: Error when copying from client to backend: read tcp 172.17.0.3:443->OME-WAN-IP-ADDRESS:64116: use of closed network connection"                                                                                                                                                           
time="2020-01-28T19:11:30+01:00" level=error msg="Unable to obtain ACME certificate for domains \"*.mydomain.com\" : unable to generate a certificate for the domains [*.mydomain.com]: acme: error: 429 :: POST :: https://acme-v02.api.letsencrypt.org/acme/new-order :: urn:ietf:params:acme:error:rateLimited :: Error creating new order :: too many certificates already issued for exact set of domains: *.mydomain.com: see https://letsencrypt.org/docs/rate-limits/, url: "                                                                    
time="2020-01-28T19:11:30+01:00" level=error msg="Unable to obtain ACME certificate for domains \"mydomain.com\" : unable to generate a certificate for the domains [mydomain.com]: acme: error: 429 :: POST :: https://acme-v02.api.letsencrypt.org/acme/new-order :: urn:ietf:params:acme:error:rateLimited :: Error creating new order :: too many certificates alr
eady issued for exact set of domains: mydomain.com: see https://letsencrypt.org/docs/rate-limits/, url: "  

@Artiume
Copy link
Contributor

Artiume commented Jan 28, 2020

So you've been hitting your rate limit for LE certs. If traefik isn't working, turn it off so it stops spamming for certs.

time="2020-01-28T18:28:05+01:00" level=warning msg="Could not find network named 'plexguide' for container '/jellyfin'! Maybe you're missing the project's prefix in the label? Defaulting to first available network."

Did you disable the labels?

How did it fail when you added my ports and changed it to host mode?

@titooo7
Copy link
Author

titooo7 commented Jan 29, 2020

So you've been hitting your rate limit for LE certs. If traefik isn't working, turn it off so it stops spamming for certs.

time="2020-01-28T18:28:05+01:00" level=warning msg="Could not find network named 'plexguide' for container '/jellyfin'! Maybe you're missing the project's prefix in the label? Defaulting to first available network."

Did you disable the labels?

How did it fail when you added my ports and changed it to host mode?

Not sure why I get the those letsecrypt errors as I don't recall it using it (I just installed traefik with cloudflare using pgblitz).

I'm still using the modded jellyfin.yml I linked earlier with host mode and can access to the server with wanip:8096

If I try to re-deploy traefik with the taefik.yml and traefik.toml from your v90 fork I get the following error:

TASK [Adding Traefik] **************************************************************************************************************************************************************
Wednesday 29 January 2020 15:47:42 +0100 (0:00:00.196) 0:00:03.333 *****
fatal: [127.0.0.1]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'pgrole' is undefined\n\nThe error appears to have been in '/opt/trae
fik/traefik.yml': line 71, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n # LABELS #### KEEPS BOTTOM
CLEAN ###########################################\n - name: 'Adding Traefik'\n ^ here\n"}
to retry, use: --limit @/opt/traefik/traefik.retry

PLAY RECAP *************************************************************************************************************************************************************************
127.0.0.1 : ok=13 changed=7 unreachable=0 failed=1

I I replace

traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}'

with

traefik.frontend.rule: 'Host:jellyfin.mydomain.com'

Then I got the following error:

TASK [Adding Traefik] **************************************************************************************************************************************************************
Wednesday 29 January 2020 15:58:22 +0100 (0:00:00.207) 0:00:03.594 *****
fatal: [127.0.0.1]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'gauth' is undefined\n\nThe error appears to have been in '/opt/traef
ik/traefik.yml': line 71, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n # LABELS #### KEEPS BOTTOM
CLEAN ###########################################\n - name: 'Adding Traefik'\n ^ here\n"}
to retry, use: --limit @/opt/traefik/traefik.retry

PLAY RECAP *************************************************************************************************************************************************************************
127.0.0.1 : ok=13 changed=7 unreachable=0 failed=1

I'm not using google authentication so I thought it would be safe to remove to comment that line and now Traefik got re-deployed correctly.

However Jellyfin is still accesible only via wanip:8096 not jellyfin.mydomain.com (other apps remain unaffected and can still be accessed via appname.mydomain.com)

My traefik.toml file is identical to your fork from v90 but the backend url of the line 61 is http://mywanip:8096

@Artiume
Copy link
Contributor

Artiume commented Jan 29, 2020

So even if you use cloudflare, you still use Let's Encrypt. Since cloudflare is a proxy, the network works as this, You > CF > Client. You still need a certificate for You to CF. Also, a free Cloudflare doesn't support streaming so the pgblitz docs should have you specify to bypass the proxy with Emby, plex and JF.

I replace
traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}'
with
traefik.frontend.rule: 'Host:jellyfin.mydomain.com'

What yml was this done in? This shouldn't break anything but it's also not what we want to do. This is using the traefik labels for jellyfin. We don't want to do that, we need to disable these labels. That's why we're sticking jellyfin inside the static toml.

Provide more traefik logs, they'll be useful for each update.

@titooo7
Copy link
Author

titooo7 commented Jan 29, 2020

I replace
traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}'
with
traefik.frontend.rule: 'Host:jellyfin.mydomain.com'

What yml was this done in?

This was done in traefik.toml if I don't do it then traefik fails to be deployed and it shows the error that says pgrole is undefined

I will try to get the letsecrypt certificates renewed. I need some time too google it because I don't recall doing it (I'd swear/thinm traefik did it for me probably more than a year ago) and come back then. Right now after latest re-deployment of traefik the only error in the log is this:

sudo: unable to resolve host HetznerDE-Ubuntu-1804-minimal
time="2020-01-29T16:02:26+01:00" level=error msg="Unable to obtain ACME certificate for domains "mydomain.net" : unable to generate a certificate for the domains [mydomain.net]
: acme: error: 429 :: POST :: https://acme-v02.api.letsencrypt.org/acme/new-order :: urn:ietf:params:acme:error:rateLimited :: Error creating new order :: too many certificates alr
eady issued for exact set of domains: mydomain.net: see https://letsencrypt.org/docs/rate-limits/, url: "
time="2020-01-29T16:02:27+01:00" level=error msg="Unable to obtain ACME certificate for domains ".mydomain.net" : unable to generate a certificate for the domains [.mydomain.
net]: acme: error: 429 :: POST :: https://acme-v02.api.letsencrypt.org/acme/new-order :: urn:ietf:params:acme:error:rateLimited :: Error creating new order :: too many certificates
already issued for exact set of domains: *.mydomain.net: see https://letsencrypt.org/docs/rate-limits/, url: "
time="2020-01-29T16:12:25+01:00" level=warning msg="A new release has been found: 2.1.3. Please consider updating."

@Artiume
Copy link
Contributor

Artiume commented Jan 29, 2020

The traefik.yml can be restored to its original settings, you don't want traefik in host mode. You only want to add port 8081 to its list of exposed ports since we want to add access to the dashboard.

Jellyfin.yml is the one that needs to be shifted to host mode.

Traefik logs look good so far. Once we get everything set up correctly, we'll wipe the certs so it pulls new certs.

@titooo7
Copy link
Author

titooo7 commented Jan 29, 2020

The traefik.yml can be restored to its original settings, you don't want traefik in host mode. You only want to add port 8081 to its list of exposed ports since we want to add access to the dashboard.

Jellyfin.yml is the one that needs to be shifted to host mode.

Traefik logs look good so far. Once we get everything set up correctly, we'll wipe the certs so it pulls new certs.

Yes jellyfin.yml is in host mode: https://pastebin.com/uNgV1rSs
My current traefik.yml is not in host mode and it has 8081: https://pastebin.com/HLXe7ng8
and this is my traefik.toml: https://pastebin.com/r1D8i5Fn

Not sure what's wrong with letsencrypt as it expired in June 2019 apparently and I still use the rest of pgblitz appnames.mydomain.com without issues with the websites being accessible via https with a valid cloduflare certificate. But I'll try to get it sorted anyway just to make sure that's not the cause of the issues. thanks for the help!!!

@Artiume
Copy link
Contributor

Artiume commented Jan 29, 2020

so this is probably messing things up. in your traefik,yml, Line 77, you still have traefik.frontend.rule: 'Host:jellyfin.mydomainnamehere.net' either return this to the original traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}}{{tldset}}{{cname}}' or change it to 'Host:traefik.mydomainnamehere.net'.

run sudo docker inspect jellyfin to inspect jellyfin and traefik and post their results here.

@titooo7
Copy link
Author

titooo7 commented Jan 30, 2020

Thanks for noticing the mistake on my traefik.yml I changed it to 'Host:traefik.mydomainnamehere.net' now.

I still couldn't figure out how to generate new letsencrypt keys but I added caServer = "https://acme-staging-v02.api.letsencrypt.org/directory" which apparently relates to a testing server for letsencrypt and now I don't have any errors when I execute sudo docker container logs traefik

sudo: unable to resolve host HetznerDE-Ubuntu-1804-minimal
time="2020-01-30T12:17:22+01:00" level=warning msg="A new release has been found: 2.1.3. Please consider updating."

And the sites are still accessible via https thanks to traefik/cloudflare. The url traefik.mydomain.com still doesn't work yet and Jellyfin still works only with wanip:8096 though

sudo docker inspect jellyfin: https://pastebin.com/3dSiXUDs

sudo docker inspect traefik: removed due to sensitive info

@PrplHaz4
Copy link
Contributor

A couple things seem odd to me (other than all the pg templating yuck):

  • url = "http://my-server-wanip:8096" if traefik and jf are on the same machine, this should be the docker gateway ip (as it's the only way a container can access a host) - likely http://172.17.0.1:8096
  • "traefik.frontend.rule": "Host:jellyfin.my-domain-name.com,jellyfin.my-domain-name.com", listed twice
  • you seem to want to access traefik api/dashboard on port 8081 but that is not defined as an entrypoint anywhere

@titooo7
Copy link
Author

titooo7 commented Jan 30, 2020

Thanks @PrplHaz4 I wrote my server wanip there rather than the Traefik docker ip just because I though that was the correct one. I will modify it as per your suggestion

Not sure why the Jellyfin.domain.com is listed twice there but other apps have it twice as well. In my Jellyfin.yml it read as the yml of other apps I don't have issues with:

traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}}{{tldset}}{{cname}}'

And yes I want to access Traefik dashboard just because we thought it would be good to have access so maybe we can figure out why Jellyfin is accesible from wanip:8096 but not Jellyfin.domain.com. It looks like i forgot to add it (after so many test it's easy to mess stuff if you are a noob) should I define it just adding [api]? Or do I also need something right below that like

entryPoint = "traefik"
dashboard = true

@Artiume
Copy link
Contributor

Artiume commented Jan 31, 2020

[api] alone should do it. and using the docker gateway won't work since Jellyfin is in host_mode and not on the docker network. Yeah, might need to check his toml, the api entrypoint might not be there.

@Artiume
Copy link
Contributor

Artiume commented Jan 31, 2020

Updated this, they should work. The api entrypoint might still give you issues. Make sure you dont expose it to the interwebs.

https://github.com/Artiume/Traefik/blob/v90/templates/traefik.toml

https://github.com/Artiume/Traefik/blob/v90/traefik.yml

Make sure you use Wanip in the toml. if that doesnt work, we can try wget and curl to see whats up

@Artiume
Copy link
Contributor

Artiume commented Feb 3, 2020

Any luck?

@titooo7
Copy link
Author

titooo7 commented Feb 4, 2020

Updated this, they should work. The api entrypoint might still give you issues. Make sure you dont expose it to the interwebs.

https://github.com/Artiume/Traefik/blob/v90/templates/traefik.toml

https://github.com/Artiume/Traefik/blob/v90/traefik.yml

Make sure you use Wanip in the toml. if that doesnt work, we can try wget and curl to see whats up

I'm using pgblitz 8.7.5 (which comes from branch v8.6).

I tried deploying the traefik container of your fork but that didn't work as I'm using v8.6 and not v90, so there are lots of links that don't work with my installed pgblitz version

I adapted my v8.6 fork toimplement the changes you made on those two files, but traefik fails to be re-deployed:

SMART TIP: Check Portainer Now! View the Traefik Logs!

REASON 1 - CloudFlare: portainer is not set in the CNAME or A Records
REASON 2 - DuckDNS : Forgot to create a portainer or * - A Record
REASON 3 - Firewall : Everything is blocked
REASON 4 - DelayValue: Set too low; CF users reported using 90 to work
REASON 5 - OverUse : Deployed too much; hit LetsEncrypt Weekly Limit
REASON 6 - User : PG Locally; Route is not enable to reach server
REASON 7 - User : Bad values input or failed to read the wiki
REASON 8 - User : Forgot to point DOMAIN to CORRECT IP ADDRESS

Traefik logs show

time="2020-02-04T14:52:14+01:00" level=fatal msg="Error preparing server: error opening listener: listen tcp :8080: bind: address already in use"

@Artiume
Copy link
Contributor

Artiume commented Feb 5, 2020

Since 8080 is already in use, try 8081 or any other open port.

@titooo7
Copy link
Author

titooo7 commented Feb 5, 2020

Since 8080 is already in use, try 8081 or any other open port.

I replaced 8081 by 8080 on traefik.toml and 8081 and now traefik got deployed correctly,but traefik dashboard still doesn't work and jellyfin still works only with wanip:8096 but not jellyfin.mydomain.com

Just to recap:
My currrent jellyfin.yml: https://pastebin.com/raw/r3sc8sdW
My currrent traefik.yml: https://pastebin.com/raw/cgAHuDRZ
My currrent traefik.toml: https://pastebin.com/raw/6Rs3GDyt

docker inspect jellyfin: https://pastebin.com/ZVQ4UsYT

docker inspect traefik: https://pastebin.com/NxEic7Bf

docker traefik logs:

time="2020-02-05T20:01:43+01:00" level=error msg="vulcand/oxy/forward/websocket: Error when copying from client to backend: websocket: close 1006 (abnormal closure): unexpected EOF"
time="2020-02-05T20:23:59+01:00" level=error msg="vulcand/oxy/forward/websocket: Error when copying from backend to client: websocket: close 1006 (abnormal closure): unexpected EOF"
time="2020-02-05T20:26:43+01:00" level=error msg="vulcand/oxy/forward/websocket: Error when copying from client to backend: read tcp 172.17.0.16:443->some-wan-ip-address:46240: use of closed network connection"
time="2020-02-05T20:26:43+01:00" level=error msg="vulcand/oxy/forward/websocket: Error when copying from client to backend: read tcp 172.17.0.16:443->other-wan-ip-address:58154: use of closed network connection"
time="2020-02-05T20:26:43+01:00" level=error msg="vulcand/oxy/forward/websocket: Error when copying from client to backend: read tcp 172.17.0.16:443->another-wan-ip-address:23558: use of closed network connection"
time="2020-02-05T20:29:46+01:00" level=error msg="vulcand/oxy/forward/websocket: Error when copying from client to backend: websocket: close 1006 (abnormal closure): unexpected EOF"
time="2020-02-05T20:34:01+01:00" level=error msg="vulcand/oxy/forward/websocket: Error when copying from client to backend: websocket: close 1006 (abnormal closure): unexpected EOF"
time="2020-02-05T20:36:46+01:00" level=warning msg="A new release has been found: 2.1.3. Please consider updating."

@Artiume
Copy link
Contributor

Artiume commented Feb 6, 2020

Out of your traefik yml, fix this.

  • '8900:8081' change this to 8900:8080

We're doing something wrong with changing traefiks default port. Change it back to default.

Since 8080 is already in use, try 8081 or any other open port.

So I'm gonna try and explain where you went wrong in your assessment. Hopefully it helps understand docker magic. this error is on the host side, not the container side. Your container is perfectly fine using its default port. You won't run into that sort of issue unless you're making your own image haha

Treat your containers as VMs. They have their own internal network/nic and with docker, you give them their own subnet as well. When you do 8900:8080 in your yml, you are telling docker to act as a router and port forward the VMs port 8080 across its personal NAT (172.16 to 192.168) and it becomes port forwarded on your host's 8900. This is just like your router to exposing ports on the public interface :). You're double NATing your reverse proxy to achieve all this magic ;)

@titooo7
Copy link
Author

titooo7 commented Feb 6, 2020

Out of your traefik yml, fix this.

  • '8900:8081' change this to 8900:8080

Done! I still kept the entry.monitor line of traefik.toml as ":8081". Is that correct?

I re-deployed and I still can access Jellyfin only with wanip:8096. But now I finally can access Traefik dashboard with wanip:8900

In Traefik dashboard I see frontend & backend sections for all my apps except for jellyfin

@Artiume
Copy link
Contributor

Artiume commented Feb 6, 2020

Done! I still kept the entry.monitor line of traefik.toml as ":8081". Is that correct?

I would erase every mention of 8081, that being said. If it works don't touch it haha.

Jellyfin missing from the dashboard is weird, you're the second one to have issues with it showing in the dashboard. I'm going to need to verify the docs work properly

@titooo7
Copy link
Author

titooo7 commented Feb 6, 2020

Just in case it helps:
docker logs traefik

time="2020-02-06T09:03:59+01:00" level=error msg="vulcand/oxy/forward/websocket: Error when copying from backend to client: websocket: close 1006 (abnormal closure): unexpected EOF
"
time="2020-02-06T09:03:59+01:00" level=error msg="vulcand/oxy/forward/websocket: Error when copying from backend to client: websocket: close 1006 (abnormal closure): unexpected EOF
"
time="2020-02-06T09:11:27+01:00" level=warning msg="A new release has been found: 2.1.3. Please consider updating."

Not sure if that could be the reason why JF is missing from traefik dashboard.

@Artiume
Copy link
Contributor

Artiume commented Feb 6, 2020

I'm not sure, trying searching online to see what you can find. I couldn't find much

@PrplHaz4
Copy link
Contributor

PrplHaz4 commented Feb 6, 2020

Not sure if that could be the reason why JF is missing from traefik dashboard.

If you're using a static rule in toml for Jellyfin it should be on the file tab in the dashboard, not the main view.

Edit: The only time you need to explicitly define an entrypoint for the Dashboard (API) is if you are not using the default port (8080).
https://docs.traefik.io/v1.7/configuration/api/#address-port

Here's a pic of where the "file" tab should be:
https://docs.traefik.io/v1.7/img/web.frontend.png

@titooo7
Copy link
Author

titooo7 commented Feb 7, 2020

My traefik dashboard doesn't have any file or kubertnetes tab, it only has the docker tab.

Just to recap:

@Artiume
Copy link
Contributor

Artiume commented Feb 7, 2020

@PrplHaz4 i think the toml in the docs might be messed up.

@Artiume
Copy link
Contributor

Artiume commented Feb 7, 2020

Aha, maybe this is it. So mine is defined inside a seperate file and that's how I call mine. I've never used the static toml inside my primary toml. Try adding [file] like so

 [file] 
[backends] 
[backends.backend1] [backends.backend1.servers.server1] url = "https://wanip:8096" 
[frontends] 
[frontends.frontend1] 
backend = "backend1" [frontends.frontend1.routes.test_1]

My format is all messed up, it's in the link @PrplHaz4 provided about the api

@titooo7
Copy link
Author

titooo7 commented Feb 7, 2020

thanks for trying to help guys. If I add the following to my traefik.toml then traefik fails to be deployed.

[file]
[backends]
[backends.backend1]
[backends.backend1.servers.server1]
url = "http://my-server-wan-ip:8096"

[frontends]
[frontends.frontend1]
backend = "backend1"
[frontends.frontend1.routes.test_1]

Just in case I also added rule = "Host:jellyfin.{{domain.stdout}}" below [frontends.frontend1.routes.test_1] but it still fails to be deployed

@PrplHaz4
Copy link
Contributor

PrplHaz4 commented Feb 7, 2020

thanks for trying to help guys. If I add the following to my traefik.toml then traefik fails to be deployed.

[file]
[backends]
[backends.backend1]
[backends.backend1.servers.server1]
url = "http://my-server-wan-ip:8096"
[frontends]
[frontends.frontend1]
backend = "backend1"
[frontends.frontend1.routes.test_1]

Just in case I also added rule = "Host:jellyfin.{{domain.stdout}}" below [frontends.frontend1.routes.test_1] but it still fails to be deployed

@titooo7 Pretty sure indents are important in toml - try just adding [file] above [backends] from your previous toml

@Artiume
Copy link
Contributor

Artiume commented Feb 7, 2020

So I think I was wrong on the assumption that the docker gateway wouldnt work.

traefik/traefik#5559

There is a workaround, which is enabling the File provider, and creating the router + service manually, where the service points to the IP 172.17.0.1, which is the default docker gateway, that points to the interface docker0: if the backend container process listens on 0.0.0.0, then it can answer to docker0 upcoming requests as it is an host interface.

I think we should try the original docker IP gateway 172.17.0.1

@PrplHaz4
Copy link
Contributor

PrplHaz4 commented Feb 7, 2020

@PrplHaz4 i think the toml in the docs might be messed up.

i think the only thing wrong is that it's missing the [file] directive (which will definitely cause it to fail) - PR to fix it is here: jellyfin-archive/jellyfin-docs#224

@titooo7
Copy link
Author

titooo7 commented Feb 7, 2020

Thanks @Artiume @PrplHaz4 it finally works. I added the [file] line and the docker gateway IP to the toml and now I can access jellyfin via wanip:8096 but also via jellyfin.mydomain.com

Once I get home I will test if Chromecast works if the user connects to jellyfin.mydomain.com or only when connecting via wanip:896.

Recap of my current files:

Once everything is working, would it be safe to remove the [api] line so my traefik dashboard isn't accessible by the whole world? :)

@Artiume
Copy link
Contributor

Artiume commented Feb 7, 2020

Yes, disable the dashboard. And remove port 8080. I can work with you to get basic auth or oauth working if you want to sometime, just hit us up on the chat :)

@titooo7
Copy link
Author

titooo7 commented Feb 16, 2020

I had feedback from one friend who could get Chromecast working when connecting to my server with the url jellyfin.domain.com and another that still has the same issue.

I will receive a Chromecast myself tomorrow so I'll test and confirm if it's totally solved now :)

@Artiume
Copy link
Contributor

Artiume commented Feb 16, 2020

Maybe one of them is inputting the address differently such as one is using https:// and the other isn't.

@titooo7
Copy link
Author

titooo7 commented Feb 18, 2020

Maybe one of them is inputting the address differently such as one is using https:// and the other isn't.

So I finally tested it myself and with https JF can finally cast to my Chromecast using https://jellyfin.mydomain.com I will update the OP to point out the solution.

But there is still something wrong, if I fast forward to a random minute, the image gets moved to there but it's frozen like if it was paused (but unpausing it and pausing it again doesn't make any effect). This would be a different issue so if it's ok I will mark this as closed

@Artiume
Copy link
Contributor

Artiume commented Feb 18, 2020

Yeah, that might be best as a Playback bug report.

@sparky8251
Copy link
Contributor

Solved by updating docs as seen in jellyfin-archive/jellyfin-docs#225 and jellyfin-archive/jellyfin-docs#224

@huuub
Copy link

huuub commented Jul 15, 2020

Am I the only one who doesn't see the solution in any of those issues?

@Artiume
Copy link
Contributor

Artiume commented Jul 15, 2020

what seems to be your issue?

@huuub
Copy link

huuub commented Jul 15, 2020

I believe traefik - chromecast - docker (with or wihtout host mode) is a problem?
Certainly not on another network. Emby seems to have the same problem?

@Artiume
Copy link
Contributor

Artiume commented Jul 15, 2020

Are you sure your settings are correct? Host mode should behave the same as a Normal install.

@huuub
Copy link

huuub commented Jul 31, 2020

So you can stream to chromecast on another network then your home network?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants