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
Comments
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 :) |
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. |
I have a dedicated server with only a wan IP. 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. |
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 |
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
|
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:
I I replace
with
Then I got the following error:
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 |
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.
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. |
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:
|
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 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!!! |
so this is probably messing things up. in your traefik,yml, Line 77, you still have run |
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
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 |
A couple things seem odd to me (other than all the pg templating yuck):
|
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:
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
|
[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. |
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 |
Any luck? |
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:
Traefik logs show
|
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: docker inspect jellyfin: https://pastebin.com/ZVQ4UsYT docker inspect traefik: https://pastebin.com/NxEic7Bf docker traefik logs:
|
Out of your traefik yml, fix this.
We're doing something wrong with changing traefiks default port. Change it back to default.
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 ;) |
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 |
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 |
Just in case it helps:
Not sure if that could be the reason why JF is missing from traefik dashboard. |
I'm not sure, trying searching online to see what you can find. I couldn't find much |
If you're using a static rule in toml for Jellyfin it should be on the 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). Here's a pic of where the "file" tab should be: |
My traefik dashboard doesn't have any file or kubertnetes tab, it only has the docker tab. Just to recap:
|
@PrplHaz4 i think the toml in the docs might be messed up. |
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
My format is all messed up, it's in the link @PrplHaz4 provided about the api |
thanks for trying to help guys. If I add the following to my traefik.toml then traefik fails to be deployed.
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 |
So I think I was wrong on the assumption that the docker gateway wouldnt work.
I think we should try the original docker IP gateway 172.17.0.1 |
i think the only thing wrong is that it's missing the |
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? :) |
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 :) |
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 :) |
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 |
Yeah, that might be best as a Playback bug report. |
Solved by updating docs as seen in jellyfin-archive/jellyfin-docs#225 and jellyfin-archive/jellyfin-docs#224 |
Am I the only one who doesn't see the solution in any of those issues? |
what seems to be your issue? |
I believe traefik - chromecast - docker (with or wihtout host mode) is a problem? |
Are you sure your settings are correct? Host mode should behave the same as a Normal install. |
So you can stream to chromecast on another network then your home network? |
System:
Jellyfin Network Settings:
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
The text was updated successfully, but these errors were encountered: