Closed karezza closed 3 years ago
I did run into similar issues when I was setting up my initial setup, which was caused by the claim token expiring before I managed to debug the final issues in my deployment. I double checked that the claim token is passed to the right variable in the container, so I don't immediately know what could have gone wrong with your setup there.
For the initial setup, I had to trick the setup thinking that I was connecting from the local network (ingress is seen as outside) and that finally started the installation process. This is all Plex though, so I don't really know all the internals on how the connecting parts work. Considering that this is a fresh installation, deleting the installation (and the configuration storage), getting a new claim token and trying again might be worth it.
For the ingress, do you have the error which was caused or did the ingress resource get created, but didn't relay traffic?
I believe the claim token worked as I got past the initial plex setup. However, it is very easy to retest with a new token. I can also test using a method to connect from localhost and not need the claim token.
I didn't get an Ingress error. The Ingress looks to be working perfectly connectingto 32400, there's just no plex server to connect to (other than my old pms setup which I am looking to retire).
I will helm uninstall and reinstall in a couple hours and report back.
On Mon, Sep 13, 2021, 3:00 PM Sami Haahtinen @.***> wrote:
I did run into similar issues when I was setting up my initial setup, which was caused by the claim token expiring before I managed to debug the final issues in my deployment. I double checked that the claim token is passed to the right variable in the container, so I don't immediately know what could have gone wrong with your setup there.
For the initial setup, I had to trick the setup thinking that I was connecting from the local network (ingress is seen as outside) and that finally started the installation process. This is all Plex though, so I don't really know all the internals on how the connecting parts work. Considering that this is a fresh installation, deleting the installation (and the configuration storage), getting a new claim token and trying again might be worth it.
For the ingress, do you have the error which was caused or did the ingress resource get created, but didn't relay traffic?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ressu/kube-plex/issues/10#issuecomment-918571344, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEHXQ7PL2AQDLP3J6X4BF23UBZQ5FANCNFSM5D4WRQBA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
That to me sounds a lot like claim token issue. The ingress (since it's not a local connection) will log you into the web app, which will only list servers that were able to associate with your account. The association is done with the claim token, so it would make sense that the claim token wasn't properly used to associate the server to your account.
Let me know how it goes, I honestly can't remember the steps I did to connect to the instance as if it was local. But some amount of port-forward
trickery was needed.
After updating the repo, there were some changes in values.yaml, I was quick with a new claim token and so far looks like everything is working. Need to finish the steps to allow the specified network. Will check back in after testing the setup.
After some investigation, now I have plex-kube-plex as an option but it has a red triangle with an exclamation point. When I click it I get a message "app.plex.tv" is unable to connect to "plex-kube-plex" securely. Investigating...
I recall the Ingress error now, it was around the beta extensions not being available, the apiVersion in the ingress needs to be updated to be apiVersion: networking.k8s.io/v1. I suspect the ingress is the issue for me now. I setup my own ingress but I probably need to use the hostname 'plex-kube-plex' instead of 'plex' as I am now. I probably could have set the hostname with the ingress option 'hosts', if I could have used the ingress option.
I had to run:
kubectl port-forward plex-kube-plex-6bf9969554-b8b26 32400:32400
And then browse to localhost:32400, then I was able to configure the server & now it shows up via my ingress.
I wonder if this may be a required step for everyone?
I just rechecked the documentation on the main page and see it says to connect to the dashboard via a port-forward or, the last option was an ingress. Maybe the ingress I made just wasn't exactly the same as the one that's made by the built in ingress...
Ok, sounds like on the second time around the token was properly applied, but the announce address was the problem. I'll take a look if I can improve the flow a bit, but it might be that the easy solution is to document the port forward solution as a workaround.
I'll also take a look at the ingress definition. Since it's really old, it will need updating to the most recent ingress setup. I might even import my own entries that I recently migrated to since I've never been a huge fan of helm. I'll reopen this issue so that I'll remember to address both of those in the code too.
I'm not sure yet if eliminating the ingress option in the documentation and only giving the localhost port forward technique is the right strategy until I have seen both work.
I was wondering though if a Troubleshooting section at the bottom might be a good idea. I was planning to go look at the helm standards website to see if there is a traditional place to put a troubleshooting section.
I suspect folks not getting their claim token in within 4 minutes will probably be very common and it would make sense to document:
I have these ideas to document, but can't really document them till I find out the answers. However, since I have run into them, unless they are bugs to be fixed, I suspect others may have the same questions. And, anything to free you from having to answer the same questions multiple times is probably a good idea.
I wonder if it might be possible to detect on the server that the claimtoken was expired and display a useful message to stdout that people might notice when debugging. Maybe an additional Init condition to check for and display a nice verbose message?
Disabling the ingress wouldn't change the initial setup in any way. The major difference between ingress and port forward is the origin of the traffic, not so much a change in how Plex works within the container. Ingress traffic is seen as traffic coming from outside of the local network, where as port forward will seem like it's coming from the same network (or even localhost, I can't remember for certain how it looks within the container). So having an ingress set up doesn't break the setup process.
For the claim token, I don't see an easy way to detect if it's expired since it's handled fully within the Plex process. Not to mention that the claim token is often left to the configuration for a long time, even after the Plex instance has used the token. We could introduce a sidecar that constantly reads the Plex configuration file and tries to see if the server has registered, but that seems like a lot of work to solve a onetime issue. If you can think of other ways how this could be solved, I'm open to suggestions since this seems like a common issue with many Plex users. Having some support for this in kube-plex would make adoption easier for kube-plex 😉
As for your troubleshooting ideas, you could start a wiki page for those and we can try to hash out common solutions for the problems there.
Closing this issue since the ingress definition has been updated and the documentation is being updated in #14
Ingress didn't work so I created my own.
Am able to browse to the gui via my ingress pointing to 32400.
It doesn't see a server from the install, it does see my older docker install though and I can watch videos through it.
I'm not seeing any errors and being that this is my first run of this chart I'm not sure what to look for. Do you see something obvious missing? Are there some troubleshooting steps I can perform for you? Do I just need to add something to my ingress?