Jellyfin Forum
Websockets dying and freezing playback - 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: Websockets dying and freezing playback (/t-websockets-dying-and-freezing-playback)



Websockets dying and freezing playback - nickshanks - 2024-05-10

This issue seems to occur on Jellyfin for Android TV and also the Kodi plugin, both on my Chromecast. I have ordered a Fire Stick 4K to test with.

The Jellyfin app connects to my server over a Wireguard VPN. I can play content and then randomly the stream will just freeze. I have to back out and resume again in order for it to start working again. This occurs randomly, sometimes every couple of minutes, sometimes every hour but it's super annoying. I can see lines like the following in my logs:

Code:
jellyfin  | [13:08:15] [INF] [31] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: Saving playback tracking activity in DB
jellyfin  | [13:08:16] [WRN] [37] Emby.Server.Implementations.HttpServer.WebSocketConnection: WS 10.13.13.9 error receiving data: The remote party closed the WebSocket connection without completing the close handshake.
jellyfin  | [13:08:16] [INF] [37] Emby.Server.Implementations.HttpServer.WebSocketManager: WS 10.13.13.9 closed
jellyfin  | [13:08:17] [INF] [27] Emby.Server.Implementations.HttpServer.WebSocketManager: WS 10.13.13.9 request
jellyfin  | [13:09:06] [INF] [34] Emby.Server.Implementations.Session.SessionWebSocketListener: Sending ForceKeepAlive message to 1 inactive WebSockets.
jellyfin  | [13:09:18] [INF] [45] Emby.Server.Implementations.Session.SessionWebSocketListener: Lost 1 WebSockets.

I'm assuming what's happening is somehow the websockets are dying and then the playback will continue from the buffer for another 5-10 seconds and then it freezes, because the websocket isn't there and therefore there's no stream coming in.

Accessing the server through the web UI or through JMP (also over the same Wireguard VPN) seems to be ok, no freezes occur. It's either a Chromecast issue or a Jellyfin for Android TV issue.

Why does this happen and how can I troubleshoot this?


RE: Websockets dying and freezing playback - TheDreadPirate - 2024-05-10

Is each client running the VPN or are you running a Wireguard VPN on your router? I wasn't aware that Wireguard could be run on an Android TV device.


RE: Websockets dying and freezing playback - mcarlton00 - 2024-05-10

Playback doesn't happen over websockets. Websockets are primarily used for updates and notifications. So the websockets dying shouldn't be causing playback issues. However, the websocket dying does indicate you've likely had a network interruption between client and server, and that could certainly be causing playback issues


RE: Websockets dying and freezing playback - nickshanks - 2024-05-11

(2024-05-10, 01:28 PM)TheDreadPirate Wrote: Is each client running the VPN or are you running a Wireguard VPN on your router?  I wasn't aware that Wireguard could be run on an Android TV device.

Android TV can run a Wireguard VPN but I am running it on my router, network-wide. And as I can stream to my PC with no issues, I'm assuming its not that.

(2024-05-10, 01:34 PM)mcarlton00 Wrote: Playback doesn't happen over websockets.  Websockets are primarily used for updates and notifications.  So the websockets dying shouldn't be causing playback issues.  However, the websocket dying does indicate you've likely had a network interruption between client and server, and that could certainly be causing playback issues

Ah I didn't know that. But yes, still indicates an issue. Do you know if there are any direct stream logs? Or any other way I can troubleshoot this?