![]() |
SyncPlay Fails - 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: SyncPlay Fails (/t-syncplay-fails) |
SyncPlay Fails - xtendo - 2025-06-28 Hello everyone, I'm seeking expert help for a persistent SyncPlay issue. My setup is Jellyfin 10.10.7 on a SeedIt4.me (Ubuntu) seedbox, accessed via Nginx with a /jellyfin subpath. The main Jellyfin UI works perfectly. The problem is isolated to WebSockets. When a browser tries to use SyncPlay, the developer console shows the connection to wss ![]() The Jellyfin Backend is Working Correctly. I have bypassed Nginx and tested the backend directly from the server's command line using curl. When I send a manual WebSocket upgrade request to http://127.0.0.1:8096/jellyfin/socket, Jellyfin responds correctly with HTTP/1.1 101 Switching Protocols. This proves the application itself is not the source of the failure. The Nginx and Jellyfin Configurations Are Correct. I have configured both Nginx and Jellyfin according to official documentation for a reverse proxy with SSL Termination and a subpath. Jellyfin network.xml: BaseUrl is set to /jellyfin and internal HTTPS is disabled. Nginx jellyfin.conf: I am using the standard headers: proxy_http_version 1.1; , proxy_set_header Upgrade $http_upgrade; , and proxy_set_header Connection "upgrade"; . Normal HTTP traffic is being proxied successfully. Despite both Jellyfin and Nginx being configured correctly, the proxied WebSocket handshake fails when initiated by a browser. Given that Jellyfin works correctly when contacted directly, but fails when the WebSocket request comes from the Nginx proxy, what could be causing this breakdown in the proxy translation? Could this be a bug in how Jellyfin/Kestrel handles proxied WebSocket connections on a subpath, or a subtle issue with the SeedIt4.me environment? Thank you for your time. RE: SyncPlay Fails - niels - 2025-06-29 Because you're using a base URL the config needs to be slightly different. Can you share the complete content of your Nginx config (obviously hide your domain from it) RE: SyncPlay Fails - xtendo - 2025-06-29 (2025-06-29, 06:17 AM)niels Wrote: Because you're using a base URL the config needs to be slightly different. Can you share the complete content of your Nginx config (obviously hide your domain from it) Thanks so much for taking a look at this, I really appreciate it. That's what I suspected as well – that the /jellyfin subpath is the source of this subtle problem. I've tried many configurations, and I'm very interested to see what you think.Here is the complete content of my /etc/nginx/apps/jellyfin.conf file. This is the final, stable configuration that allows the main UI to work perfectly, but where SyncPlay (WebSocket) still fails.
nginx
For completeness, and to save you time, here is some additional context: The Jellyfin backend is correctly configured for this proxy. The file /etc/jellyfin/network.xml has <BaseUrl>/jellyfin</BaseUrl> set, and internal HTTPS is disabled (<EnableHttps>false</EnableHttps> ).I also attempted using the advanced map directive in /etc/nginx/nginx.conf to set the Connection header, and I tried temporarily disabling http2 on the main listener. Neither of these attempts fixed the WebSocket issue.The core mystery is that a direct curl test to http://127.0.0.1:8096/jellyfin/socket from the server's command line works perfectly, but the same connection fails when proxied through Nginx.Thank you again for your help. Please let me know if you see anything out of place or if you need the contents of any other files. RE: SyncPlay Fails - niels - 2025-06-29 That location block does look right to me. Comparing it to my own Nginx config one thing you could try it to also add a proxy_set_header for the X-Forwarded-Protocol header. For reference, here is my entire location block: Code: location / { RE: SyncPlay Fails - xtendo - 2025-06-29 (2025-06-29, 10:07 AM)niels Wrote: That location block does look right to me. Comparing it to my own Nginx config one thing you could try it to also add a proxy_set_header for the X-Forwarded-Protocol header. Hi, thanks so much for the suggestions and for sharing your config. I really appreciate you taking the time to help. I have just updated my /etc/nginx/apps/jellyfin.conf file to include the two directives you recommended: proxy_set_header X-Forwarded-Protocol $scheme; and proxy_cache off; . Unfortunately, after saving the file, confirming the config with nginx -t , restarting Nginx, and doing a hard refresh in my browser, the problem remains exactly the same. The main UI works perfectly, but clicking to join a SyncPlay group is still unresponsive, and the WebSocket connection fails. For full transparency, so you can see exactly what was tried, here is the complete and final jellyfin.conf file that incorporates your suggestions and is still not working for SyncPlay: Code: # This specific block handles the WebSocket traffic for SyncPlay. RE: SyncPlay Fails - niels - 2025-06-30 Try removing the location block for the /jellyfin/socket route as you've already configured the WebSocket support for all routes. If it then still doesn't work I merged your config with mine so try and see if that solves it. Code: location /jellyfin { RE: SyncPlay Fails - xtendo - 2025-06-30 (2025-06-30, 06:21 AM)niels Wrote: Try removing the location block for the /jellyfin/socket route as you've already configured the WebSocket support for all routes. If it then still doesn't work I merged your config with mine so try and see if that solves it. I have just replaced my entire location /jellyfin block with the exact one you suggested, including the additional X-Forwarded-Host , X-Forwarded-Protocol , and proxy_cache off directives. Unfortunately, after restarting Nginx and performing a hard refresh, the result is exactly the same. The main Jellyfin UI works perfectly, but clicking to join a SyncPlay group is still unresponsive. I really appreciate you taking the time to help me diagnose this. Thank you again for your expertise. RE: SyncPlay Fails - niels - 2025-06-30 The only thing I can think of is changing the proxy_pass directive. If that doesn't work I don't know what the issue could be. Try the following options (note the slash at the end in the first one): Code: proxy_pass http://127.0.0.1:8096/; Code: proxy_pass http://127.0.0.1:8096/jellyfin/; Code: proxy_pass http://127.0.0.1:8096/jellyfin; RE: SyncPlay Fails - xtendo - 2025-06-30 (2025-06-30, 12:13 PM)niels Wrote: The only thing I can think of is changing the proxy_pass directive. If that doesn't work I don't know what the issue could be. I tried the proxy_pass changes you recommended. Unfortunately, they either broke the site or didn't solve the SyncPlay issue, so I've reverted the configuration back to the last stable version. It looks like this isn't a simple configuration problem. I appreciate all your time trying to help debug it. Thanks again. |