-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
mpvshim auto reconnect issue with jellyfin 10.9 #390
Comments
I'm inclined to think this is a server issue. The "client not actually connected" is a check that MPV Shim does to try and make itself more robust against these failures. |
I'm also seeing this, most likely the related upstream issue is this: jellyfin/jellyfin#11620. Seems like upgrading to the newly released 1.9.2 and/or configuring "Published Server URIs" (for reverse proxy setups?) may solve this. |
I am getting this issue on Windows with jellyfin-mpv-shim (v2.7.0) installed via scoop. When I "Add Server", it works fine. But if I restart the shim I get the same "Client is not actually connected" warning and it doesn't show up in the clients list. On Linux, with shim installed via pipx, it works perfectly. Jellyfin server is v10.9.2. I will try installed shim on Windows from other sources and report back. |
Can not confirm installed via pipx on arch linux and it doesn't work on a reconnect. |
It wasn't possible for me to test at the time, but now I have tested, and it did not solve the problem for me. There's another issue at home-assistant, home-assistant/core#117741, about sessions not being detected. Since both projects use the jellyfin-apiclient-python library there may be a common cause there somewhere? |
Same, I tried every configuration I could think of, but cannot reconnect |
So far we've been unable to reproduce this. I spent roughly an hour just stopping and starting mpv shim and had exactly 1 connection failure in 100+ attempts, and after the next restart it worked fine again. Both the native linux version and the flatpak version. Are there any other similarities between folks who are experiencing issues?
|
Since server update, I can not connect with the domain name, it seems to be unable to get response from socket, even on first try. |
Server installed using the Gentoo ebuild.
https to FQDN through two levels of reverse proxies (Internet ----https--> nginx (webfronted) ----https--> nginx (on jellyfin host) ----http--> jellyfin) The nginx config is inspired by (but not identical to) the jellyfin nginx documentation as it was a year or two ago. If it is of any help I use both Kodi plugins (Jellyfin for Kodi and JellyCon) as clients without any problems. |
I have the server installed with docker using the official docker image(jellyfin/jellyfin). The issue started happening for me when I updated the image to the 10.9.2 version of jellyfin. I have jellyfin-mpv-shim installed through the AUR on Arch Linux. I was using the previous version of the mpv-shim when the issue started and updating did not fix it. Assuming it had to be caused by the change on the jellyfin server's end. I usually have it set to directly connect to the servers IP but I also tried connecting to it through NGINX proxy manager and got the same result. As was mentioned by someone else, every time I launch the mpv-shim it fails to connect until it gives up then if I delete and re add the server it will connect fine on the first try and will work until I close the mpv-shim where I get the exact same behavior every time. |
This issue is getting ridiculous for me - it started out where I had to run the command twice to get it to connect, but it seems to ~quadruple the number of reconnect attempts required every day I use it. Last week I modified the source code to reconnect 300 times, and since then it took 54 tries, then 220 tries, and now over 1000 to finally connect. I have not tried re-adding the server, may give that a go to see if I can avoid 4000 attempts tomorrow.
Installed from jellyfin ppa on a debian container in Proxmox
Direct IP:Port via an uninterrupted ethernet cable plugged in from desktop motherboard to server
None |
I understand it's frustrating, but you have to realize that we're flying completely blind here. We can't reproduce the error, and by all indication things are being set up correctly and the server simply isn't responding with the proper data. I've tried both through reverse proxy and ip:port. I've set up a script to constantly start/kill the client. In hundreds of attempts, I've only seen one failure that immediately resolved itself. There's another factor in play that we haven't been able to identify. I have 2 potential ideas. Neither of them seem very likely, but again, flying blind.
The only other option I can think of is to enable debug logging in the server and see if that gives more indication of there's a server error. https://jellyfin.org/docs/general/administration/troubleshooting#debug-logging |
Thank you, this was spot on (although I added a sleep for 1 second first line in |
yes works |
I found I did have a lot of devices built up on my server but clearing them out made no difference. After adding even a 1 second sleep as suggested it now will connect every time and I haven't been able to get it to fail so far. |
adding this to the source code works for me as well: client.jellyfin.post_capabilities(CAPABILITIES)
time.sleep(1)
return self.validate_client(client) @mcarlton00 Sorry about using the phrase "this is getting ridiculous", that was a poor choice of words on my part, I meant that the amount of retries was ridiculous. I also didn't read your messages that clearly say you can't reproduce the issue, I know what that's like. No ill will from me ❤️ |
client.jellyfin.post_capabilities(CAPABILITIES) |
@mcarlton00 I was right and you were wrong. There is indeed a problem with 10.9 in terms of authentication. Because 10.8 does not suffer from this problem at all ;) |
Describe the bug
mpvshim works well with version 10.8 but it does not work well with version 10.9 The first connection succeeds but reconnections fail because jellyfin refuses authentication. I noticed that there were two elements that changed in the mpvshim jellyfin session configuration file, the token and the time/date. Maybe the problem is related to the time and date. I tested mpvshim on two different machines under Linux and noticed the same problems!
To Reproduce
Steps to reproduce the behavior:
Expected behavior
That mpvshim automatically connects to jellyfin after a machine restart, mpvshim restart, or Jellyfin instance restart
Desktop (please complete the following information):
Error Messages
Server Jellyfin
Client mpv-shim
The text was updated successfully, but these errors were encountered: