• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting Websockets dying and freezing playback

     
    • 0 Vote(s) - 0 Average

    Websockets dying and freezing playback

    nickshanks
    Offline

    Junior Member

    Posts: 3
    Threads: 1
    Joined: 2024 May
    Reputation: 0
    Country:United Kingdom
    #1
    2024-05-10, 12:16 PM (This post was last modified: 2024-05-10, 12:17 PM by nickshanks. Edited 1 time in total.)
    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?
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,375
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2024-05-10, 01:28 PM
    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.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    mcarlton00
    Offline

    Kodi Addon Maintainer

    Posts: 145
    Threads: 1
    Joined: 2023 Sep
    Reputation: 9
    Country:United States
    #3
    2024-05-10, 01:34 PM
    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
    nickshanks
    Offline

    Junior Member

    Posts: 3
    Threads: 1
    Joined: 2024 May
    Reputation: 0
    Country:United Kingdom
    #4
    2024-05-11, 11:10 AM
    (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?
    jaillybelly
    Offline

    Junior Member

    Posts: 3
    Threads: 0
    Joined: 2024 Dec
    Reputation: 0
    Country:Canada
    #5
    2024-12-14, 09:22 PM
    Can confirm I'm seeing the same issue. Jellyfin on Google TV over wireguard for high bitrate files causes playback to freeze and coincides with <The remote party closed the WebSocket connection without completing the close handshake.> as described above.

    It's also the case on mobile android only over wireguard VPN. I've narrowed it down to exoplayer, as using external players like VLC fixes the issue. Playback is fine outside of the tunnel, regardless of where it sits in the network. How can I help get this fixed? I have done extensive testing across multiple networks and platforms and am confident it's exoplayer over wireguard.
    trannon
    Offline

    Junior Member

    Posts: 1
    Threads: 0
    Joined: 2025 Apr
    Reputation: 0
    Country:United States
    #6
    2025-04-29, 06:50 PM
    I've seen something very like this myself, probably the same thing. I have a working Jellyfin server on my local network that streams without issue to tablets, Macs, and a Roku stick. However streaming the same files to either an ONN android tv 4k or an ONN android tv 4k Pro over the same network and on the same TV the Roku is connected to freezes after 5-12 minutes.

    The issue seems to be in the Jellyfin client for android tv, and might not appear with lower bitrate files.

    I also noted that the ONN android tv 4k was underpowered for 4K files (although it's not a 4K TV) and dropped a lot of frames. The ONN android tv 4k Pro can play those files without dropping frames. The Roku stick (which is a couple of years older than either of those devices) has no trouble playing these files.
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode