Jellyfin Forum
Jellyfin LXC failure - 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: Jellyfin LXC failure (/t-jellyfin-lxc-failure)

Pages: 1 2


Jellyfin LXC failure - drindor83 - 2025-02-24

Hi all,

Since the Update 10.10.x I have the problem every now an then my jellyfin lxc begins to generate high CPU and RAM utilization. When I get the message from my server and start to access the jellyfin website I cant reach it anymore, the lxc is pingable and I can type commands. But when I poweroff the lxc I get Error messages in my proxmox node:

Code:
Feb 24 19:56:06 host1 pvedaemon[2217945]: unable to get PID for CT 302 (not running?)
Feb 24 19:56:07 host1 pvedaemon[2217945]: unable to get PID for CT 302 (not running?)
Feb 24 19:56:08 host1 pvedaemon[2217945]: unable to get PID for CT 302 (not running?)
Feb 24 19:56:09 host1 pvedaemon[2215898]: unable to get PID for CT 302 (not running?)
Feb 24 19:56:10 host1 pvedaemon[2217945]: unable to get PID for CT 302 (not running?)
Feb 24 19:56:12 host1 pvedaemon[2217945]: unable to get PID for CT 302 (not running?)
Feb 24 19:56:13 host1 pvedaemon[2215898]: unable to get PID for CT 302 (not running?)
Feb 24 19:56:14 host1 pvedaemon[2217945]: unable to get PID for CT 302 (not running?)

After 5mins the lxc powered off and I can restart it normally.

Now the interesting part, in the log File from Jellyfin I found these here:

Code:
System.Net.WebSockets.WebSocketException (2): The WebSocket is in an invalid state ('Closed') for this operation. Valid states are: 'Open, CloseReceived'
  at System.Net.WebSockets.ManagedWebSocket.SendAsync(ReadOnlyMemory`1 buffer, WebSocketMessageType messageType, WebSocketMessageFlags messageFlags, CancellationToken cancellationToken)
--- End of stack trace from previous location ---
  at Emby.Server.Implementations.HttpServer.WebSocketConnection.ProcessInternal(PipeReader reader)
  at Emby.Server.Implementations.HttpServer.WebSocketConnection.ReceiveAsync(CancellationToken cancellationToken)
  at Emby.Server.Implementations.HttpServer.WebSocketManager.WebSocketRequestHandler(HttpContext context)
  at Emby.Server.Implementations.HttpServer.WebSocketManager.WebSocketRequestHandler(HttpContext context)
[2025-02-24 18:53:11.472 +00:00] [ERR] WS "IP Adress" WebSocketRequestHandler error
System.Net.WebSockets.WebSocketException (0x80004005): The WebSocket is in an invalid state ('Closed') for this operation. Valid states are: 'Open, CloseReceived'
  at System.Net.WebSockets.ManagedWebSocket.SendAsync(ReadOnlyMemory`1 buffer, WebSocketMessageType messageType, WebSocketMessageFlags messageFlags, CancellationToken cancellationToken)
--- End of stack trace from previous location ---
  at Emby.Server.Implementations.HttpServer.WebSocketConnection.ProcessInternal(PipeReader reader)
  at Emby.Server.Implementations.HttpServer.WebSocketConnection.ReceiveAsync(CancellationToken cancellationToken)
  at Emby.Server.Implementations.HttpServer.WebSocketManager.WebSocketRequestHandler(HttpContext context)
  at Emby.Server.Implementations.HttpServer.WebSocketManager.WebSocketRequestHandler(HttpContext context)
[2025-02-24 18:53:16.573 +00:00] [ERR] WS "IPAdress" WebSocketRequestHandler error
System.Net.WebSockets.WebSocketException (0x80004005): The WebSocket is in an invalid state ('Closed') for this operation. Valid states are: 'Open, CloseReceived'
  at System.Net.WebSockets.ManagedWebSocket.SendAsync(ReadOnlyMemory`1 buffer, WebSocketMessageType messageType, WebSocketMessageFlags messageFlags, CancellationToken cancellationToken)
--- End of stack trace from previous location ---
  at Emby.Server.Implementations.HttpServer.WebSocketConnection.ProcessInternal(PipeReader reader)
  at Emby.Server.Implementations.HttpServer.WebSocketConnection.ReceiveAsync(CancellationToken cancellationToken)
  at Emby.Server.Implementations.HttpServer.WebSocketManager.WebSocketRequestHandler(HttpContext context)
  at Emby.Server.Implementations.HttpServer.WebSocketManager.WebSocketRequestHandler(HttpContext context)
[2025-02-24 18:53:18.171 +00:00] [ERR] WS "192.168.0.12" WebSocketRequestHandler error
System.Net.WebSockets.WebSocketException (0x80004005): The WebSocket is in an invalid state ('Closed') for this operation. Valid states are: 'Open, CloseReceived'
  at System.Net.WebSockets.ManagedWebSocket.SendAsync(ReadOnlyMemory`1 buffer, WebSocketMessageType messageType, WebSocketMessageFlags messageFlags, CancellationToken cancellationToken)
--- End of stack trace from previous location ---
  at Emby.Server.Implementations.HttpServer.WebSocketConnection.ProcessInternal(PipeReader reader)
  at Emby.Server.Implementations.HttpServer.WebSocketConnection.ReceiveAsync(CancellationToken cancellationToken)
  at Emby.Server.Implementations.HttpServer.WebSocketManager.WebSocketRequestHandler(HttpContext context)
  at Emby.Server.Implementations.HttpServer.WebSocketManager.WebSocketRequestHandler(HttpContext context)

Where is the problem now? I really dont know where to start searching.

my jellfin version:

Code:
[2025-02-24 18:56:40.807 +00:00] [INF] Jellyfin version: "10.10.6"
[2025-02-24 18:56:40.820 +00:00] [INF] Environment Variables: ["[JELLYFIN_ADDITIONAL_OPTS, ]", "[JELLYFIN_DATA_DIR, /var/lib/jellyfin]", "[JELLYFIN_CACHE_DIR, /var/cache/jellyfin]", "[JELLYFIN_LOG_DIR, /var/log/jellyfin]", "[JELLYFIN_FFMPEG_OPT, --ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg]", "[JELLYFIN_WEB_OPT, --webdir=/usr/share/jellyfin/web]", "[JELLYFIN_ARGS, $JELLYFIN_WEB_OPT $JELLYFIN_FFMPEG_OPT $JELLYFIN_SERVICE_OPT $JELLYFIN_NOWEBAPP_OPT $JELLFIN_ADDITIONAL_OPTS --datadir $JELLYFIN_DATA_DIR --configdir $JELLYFIN_CONFIG_DIR --logdir $JELLYFIN_LOG_DIR --cachedir $JELLYFIN_CACHE_DIR]", "[JELLYFIN_USER, jellyfin]", "[JELLYFIN_CONFIG_DIR, /etc/jellyfin]"]
[2025-02-24 18:56:40.821 +00:00] [INF] Arguments: ["/usr/lib/jellyfin/bin/jellyfin.dll", "--webdir=/usr/share/jellyfin/web", "--ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg"]
[2025-02-24 18:56:40.821 +00:00] [INF] Operating system: "Ubuntu 24.04.2 LTS"
[2025-02-24 18:56:40.821 +00:00] [INF] Architecture: X64
[2025-02-24 18:56:40.822 +00:00] [INF] 64-Bit Process: True
[2025-02-24 18:56:40.822 +00:00] [INF] User Interactive: True
[2025-02-24 18:56:40.822 +00:00] [INF] Processor count: 6
[2025-02-24 18:56:40.822 +00:00] [INF] Program data path: "/var/lib/jellyfin"
[2025-02-24 18:56:40.822 +00:00] [INF] Log directory path: "/var/log/jellyfin"
[2025-02-24 18:56:40.822 +00:00] [INF] Config directory path: "/etc/jellyfin"
[2025-02-24 18:56:40.822 +00:00] [INF] Cache path: "/var/cache/jellyfin"
[2025-02-24 18:56:40.822 +00:00] [INF] Temp directory path: "/tmp/jellyfin"
[2025-02-24 18:56:40.822 +00:00] [INF] Web resources path: "/usr/share/jellyfin/web"
[2025-02-24 18:56:40.822 +00:00] [INF] Application directory: "/usr/lib/jellyfin/bin/"
[2025-02-24 18:56:40.894 +00:00] [INF] Setting cache path: "/var/cache/jellyfin"
[2025-02-24 18:56:40.933 +00:00] [INF] Loading assemblies
[2025-02-24 18:56:40.955 +00:00] [INF] Loaded assembly "LiteDB, Version=5.0.15.0, Culture=neutral, PublicKeyToken=Token" from "/var/lib/jellyfin/plugins/Kodi Sync Queue_14.0.0.0/LiteDB.dll"
[2025-02-24 18:56:40.955 +00:00] [INF] Loaded assembly "Jellyfin.Plugin.KodiSyncQueue, Version=14.0.0.0, Culture=neutral, PublicKeyToken=null" from "/var/lib/jellyfin/plugins/Kodi Sync Queue_14.0.0.0/Jellyfin.Plugin.KodiSyncQueue.dll"
[2025-02-24 18:56:40.960 +00:00] [INF] Loaded assembly "System.IO.Packaging, Version=4.0.5.0, Culture=neutral, PublicKeyToken=Token" from "/var/lib/jellyfin/plugins/Reports_17.0.0.0/System.IO.Packaging.dll"
[2025-02-24 18:56:40.963 +00:00] [INF] Loaded assembly "SixLabors.Fonts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=Token" from "/var/lib/jellyfin/plugins/Reports_17.0.0.0/SixLabors.Fonts.dll"
[2025-02-24 18:56:40.963 +00:00] [INF] Loaded assembly "ExcelNumberFormat, Version=1.1.0.0, Culture=neutral, PublicKeyToken=Token" from "/var/lib/jellyfin/plugins/Reports_17.0.0.0/ExcelNumberFormat.dll"
[2025-02-24 18:56:40.974 +00:00] [INF] Loaded assembly "ClosedXML, Version=0.97.0.0, Culture=neutral, PublicKeyToken=Token" from "/var/lib/jellyfin/plugins/Reports_17.0.0.0/ClosedXML.dll"
[2025-02-24 18:56:41.031 +00:00] [INF] Loaded assembly "DocumentFormat.OpenXml, Version=2.16.0.0, Culture=neutral, PublicKeyToken=Token" from "/var/lib/jellyfin/plugins/Reports_17.0.0.0/DocumentFormat.OpenXml.dll"
[2025-02-24 18:56:41.033 +00:00] [INF] Loaded assembly "Jellyfin.Plugin.Reports, Version=17.0.0.0, Culture=neutral, PublicKeyToken=null" from "/var/lib/jellyfin/plugins/Reports_17.0.0.0/Jellyfin.Plugin.Reports.dll"
[2025-02-24 18:56:41.033 +00:00] [INF] Loaded assembly "Jellyfin.Plugin.SkinManager, Version=2.0.2.0, Culture=neutral, PublicKeyToken=null" from "/var/lib/jellyfin/plugins/Skin Manager_2.0.2.0/Jellyfin.Plugin.SkinManager.dll"
[2025-02-24 18:56:41.044 +00:00] [INF] Loaded assembly "MailKit, Version=4.8.0.0, Culture=neutral, PublicKeyToken=Token" from "/var/lib/jellyfin/plugins/Webhook_17.0.0.0/MailKit.dll"
[2025-02-24 18:56:41.060 +00:00] [INF] Loaded assembly "BouncyCastle.Cryptography, Version=2.0.0.0, Culture=neutral, PublicKeyToken=Token" from "/var/lib/jellyfin/plugins/Webhook_17.0.0.0/BouncyCastle.Cryptography.dll"
[2025-02-24 18:56:41.061 +00:00] [INF] Loaded assembly "MQTTnet.Extensions.ManagedClient, Version=4.3.7.1207, Culture=neutral, PublicKeyToken=Token" from "/var/lib/jellyfin/plugins/Webhook_17.0.0.0/MQTTnet.Extensions.ManagedClient.dll"
[2025-02-24 18:56:41.066 +00:00] [INF] Loaded assembly "Handlebars, Version=2.1.6.0, Culture=neutral, PublicKeyToken=Token" from "/var/lib/jellyfin/plugins/Webhook_17.0.0.0/Handlebars.dll"
[2025-02-24 18:56:41.069 +00:00] [INF] Loaded assembly "MQTTnet, Version=4.3.7.1207, Culture=neutral, PublicKeyToken=Token" from "/var/lib/jellyfin/plugins/Webhook_17.0.0.0/MQTTnet.dll"
[2025-02-24 18:56:41.075 +00:00] [INF] Loaded assembly "MimeKit, Version=4.8.0.0, Culture=neutral, PublicKeyToken=Token" from "/var/lib/jellyfin/plugins/Webhook_17.0.0.0/MimeKit.dll"
[2025-02-24 18:56:41.077 +00:00] [INF] Loaded assembly "Jellyfin.Plugin.Webhook, Version=17.0.0.0, Culture=neutral, PublicKeyToken=null" from "/var/lib/jellyfin/plugins/Webhook_17.0.0.0/Jellyfin.Plugin.Webhook.dll"
[2025-02-24 18:56:41.115 +00:00] [INF] Defined LAN subnets: ["127.0.0.1/8", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"]
[2025-02-24 18:56:41.115 +00:00] [INF] Defined LAN exclusions: []
[2025-02-24 18:56:41.115 +00:00] [INF] Used LAN subnets: ["127.0.0.1/8", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"]
[2025-02-24 18:56:41.116 +00:00] [INF] Filtered interface addresses: ["127.0.0.1", "192.168.0.205"]
[2025-02-24 18:56:41.116 +00:00] [INF] Bind Addresses ["0.0.0.0"]
[2025-02-24 18:56:41.116 +00:00] [INF] Remote IP filter is "Allowlist"
[2025-02-24 18:56:41.116 +00:00] [INF] Filtered subnets: []
[2025-02-24 18:56:45.961 +00:00] [INF] KodiSyncQueue is starting...
[2025-02-24 18:56:45.961 +00:00] [INF] Creating DB Repository...
[2025-02-24 18:56:45.995 +00:00] [INF] Loaded plugin: "Kodi Sync Queue" "14.0.0.0"
[2025-02-24 18:56:45.996 +00:00] [INF] Loaded plugin: "Reports" "17.0.0.0"
[2025-02-24 18:56:45.997 +00:00] [INF] Loaded plugin: "SkinManager" "2.0.2.0"
[2025-02-24 18:56:45.997 +00:00] [INF] Loaded plugin: "Webhook" "17.0.0.0"
[2025-02-24 18:56:45.998 +00:00] [INF] Loaded plugin: "TMDb" "10.10.6.0"
[2025-02-24 18:56:45.998 +00:00] [INF] Loaded plugin: "Studio Images" "10.10.6.0"
[2025-02-24 18:56:45.998 +00:00] [INF] Loaded plugin: "OMDb" "10.10.6.0"
[2025-02-24 18:56:46.011 +00:00] [INF] Loaded plugin: "MusicBrainz" "10.10.6.0"
[2025-02-24 18:56:46.011 +00:00] [INF] Loaded plugin: "AudioDB" "10.10.6.0"

The access to my jellyfin is over Internet --> VPS with NginxProxy Manager --> VPN --> Homeserver.

Can someone help me? Thank you in advance


RE: Jellyfin LXC failure - TheDreadPirate - 2025-02-25

Can you share your full Jellyfin log via privatebin.net?


RE: Jellyfin LXC failure - drindor83 - 2025-02-25

(2025-02-25, 01:58 PM)TheDreadPirate Wrote: Can you share your full Jellyfin log via privatebin.net?

Well I can, but the log File is very big and long and full of IP Adresses and Infos about my movie libary. Which parts of the log file do you need apart from them which I already posted ? Smiling-face


RE: Jellyfin LXC failure - TheDreadPirate - 2025-02-25

Find a section where you start seeing these websocket message and then Jellyfin restarts. Provide the last ~1000 lines prior to the restart so I can see what activity is going on prior to these messages appearing.

FWIW, privatebin.net does provide password protection and paste expiration.


RE: Jellyfin LXC failure - drindor83 - 2025-02-26

(2025-02-25, 03:19 PM)TheDreadPirate Wrote: Find a section where you start seeing these websocket message and then Jellyfin restarts.  Provide the last ~1000 lines prior to the restart so I can see what activity is going on prior to these messages appearing.

FWIW, privatebin.net does provide password protection and paste expiration.

So here is the Logfile from today where another crash happened  https://privatebin.net/?889a2a3e3f3bfca8#D54YPG45ZB8kWHJW2noB45PwSnB13XAXBCAyWpViSCa4

I think I found the client who is responsible for the crashing: https://privatebin.net/?d8d3cfc0049fa2a6#7njRZ9Hz31PWKVKKb5niWLaDN5vHDcdL4WELy4JGUYnF , Am i right at the guess? 

Or is it another problem?

Edit: I deleted my LInk and the Userinformations marked with deleted or mylinkdeleted


RE: Jellyfin LXC failure - TheDreadPirate - 2025-02-26

Do you have real time monitoring enabled?


RE: Jellyfin LXC failure - drindor83 - 2025-02-26

(2025-02-26, 07:20 PM)TheDreadPirate Wrote: Do you have real time monitoring enabled?

Where do I check this?

PS: my Files are over a SMB Share connected with the LXC Container.

misclicked "marked as Solution" --> can someone redo this pls


RE: Jellyfin LXC failure - TheDreadPirate - 2025-02-26

It is in the settings for each library. Real time monitoring is enabled by default. In some situations it will passively use up and exhaust your memory. And I believe real time monitoring of a SMB share is problematic.

I cannot unmark your post as a solution. :-(


RE: Jellyfin LXC failure - drindor83 - 2025-02-26

(2025-02-26, 07:36 PM)TheDreadPirate Wrote: It is in the settings for each library.  Real time monitoring is enabled by default.  In some situations it will passively use up and exhaust your memory.  And I believe real time monitoring of a SMB share is problematic.

I cannot unmark your post as a solution.  :-(

Yes it is active in my libary, just checked it. ANd I have a scan every 15min for new content. But I don´t think thats the problem here.
The server is up and running since 2 years now, and only since version 10.10.x I have this problem with the complete freeze up.

This are btw my serverstats for the lxc right now:

CPU usage 0.48% of 6 CPU(s)
Memory usage 21.46% (1.72 GiB of 8.00 GiB)
SWAP usage 0.00% (0 B of 1.00 GiB)
Bootdisk size 20.20% (20.20 GiB of 100.00 GiB)


RE: Jellyfin LXC failure - TheDreadPirate - 2025-02-26

Try disabling it anyway. Real time monitoring of SMB shares doesn't work the same as it would on a local disk.