[Issue]: Jellyfin crash if client "disappears" without completing the close handshake. #6006

Closed
opened 2025-12-22 03:22:07 +01:00 by backuprepo · 8 comments
Owner

Originally created by @bigrichwood on GitHub (Jun 13, 2024).

Please describe your bug

Jellyfin sometimes crashes and restarts if a client disconnects unexpectedly.

I have seen this a few times in the last few days, all from different clients, and for slightly different reasons. Each time no clients were playing back any media, there were just web pages open to the main page and the dashboard. In each case the first log entry is:
"The remote party closed the WebSocket connection without completing the close handshake."

The last three instances were:

M1 Macbook Air, connected to Jellyfin web interface via Firefox. Laptop went to sleep automatically and Jellyfin crashed

Windows 11 PC, connected to Jellyfin web interface via Firefox. Put desktop to sleep manually and Jellyfin crashed

Windows 11 PC (a different one, 192.168.0.111 in the logs below), connected to Jellyfin web interface via Firefox. VPN client reconnected causing the PC to drop off the network briefly, Jellyfin crashed.

Reproduction Steps

As yet can't reproduce on demand. It doesn't happen everytime a client disconnects or is suspended, but all crashes happen after this occurs.

I never saw this on 10.8.x, and didn't run some of the earlier 10.9.x versions long enough to see it happen.

Jellyfin Version

Master branch

if other:

10.9.6

Environment

Server is a Synology DS423+, latest version of DSM (7.2.1-69057 Update 5).
Intel Celeron J4125, 18GB RAM. 
No proxy involved, no URL changes. 
Storage all local on Synology. 
No playback taking place at the time of the crash.

Browser: Current version of Firefox on all machines. No client logs as it happens when client is not actively in use. 

docker compose file: 

services:
  jellyfin:
    image: jellyfin/jellyfin
    container_name: jellyfin
    network_mode: host
    volumes:
      - /volume2/docker/jellyfin/config:/config
      - /volume2/docker/jellyfin/cache:/cache
      - /volume1/media:/Media
    restart: 'unless-stopped'
    environment:
      - TZ='Europe/London'
    devices:
      - /dev/dri/renderD128:/dev/dri/renderD128
      - /dev/dri/card0:/dev/dri/card0

- Plugins:
Kodi Sync Queue
Merge Versions
Open Subtitle
Playback Reporting
Session Cleaner
Subtitle Extract
TheTVDB
TMDb Box Sets
Trakt
Webook
IMDb
Studio Images
OMDb
MusicBrainz
AudioDB

Jellyfin logs

[2024-06-13 15:24:31.776 +00:00] [INF] [27] Trakt.Helpers.LibraryManagerEventsHelper: No shows with event type Update to process
[2024-06-13 15:27:28.235 +00:00] [WRN] [28] Emby.Server.Implementations.HttpServer.WebSocketConnection: WS "192.168.0.111" error receiving data: "The remote party closed the WebSocket connection without completing the close handshake."
[2024-06-13 15:27:28.235 +00:00] [WRN] [37] Emby.Server.Implementations.HttpServer.WebSocketConnection: WS "192.168.0.111" error receiving data: "The remote party closed the WebSocket connection without completing the close handshake."
[2024-06-13 15:27:28.239 +00:00] [INF] [37] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "192.168.0.111" closed
[2024-06-13 15:27:28.239 +00:00] [INF] [28] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "192.168.0.111" closed
[2024-06-13 15:27:28.246 +00:00] [FTL] [22] Main: Unhandled Exception
System.NullReferenceException: Object reference not set to an instance of an object.
   at Emby.Server.Implementations.Session.WebSocketController.<>c.<GetActiveSockets>b__12_0(IWebSocketConnection i)
   at System.Linq.Enumerable.WhereListIterator`1.MoveNext()
   at System.Linq.Enumerable.<Any>g__WithEnumerator|36_0[TSource](IEnumerable`1 source)
   at Emby.Server.Implementations.Session.WebSocketController.get_IsSessionActive()
   at Emby.Server.Implementations.Session.SessionManager.<>c.<CloseIfNeededAsync>b__52_0(ISessionController i)
   at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
   at Emby.Server.Implementations.Session.SessionManager.CloseIfNeededAsync(SessionInfo session)
   at Emby.Server.Implementations.Session.WebSocketController.OnConnectionClosed(Object sender, EventArgs e)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
[2024-06-13 15:27:28.246 +00:00] [FTL] [37] Main: Unhandled Exception
System.NullReferenceException: Object reference not set to an instance of an object.
   at Emby.Server.Implementations.Session.WebSocketController.<>c.<GetActiveSockets>b__12_0(IWebSocketConnection i)
   at System.Linq.Enumerable.WhereListIterator`1.MoveNext()
   at System.Linq.Enumerable.<Any>g__WithEnumerator|36_0[TSource](IEnumerable`1 source)
   at Emby.Server.Implementations.Session.WebSocketController.get_IsSessionActive()
   at Emby.Server.Implementations.Session.SessionManager.<>c.<CloseIfNeededAsync>b__52_0(ISessionController i)
   at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
   at Emby.Server.Implementations.Session.SessionManager.CloseIfNeededAsync(SessionInfo session)
   at Emby.Server.Implementations.Session.WebSocketController.OnConnectionClosed(Object sender, EventArgs e)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
[2024-06-13 15:27:46.590 +00:00] [INF] [1] Main: Jellyfin version: "10.9.6"
[2024-06-13 15:27:46.625 +00:00] [INF] [1] Main: Environment Variables: ["[JELLYFIN_CACHE_DIR, /cache]", "[JELLYFIN_FFMPEG, /usr/lib/jellyfin-ffmpeg/ffmpeg]", "[JELLYFIN_WEB_DIR, /jellyfin/jellyfin-web]", "[JELLYFIN_CONFIG_DIR, /config/config]", "[JELLYFIN_LOG_DIR, /config/log]", "[JELLYFIN_DATA_DIR, /config]"]
[2024-06-13 15:27:46.628 +00:00] [INF] [1] Main: Arguments: ["/jellyfin/jellyfin.dll", "--ffmpeg", "/usr/lib/jellyfin-ffmpeg/ffmpeg"]
[2024-06-13 15:27:46.630 +00:00] [INF] [1] Main: Operating system: "Debian GNU/Linux 12 (bookworm)"
[2024-06-13 15:27:46.630 +00:00] [INF] [1] Main: Architecture: X64
[2024-06-13 15:27:46.631 +00:00] [INF] [1] Main: 64-Bit Process: True
[2024-06-13 15:27:46.631 +00:00] [INF] [1] Main: User Interactive: True
[2024-06-13 15:27:46.631 +00:00] [INF] [1] Main: Processor count: 4
[2024-06-13 15:27:46.631 +00:00] [INF] [1] Main: Program data path: "/config"
[2024-06-13 15:27:46.631 +00:00] [INF] [1] Main: Log directory path: "/config/log"
[2024-06-13 15:27:46.631 +00:00] [INF] [1] Main: Config directory path: "/config/config"
[2024-06-13 15:27:46.632 +00:00] [INF] [1] Main: Cache path: "/cache"
[2024-06-13 15:27:46.632 +00:00] [INF] [1] Main: Web resources path: "/jellyfin/jellyfin-web"
[2024-06-13 15:27:46.632 +00:00] [INF] [1] Main: Application directory: "/jellyfin/"
[2024-06-13 15:27:46.897 +00:00] [INF] [1] Emby.Server.Implementations.AppBase.BaseConfigurationManager: Setting cache path: "/cache"
[2024-06-13 15:27:47.051 +00:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loading assemblies
[2024-06-13 15:27:47.077 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "InfuseSync, Version=1.5.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/InfuseSync_1.5.0.0/InfuseSync.dll"
[2024-06-13 15:27:47.093 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "LiteDB, Version=5.0.15.0, Culture=neutral, PublicKeyToken=4ee40123013c9f27" from "/config/plugins/Kodi Sync Queue_11.0.0.0/LiteDB.dll"
[2024-06-13 15:27:47.094 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Jellyfin.Plugin.KodiSyncQueue, Version=11.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/Kodi Sync Queue_11.0.0.0/Jellyfin.Plugin.KodiSyncQueue.dll"
[2024-06-13 15:27:47.097 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Jellyfin.Plugin.MergeVersions, Version=10.9.1.1, Culture=neutral, PublicKeyToken=null" from "/config/plugins/Merge Versions_10.9.1.1/Jellyfin.Plugin.MergeVersions.dll"
[2024-06-13 15:27:47.101 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Jellyfin.Plugin.OpenSubtitles, Version=20.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/Open Subtitles_20.0.0.0/Jellyfin.Plugin.OpenSubtitles.dll"
[2024-06-13 15:27:47.106 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Jellyfin.Plugin.PlaybackReporting, Version=14.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/Playback Reporting_14.0.0.0/Jellyfin.Plugin.PlaybackReporting.dll"
[2024-06-13 15:27:47.109 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "SQLitePCL.pretty, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/Playback Reporting_14.0.0.0/SQLitePCL.pretty.dll"
[2024-06-13 15:27:47.110 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Jellyfin.Plugin.SessionCleaner, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/Session Cleaner_3.0.0.0/Jellyfin.Plugin.SessionCleaner.dll"
[2024-06-13 15:27:47.112 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Jellyfin.Plugin.SubtitleExtract, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/Subtitle Extract_4.0.0.0/Jellyfin.Plugin.SubtitleExtract.dll"
[2024-06-13 15:27:47.131 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Tvdb.Sdk, Version=4.7.9.1, Culture=neutral, PublicKeyToken=null" from "/config/plugins/TheTVDB_13.0.0.0/Tvdb.Sdk.dll"
[2024-06-13 15:27:47.137 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Jellyfin.Plugin.Tvdb, Version=13.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/TheTVDB_13.0.0.0/Jellyfin.Plugin.Tvdb.dll"
[2024-06-13 15:27:47.139 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Jellyfin.Plugin.TMDbBoxSets, Version=11.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/TMDb Box Sets_11.0.0.0/Jellyfin.Plugin.TMDbBoxSets.dll"
[2024-06-13 15:27:47.147 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Trakt, Version=25.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/Trakt_25.0.0.0/Trakt.dll"
[2024-06-13 15:27:47.184 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "MQTTnet, Version=4.3.4.1084, Culture=neutral, PublicKeyToken=fdb7629f2e364a63" from "/config/plugins/Webhook_14.0.0.0/MQTTnet.dll"
[2024-06-13 15:27:47.241 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "BouncyCastle.Cryptography, Version=2.0.0.0, Culture=neutral, PublicKeyToken=072edcf4a5328938" from "/config/plugins/Webhook_14.0.0.0/BouncyCastle.Cryptography.dll"
[2024-06-13 15:27:47.274 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "MailKit, Version=4.5.0.0, Culture=neutral, PublicKeyToken=4e064fe7c44a8f1b" from "/config/plugins/Webhook_14.0.0.0/MailKit.dll"
[2024-06-13 15:27:47.291 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Handlebars, Version=2.1.6.0, Culture=neutral, PublicKeyToken=22225d0bf33cd661" from "/config/plugins/Webhook_14.0.0.0/Handlebars.dll"
[2024-06-13 15:27:47.293 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "MQTTnet.Extensions.ManagedClient, Version=4.3.4.1084, Culture=neutral, PublicKeyToken=fdb7629f2e364a63" from "/config/plugins/Webhook_14.0.0.0/MQTTnet.Extensions.ManagedClient.dll"
[2024-06-13 15:27:47.315 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "MimeKit, Version=4.5.0.0, Culture=neutral, PublicKeyToken=bede1c8a46c66814" from "/config/plugins/Webhook_14.0.0.0/MimeKit.dll"
[2024-06-13 15:27:47.319 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Jellyfin.Plugin.Webhook, Version=14.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/Webhook_14.0.0.0/Jellyfin.Plugin.Webhook.dll"
[2024-06-13 15:27:47.440 +00:00] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN subnets: ["127.0.0.1/8", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"]
[2024-06-13 15:27:47.440 +00:00] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN exclusions: []
[2024-06-13 15:27:47.441 +00:00] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Used LAN subnets: ["127.0.0.1/8", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"]
[2024-06-13 15:27:47.443 +00:00] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Filtered interface addresses: ["127.0.0.1", "192.168.0.50", "192.168.0.51", "172.17.0.1", "172.25.0.1", "172.19.0.1"]
[2024-06-13 15:27:47.444 +00:00] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Bind Addresses ["0.0.0.0"]
[2024-06-13 15:27:47.444 +00:00] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Remote IP filter is "Allowlist"
[2024-06-13 15:27:47.444 +00:00] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Filtered subnets: []
[2024-06-13 15:27:58.258 +00:00] [INF] [1] InfuseSync.Plugin: InfuseSync is starting.
[2024-06-13 15:27:58.286 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "InfuseSync" "1.5.0.0"
[2024-06-13 15:27:58.289 +00:00] [INF] [1] Jellyfin.Plugin.KodiSyncQueue.KodiSyncQueuePlugin: KodiSyncQueue is starting...
[2024-06-13 15:27:58.290 +00:00] [INF] [1] Jellyfin.Plugin.KodiSyncQueue.Data.DbRepo: Creating DB Repository...
[2024-06-13 15:27:58.377 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "Kodi Sync Queue" "11.0.0.0"
[2024-06-13 15:27:58.379 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "Merge Versions" "10.9.1.1"
[2024-06-13 15:27:58.393 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "Open Subtitles" "20.0.0.0"
[2024-06-13 15:27:58.397 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "Playback Reporting" "14.0.0.0"
[2024-06-13 15:27:58.399 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "Session Cleaner" "3.0.0.0"
[2024-06-13 15:27:58.401 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "Subtitle Extract" "4.0.0.0"
[2024-06-13 15:27:58.403 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "TheTVDB" "13.0.0.0"
[2024-06-13 15:27:58.404 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "TMDb Box Sets" "11.0.0.0"
[2024-06-13 15:27:58.406 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "Trakt" "25.0.0.0"
[2024-06-13 15:27:58.409 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "Webhook" "14.0.0.0"
[2024-06-13 15:27:58.410 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "TMDb" "10.9.6.0"
[2024-06-13 15:27:58.410 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "Studio Images" "10.9.6.0"
[2024-06-13 15:27:58.410 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "OMDb" "10.9.6.0"
[2024-06-13 15:27:58.445 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "MusicBrainz" "10.9.6.0"
[2024-06-13 15:27:58.446 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "AudioDB" "10.9.6.0"
[2024-06-13 15:27:58.608 +00:00] [INF] [1] Main: Kestrel is listening on "0.0.0.0"
[2024-06-13 15:27:58.625 +00:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: EventMonitorEntryPoint Running
[2024-06-13 15:27:58.641 +00:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.Data.ActivityRepository: Sqlite version: 3.41.2
[2024-06-13 15:27:58.643 +00:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.Data.ActivityRepository: Sqlite compiler options: ATOMIC_INTRINSICS=1,COMPILER=gcc-9.4.0,DEFAULT_AUTOVACUUM,DEFAULT_CACHE_SIZE=-2000,DEFAULT_FILE_FORMAT=4,DEFAULT_FOREIGN_KEYS,DEFAULT_JOURNAL_SIZE_LIMIT=-1,DEFAULT_MMAP_SIZE=0,DEFAULT_PAGE_SIZE=4096,DEFAULT_PCACHE_INITSZ=20,DEFAULT_RECURSIVE_TRIGGERS,DEFAULT_SECTOR_SIZE=4096,DEFAULT_SYNCHRONOUS=2,DEFAULT_WAL_AUTOCHECKPOINT=1000,DEFAULT_WAL_SYNCHRONOUS=2,DEFAULT_WORKER_THREADS=0,ENABLE_COLUMN_METADATA,ENABLE_FTS3,ENABLE_FTS3_PARENTHESIS,ENABLE_FTS4,ENABLE_FTS5,ENABLE_MATH_FUNCTIONS,ENABLE_RTREE,ENABLE_SNAPSHOT,MALLOC_SOFT_LIMIT=1024,MAX_ATTACHED=10,MAX_COLUMN=2000,MAX_COMPOUND_SELECT=500,MAX_DEFAULT_PAGE_SIZE=8192,MAX_EXPR_DEPTH=1000,MAX_FUNCTION_ARG=127,MAX_LENGTH=1000000000,MAX_LIKE_PATTERN_LENGTH=50000,MAX_MMAP_SIZE=0x7fff0000,MAX_PAGE_COUNT=1073741823,MAX_PAGE_SIZE=65536,MAX_SQL_LENGTH=1000000000,MAX_TRIGGER_DEPTH=1000,MAX_VARIABLE_NUMBER=32766,MAX_VDBE_OP=250000000,MAX_WORKER_THREADS=8,MUTEX_PTHREADS,SYSTEM_MALLOC,TEMP_STORE=1,THREADSAFE=1
[2024-06-13 15:27:58.663 +00:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.Data.ActivityRepository: Default journal_mode for "/config/data/playback_reporting.db" is "delete"
[2024-06-13 15:27:58.664 +00:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.Data.ActivityRepository: Initialize PlaybackActivity Repository
[2024-06-13 15:27:58.668 +00:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.Data.ActivityRepository: PlaybackActivity table schema OK
[2024-06-13 15:27:58.668 +00:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.Data.ActivityRepository: Expected : "datecreated:datetime|userid:text|itemid:text|itemtype:text|itemname:text|playbackmethod:text|clientname:text|devicename:text|playduration:int"
[2024-06-13 15:27:58.668 +00:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.Data.ActivityRepository: Received : "datecreated:datetime|userid:text|itemid:text|itemtype:text|itemname:text|playbackmethod:text|clientname:text|devicename:text|playduration:int"
[2024-06-13 15:27:59.994 +00:00] [WRN] [1] Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware: The WebRootPath was not found: "/wwwroot". Static files may be unavailable.
[2024-06-13 15:28:00.059 +00:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Running startup tasks
[2024-06-13 15:28:00.061 +00:00] [INF] [1] InfuseSync.ScheduledTasks.HousekeepingTask: Infuse housekeeping task scheduled.
[2024-06-13 15:28:00.062 +00:00] [INF] [1] Jellyfin.Plugin.KodiSyncQueue.ScheduledTasks.RetentionTask: Retention task scheduled
[2024-06-13 15:28:00.067 +00:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.TaskCleanDb: TaskCleanDb Loaded
[2024-06-13 15:28:00.068 +00:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.TaskRunBackup: TaskRunBackup Loaded
[2024-06-13 15:28:00.126 +00:00] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for "Remove Old Cached Data" set to fire at 2024-06-14 00:01:00.000 +00:00, which is 08:32:59.8737930 from now.
[2024-06-13 15:28:00.132 +00:00] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for "Remove Old Sync Data" set to fire at 2024-06-14 00:01:00.000 +00:00, which is 08:32:59.8677431 from now.
[2024-06-13 15:28:00.138 +00:00] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for "Playback Reporting Trim Db" set to fire at 2024-06-14 00:00:00.000 +00:00, which is 08:31:59.8613647 from now.
[2024-06-13 15:28:00.153 +00:00] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for "Clean Old Sessions" set to fire at 2024-06-14 06:45:00.000 +00:00, which is 15:16:59.8465269 from now.
[2024-06-13 15:28:00.154 +00:00] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for "Purge TheTVDB plugin cache" set to fire at 2024-06-14 05:45:00.000 +00:00, which is 14:16:59.8452338 from now.
[2024-06-13 15:28:00.155 +00:00] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for "Check for metadata updates." set to fire at 2024-06-13 23:00:00.000 +00:00, which is 07:31:59.8446475 from now.
[2024-06-13 15:28:00.157 +00:00] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for "Import watched states and playback progress from trakt.tv" set to fire at 2024-06-14 01:45:00.000 +00:00, which is 10:16:59.8425557 from now.
[2024-06-13 15:28:00.158 +00:00] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for "Webhook Item Added Notifier" set to fire at 2024-06-13 21:00:00.000 +00:00, which is 05:31:59.8411817 from now.
[2024-06-13 15:28:00.159 +00:00] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for "Webhook Item Added Notifier" set to fire at 2024-06-14 09:00:00.000 +00:00, which is 17:31:59.8408886 from now.
[2024-06-13 15:28:00.169 +00:00] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for "Generate Trickplay Images" set to fire at 2024-06-14 03:00:00.000 +00:00, which is 11:31:59.8305846 from now.
[2024-06-13 15:28:00.172 +00:00] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for "Extract Chapter Images" set to fire at 2024-06-14 02:00:00.000 +00:00, which is 10:31:59.8277633 from now.
[2024-06-13 15:28:00.182 +00:00] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for "Keyframe Extractor" set to fire at 2024-06-14 01:00:00.000 +00:00, which is 09:31:59.8178929 from now.
[2024-06-13 15:28:00.225 +00:00] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Found ffmpeg version "6.0.1"
[2024-06-13 15:28:00.324 +00:00] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available "decoders": ["libdav1d", "av1", "av1_cuvid", "av1_qsv", "h264", "h264_qsv", "h264_cuvid", "hevc", "hevc_qsv", "hevc_cuvid", "mpeg2video", "mpeg2_qsv", "mpeg2_cuvid", "mpeg4", "mpeg4_cuvid", "msmpeg4", "vc1_qsv", "vc1_cuvid", "vp8", "libvpx", "vp8_cuvid", "vp8_qsv", "vp9", "libvpx-vp9", "vp9_cuvid", "vp9_qsv", "aac", "ac3", "dca", "flac", "mp3", "truehd"]
[2024-06-13 15:28:00.360 +00:00] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available "encoders": ["libsvtav1", "av1_nvenc", "av1_qsv", "av1_amf", "av1_vaapi", "libx264", "h264_amf", "h264_nvenc", "h264_qsv", "h264_v4l2m2m", "h264_vaapi", "libx265", "hevc_amf", "hevc_nvenc", "hevc_qsv", "hevc_vaapi", "mjpeg_qsv", "mjpeg_vaapi", "mpeg4", "msmpeg4", "libvpx", "libvpx-vp9", "aac", "libfdk_aac", "ac3", "alac", "dca", "flac", "libmp3lame", "libopus", "truehd", "libvorbis", "srt"]
[2024-06-13 15:28:00.417 +00:00] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available filters: ["deinterlace_qsv", "deinterlace_vaapi", "hwupload_cuda", "hwupload_vaapi", "libplacebo", "overlay_opencl", "overlay_qsv", "overlay_vaapi", "overlay_vulkan", "overlay_cuda", "procamp_vaapi", "scale_cuda", "scale_opencl", "scale_qsv", "scale_vaapi", "scale_vulkan", "tonemap_cuda", "tonemap_opencl", "tonemap_vaapi", "vpp_qsv", "yadif_cuda", "zscale", "alphasrc"]
[2024-06-13 15:28:00.589 +00:00] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available hwaccel types: ["cuda", "vaapi", "qsv", "drm", "opencl", "vulkan"]
[2024-06-13 15:28:00.958 +00:00] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: FFmpeg: "/usr/lib/jellyfin-ffmpeg/ffmpeg"
[2024-06-13 15:28:00.959 +00:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: ServerId: "d2d1661ae591417b8fea95a2c551ca15"
[2024-06-13 15:28:00.959 +00:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Core startup complete
[2024-06-13 15:28:00.959 +00:00] [INF] [1] Main: Startup complete 0:00:14.6560082
[2024-06-13 15:28:02.174 +00:00] [INF] [16] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "192.168.0.111" request
[2024-06-13 15:28:03.232 +00:00] [INF] [16] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Clean up collections and playlists" Completed after 0 minute(s) and 0 seconds
[2024-06-13 15:28:07.820 +00:00] [INF] [16] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Update Plugins" Completed after 0 minute(s) and 4 seconds
[2024-06-13 15:29:50.955 +00:00] [INF] [20] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "192.168.0.101" request
[2024-06-13 15:29:51.861 +00:00] [INF] [16] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "192.168.0.101" request

FFmpeg logs

No transcoding taking place.

Please attach any browser or client logs here

No response

Please attach any screenshots here

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
Originally created by @bigrichwood on GitHub (Jun 13, 2024). ### Please describe your bug Jellyfin sometimes crashes and restarts if a client disconnects unexpectedly. I have seen this a few times in the last few days, all from different clients, and for slightly different reasons. Each time no clients were playing back any media, there were just web pages open to the main page and the dashboard. In each case the first log entry is: "The remote party closed the WebSocket connection without completing the close handshake." The last three instances were: M1 Macbook Air, connected to Jellyfin web interface via Firefox. Laptop went to sleep automatically and Jellyfin crashed Windows 11 PC, connected to Jellyfin web interface via Firefox. Put desktop to sleep manually and Jellyfin crashed Windows 11 PC (a different one, 192.168.0.111 in the logs below), connected to Jellyfin web interface via Firefox. VPN client reconnected causing the PC to drop off the network briefly, Jellyfin crashed. ### Reproduction Steps As yet can't reproduce on demand. It doesn't happen everytime a client disconnects or is suspended, but all crashes happen after this occurs. I never saw this on 10.8.x, and didn't run some of the earlier 10.9.x versions long enough to see it happen. ### Jellyfin Version Master branch ### if other: 10.9.6 ### Environment ```markdown Server is a Synology DS423+, latest version of DSM (7.2.1-69057 Update 5). Intel Celeron J4125, 18GB RAM. No proxy involved, no URL changes. Storage all local on Synology. No playback taking place at the time of the crash. Browser: Current version of Firefox on all machines. No client logs as it happens when client is not actively in use. docker compose file: services: jellyfin: image: jellyfin/jellyfin container_name: jellyfin network_mode: host volumes: - /volume2/docker/jellyfin/config:/config - /volume2/docker/jellyfin/cache:/cache - /volume1/media:/Media restart: 'unless-stopped' environment: - TZ='Europe/London' devices: - /dev/dri/renderD128:/dev/dri/renderD128 - /dev/dri/card0:/dev/dri/card0 - Plugins: Kodi Sync Queue Merge Versions Open Subtitle Playback Reporting Session Cleaner Subtitle Extract TheTVDB TMDb Box Sets Trakt Webook IMDb Studio Images OMDb MusicBrainz AudioDB ``` ### Jellyfin logs ```shell [2024-06-13 15:24:31.776 +00:00] [INF] [27] Trakt.Helpers.LibraryManagerEventsHelper: No shows with event type Update to process [2024-06-13 15:27:28.235 +00:00] [WRN] [28] Emby.Server.Implementations.HttpServer.WebSocketConnection: WS "192.168.0.111" error receiving data: "The remote party closed the WebSocket connection without completing the close handshake." [2024-06-13 15:27:28.235 +00:00] [WRN] [37] Emby.Server.Implementations.HttpServer.WebSocketConnection: WS "192.168.0.111" error receiving data: "The remote party closed the WebSocket connection without completing the close handshake." [2024-06-13 15:27:28.239 +00:00] [INF] [37] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "192.168.0.111" closed [2024-06-13 15:27:28.239 +00:00] [INF] [28] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "192.168.0.111" closed [2024-06-13 15:27:28.246 +00:00] [FTL] [22] Main: Unhandled Exception System.NullReferenceException: Object reference not set to an instance of an object. at Emby.Server.Implementations.Session.WebSocketController.<>c.<GetActiveSockets>b__12_0(IWebSocketConnection i) at System.Linq.Enumerable.WhereListIterator`1.MoveNext() at System.Linq.Enumerable.<Any>g__WithEnumerator|36_0[TSource](IEnumerable`1 source) at Emby.Server.Implementations.Session.WebSocketController.get_IsSessionActive() at Emby.Server.Implementations.Session.SessionManager.<>c.<CloseIfNeededAsync>b__52_0(ISessionController i) at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate) at Emby.Server.Implementations.Session.SessionManager.CloseIfNeededAsync(SessionInfo session) at Emby.Server.Implementations.Session.WebSocketController.OnConnectionClosed(Object sender, EventArgs e) at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state) at System.Threading.QueueUserWorkItemCallback.Execute() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() [2024-06-13 15:27:28.246 +00:00] [FTL] [37] Main: Unhandled Exception System.NullReferenceException: Object reference not set to an instance of an object. at Emby.Server.Implementations.Session.WebSocketController.<>c.<GetActiveSockets>b__12_0(IWebSocketConnection i) at System.Linq.Enumerable.WhereListIterator`1.MoveNext() at System.Linq.Enumerable.<Any>g__WithEnumerator|36_0[TSource](IEnumerable`1 source) at Emby.Server.Implementations.Session.WebSocketController.get_IsSessionActive() at Emby.Server.Implementations.Session.SessionManager.<>c.<CloseIfNeededAsync>b__52_0(ISessionController i) at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate) at Emby.Server.Implementations.Session.SessionManager.CloseIfNeededAsync(SessionInfo session) at Emby.Server.Implementations.Session.WebSocketController.OnConnectionClosed(Object sender, EventArgs e) at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state) at System.Threading.QueueUserWorkItemCallback.Execute() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() [2024-06-13 15:27:46.590 +00:00] [INF] [1] Main: Jellyfin version: "10.9.6" [2024-06-13 15:27:46.625 +00:00] [INF] [1] Main: Environment Variables: ["[JELLYFIN_CACHE_DIR, /cache]", "[JELLYFIN_FFMPEG, /usr/lib/jellyfin-ffmpeg/ffmpeg]", "[JELLYFIN_WEB_DIR, /jellyfin/jellyfin-web]", "[JELLYFIN_CONFIG_DIR, /config/config]", "[JELLYFIN_LOG_DIR, /config/log]", "[JELLYFIN_DATA_DIR, /config]"] [2024-06-13 15:27:46.628 +00:00] [INF] [1] Main: Arguments: ["/jellyfin/jellyfin.dll", "--ffmpeg", "/usr/lib/jellyfin-ffmpeg/ffmpeg"] [2024-06-13 15:27:46.630 +00:00] [INF] [1] Main: Operating system: "Debian GNU/Linux 12 (bookworm)" [2024-06-13 15:27:46.630 +00:00] [INF] [1] Main: Architecture: X64 [2024-06-13 15:27:46.631 +00:00] [INF] [1] Main: 64-Bit Process: True [2024-06-13 15:27:46.631 +00:00] [INF] [1] Main: User Interactive: True [2024-06-13 15:27:46.631 +00:00] [INF] [1] Main: Processor count: 4 [2024-06-13 15:27:46.631 +00:00] [INF] [1] Main: Program data path: "/config" [2024-06-13 15:27:46.631 +00:00] [INF] [1] Main: Log directory path: "/config/log" [2024-06-13 15:27:46.631 +00:00] [INF] [1] Main: Config directory path: "/config/config" [2024-06-13 15:27:46.632 +00:00] [INF] [1] Main: Cache path: "/cache" [2024-06-13 15:27:46.632 +00:00] [INF] [1] Main: Web resources path: "/jellyfin/jellyfin-web" [2024-06-13 15:27:46.632 +00:00] [INF] [1] Main: Application directory: "/jellyfin/" [2024-06-13 15:27:46.897 +00:00] [INF] [1] Emby.Server.Implementations.AppBase.BaseConfigurationManager: Setting cache path: "/cache" [2024-06-13 15:27:47.051 +00:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loading assemblies [2024-06-13 15:27:47.077 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "InfuseSync, Version=1.5.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/InfuseSync_1.5.0.0/InfuseSync.dll" [2024-06-13 15:27:47.093 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "LiteDB, Version=5.0.15.0, Culture=neutral, PublicKeyToken=4ee40123013c9f27" from "/config/plugins/Kodi Sync Queue_11.0.0.0/LiteDB.dll" [2024-06-13 15:27:47.094 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Jellyfin.Plugin.KodiSyncQueue, Version=11.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/Kodi Sync Queue_11.0.0.0/Jellyfin.Plugin.KodiSyncQueue.dll" [2024-06-13 15:27:47.097 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Jellyfin.Plugin.MergeVersions, Version=10.9.1.1, Culture=neutral, PublicKeyToken=null" from "/config/plugins/Merge Versions_10.9.1.1/Jellyfin.Plugin.MergeVersions.dll" [2024-06-13 15:27:47.101 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Jellyfin.Plugin.OpenSubtitles, Version=20.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/Open Subtitles_20.0.0.0/Jellyfin.Plugin.OpenSubtitles.dll" [2024-06-13 15:27:47.106 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Jellyfin.Plugin.PlaybackReporting, Version=14.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/Playback Reporting_14.0.0.0/Jellyfin.Plugin.PlaybackReporting.dll" [2024-06-13 15:27:47.109 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "SQLitePCL.pretty, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/Playback Reporting_14.0.0.0/SQLitePCL.pretty.dll" [2024-06-13 15:27:47.110 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Jellyfin.Plugin.SessionCleaner, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/Session Cleaner_3.0.0.0/Jellyfin.Plugin.SessionCleaner.dll" [2024-06-13 15:27:47.112 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Jellyfin.Plugin.SubtitleExtract, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/Subtitle Extract_4.0.0.0/Jellyfin.Plugin.SubtitleExtract.dll" [2024-06-13 15:27:47.131 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Tvdb.Sdk, Version=4.7.9.1, Culture=neutral, PublicKeyToken=null" from "/config/plugins/TheTVDB_13.0.0.0/Tvdb.Sdk.dll" [2024-06-13 15:27:47.137 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Jellyfin.Plugin.Tvdb, Version=13.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/TheTVDB_13.0.0.0/Jellyfin.Plugin.Tvdb.dll" [2024-06-13 15:27:47.139 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Jellyfin.Plugin.TMDbBoxSets, Version=11.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/TMDb Box Sets_11.0.0.0/Jellyfin.Plugin.TMDbBoxSets.dll" [2024-06-13 15:27:47.147 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Trakt, Version=25.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/Trakt_25.0.0.0/Trakt.dll" [2024-06-13 15:27:47.184 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "MQTTnet, Version=4.3.4.1084, Culture=neutral, PublicKeyToken=fdb7629f2e364a63" from "/config/plugins/Webhook_14.0.0.0/MQTTnet.dll" [2024-06-13 15:27:47.241 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "BouncyCastle.Cryptography, Version=2.0.0.0, Culture=neutral, PublicKeyToken=072edcf4a5328938" from "/config/plugins/Webhook_14.0.0.0/BouncyCastle.Cryptography.dll" [2024-06-13 15:27:47.274 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "MailKit, Version=4.5.0.0, Culture=neutral, PublicKeyToken=4e064fe7c44a8f1b" from "/config/plugins/Webhook_14.0.0.0/MailKit.dll" [2024-06-13 15:27:47.291 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Handlebars, Version=2.1.6.0, Culture=neutral, PublicKeyToken=22225d0bf33cd661" from "/config/plugins/Webhook_14.0.0.0/Handlebars.dll" [2024-06-13 15:27:47.293 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "MQTTnet.Extensions.ManagedClient, Version=4.3.4.1084, Culture=neutral, PublicKeyToken=fdb7629f2e364a63" from "/config/plugins/Webhook_14.0.0.0/MQTTnet.Extensions.ManagedClient.dll" [2024-06-13 15:27:47.315 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "MimeKit, Version=4.5.0.0, Culture=neutral, PublicKeyToken=bede1c8a46c66814" from "/config/plugins/Webhook_14.0.0.0/MimeKit.dll" [2024-06-13 15:27:47.319 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded assembly "Jellyfin.Plugin.Webhook, Version=14.0.0.0, Culture=neutral, PublicKeyToken=null" from "/config/plugins/Webhook_14.0.0.0/Jellyfin.Plugin.Webhook.dll" [2024-06-13 15:27:47.440 +00:00] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN subnets: ["127.0.0.1/8", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"] [2024-06-13 15:27:47.440 +00:00] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN exclusions: [] [2024-06-13 15:27:47.441 +00:00] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Used LAN subnets: ["127.0.0.1/8", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"] [2024-06-13 15:27:47.443 +00:00] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Filtered interface addresses: ["127.0.0.1", "192.168.0.50", "192.168.0.51", "172.17.0.1", "172.25.0.1", "172.19.0.1"] [2024-06-13 15:27:47.444 +00:00] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Bind Addresses ["0.0.0.0"] [2024-06-13 15:27:47.444 +00:00] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Remote IP filter is "Allowlist" [2024-06-13 15:27:47.444 +00:00] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Filtered subnets: [] [2024-06-13 15:27:58.258 +00:00] [INF] [1] InfuseSync.Plugin: InfuseSync is starting. [2024-06-13 15:27:58.286 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "InfuseSync" "1.5.0.0" [2024-06-13 15:27:58.289 +00:00] [INF] [1] Jellyfin.Plugin.KodiSyncQueue.KodiSyncQueuePlugin: KodiSyncQueue is starting... [2024-06-13 15:27:58.290 +00:00] [INF] [1] Jellyfin.Plugin.KodiSyncQueue.Data.DbRepo: Creating DB Repository... [2024-06-13 15:27:58.377 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "Kodi Sync Queue" "11.0.0.0" [2024-06-13 15:27:58.379 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "Merge Versions" "10.9.1.1" [2024-06-13 15:27:58.393 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "Open Subtitles" "20.0.0.0" [2024-06-13 15:27:58.397 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "Playback Reporting" "14.0.0.0" [2024-06-13 15:27:58.399 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "Session Cleaner" "3.0.0.0" [2024-06-13 15:27:58.401 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "Subtitle Extract" "4.0.0.0" [2024-06-13 15:27:58.403 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "TheTVDB" "13.0.0.0" [2024-06-13 15:27:58.404 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "TMDb Box Sets" "11.0.0.0" [2024-06-13 15:27:58.406 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "Trakt" "25.0.0.0" [2024-06-13 15:27:58.409 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "Webhook" "14.0.0.0" [2024-06-13 15:27:58.410 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "TMDb" "10.9.6.0" [2024-06-13 15:27:58.410 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "Studio Images" "10.9.6.0" [2024-06-13 15:27:58.410 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "OMDb" "10.9.6.0" [2024-06-13 15:27:58.445 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "MusicBrainz" "10.9.6.0" [2024-06-13 15:27:58.446 +00:00] [INF] [1] Emby.Server.Implementations.Plugins.PluginManager: Loaded plugin: "AudioDB" "10.9.6.0" [2024-06-13 15:27:58.608 +00:00] [INF] [1] Main: Kestrel is listening on "0.0.0.0" [2024-06-13 15:27:58.625 +00:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.EventMonitorEntryPoint: EventMonitorEntryPoint Running [2024-06-13 15:27:58.641 +00:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.Data.ActivityRepository: Sqlite version: 3.41.2 [2024-06-13 15:27:58.643 +00:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.Data.ActivityRepository: Sqlite compiler options: ATOMIC_INTRINSICS=1,COMPILER=gcc-9.4.0,DEFAULT_AUTOVACUUM,DEFAULT_CACHE_SIZE=-2000,DEFAULT_FILE_FORMAT=4,DEFAULT_FOREIGN_KEYS,DEFAULT_JOURNAL_SIZE_LIMIT=-1,DEFAULT_MMAP_SIZE=0,DEFAULT_PAGE_SIZE=4096,DEFAULT_PCACHE_INITSZ=20,DEFAULT_RECURSIVE_TRIGGERS,DEFAULT_SECTOR_SIZE=4096,DEFAULT_SYNCHRONOUS=2,DEFAULT_WAL_AUTOCHECKPOINT=1000,DEFAULT_WAL_SYNCHRONOUS=2,DEFAULT_WORKER_THREADS=0,ENABLE_COLUMN_METADATA,ENABLE_FTS3,ENABLE_FTS3_PARENTHESIS,ENABLE_FTS4,ENABLE_FTS5,ENABLE_MATH_FUNCTIONS,ENABLE_RTREE,ENABLE_SNAPSHOT,MALLOC_SOFT_LIMIT=1024,MAX_ATTACHED=10,MAX_COLUMN=2000,MAX_COMPOUND_SELECT=500,MAX_DEFAULT_PAGE_SIZE=8192,MAX_EXPR_DEPTH=1000,MAX_FUNCTION_ARG=127,MAX_LENGTH=1000000000,MAX_LIKE_PATTERN_LENGTH=50000,MAX_MMAP_SIZE=0x7fff0000,MAX_PAGE_COUNT=1073741823,MAX_PAGE_SIZE=65536,MAX_SQL_LENGTH=1000000000,MAX_TRIGGER_DEPTH=1000,MAX_VARIABLE_NUMBER=32766,MAX_VDBE_OP=250000000,MAX_WORKER_THREADS=8,MUTEX_PTHREADS,SYSTEM_MALLOC,TEMP_STORE=1,THREADSAFE=1 [2024-06-13 15:27:58.663 +00:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.Data.ActivityRepository: Default journal_mode for "/config/data/playback_reporting.db" is "delete" [2024-06-13 15:27:58.664 +00:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.Data.ActivityRepository: Initialize PlaybackActivity Repository [2024-06-13 15:27:58.668 +00:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.Data.ActivityRepository: PlaybackActivity table schema OK [2024-06-13 15:27:58.668 +00:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.Data.ActivityRepository: Expected : "datecreated:datetime|userid:text|itemid:text|itemtype:text|itemname:text|playbackmethod:text|clientname:text|devicename:text|playduration:int" [2024-06-13 15:27:58.668 +00:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.Data.ActivityRepository: Received : "datecreated:datetime|userid:text|itemid:text|itemtype:text|itemname:text|playbackmethod:text|clientname:text|devicename:text|playduration:int" [2024-06-13 15:27:59.994 +00:00] [WRN] [1] Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware: The WebRootPath was not found: "/wwwroot". Static files may be unavailable. [2024-06-13 15:28:00.059 +00:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Running startup tasks [2024-06-13 15:28:00.061 +00:00] [INF] [1] InfuseSync.ScheduledTasks.HousekeepingTask: Infuse housekeeping task scheduled. [2024-06-13 15:28:00.062 +00:00] [INF] [1] Jellyfin.Plugin.KodiSyncQueue.ScheduledTasks.RetentionTask: Retention task scheduled [2024-06-13 15:28:00.067 +00:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.TaskCleanDb: TaskCleanDb Loaded [2024-06-13 15:28:00.068 +00:00] [INF] [1] Jellyfin.Plugin.PlaybackReporting.TaskRunBackup: TaskRunBackup Loaded [2024-06-13 15:28:00.126 +00:00] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for "Remove Old Cached Data" set to fire at 2024-06-14 00:01:00.000 +00:00, which is 08:32:59.8737930 from now. [2024-06-13 15:28:00.132 +00:00] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for "Remove Old Sync Data" set to fire at 2024-06-14 00:01:00.000 +00:00, which is 08:32:59.8677431 from now. [2024-06-13 15:28:00.138 +00:00] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for "Playback Reporting Trim Db" set to fire at 2024-06-14 00:00:00.000 +00:00, which is 08:31:59.8613647 from now. [2024-06-13 15:28:00.153 +00:00] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for "Clean Old Sessions" set to fire at 2024-06-14 06:45:00.000 +00:00, which is 15:16:59.8465269 from now. [2024-06-13 15:28:00.154 +00:00] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for "Purge TheTVDB plugin cache" set to fire at 2024-06-14 05:45:00.000 +00:00, which is 14:16:59.8452338 from now. [2024-06-13 15:28:00.155 +00:00] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for "Check for metadata updates." set to fire at 2024-06-13 23:00:00.000 +00:00, which is 07:31:59.8446475 from now. [2024-06-13 15:28:00.157 +00:00] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for "Import watched states and playback progress from trakt.tv" set to fire at 2024-06-14 01:45:00.000 +00:00, which is 10:16:59.8425557 from now. [2024-06-13 15:28:00.158 +00:00] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for "Webhook Item Added Notifier" set to fire at 2024-06-13 21:00:00.000 +00:00, which is 05:31:59.8411817 from now. [2024-06-13 15:28:00.159 +00:00] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for "Webhook Item Added Notifier" set to fire at 2024-06-14 09:00:00.000 +00:00, which is 17:31:59.8408886 from now. [2024-06-13 15:28:00.169 +00:00] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for "Generate Trickplay Images" set to fire at 2024-06-14 03:00:00.000 +00:00, which is 11:31:59.8305846 from now. [2024-06-13 15:28:00.172 +00:00] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for "Extract Chapter Images" set to fire at 2024-06-14 02:00:00.000 +00:00, which is 10:31:59.8277633 from now. [2024-06-13 15:28:00.182 +00:00] [INF] [1] Emby.Server.Implementations.ScheduledTasks.TaskManager: Daily trigger for "Keyframe Extractor" set to fire at 2024-06-14 01:00:00.000 +00:00, which is 09:31:59.8178929 from now. [2024-06-13 15:28:00.225 +00:00] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Found ffmpeg version "6.0.1" [2024-06-13 15:28:00.324 +00:00] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available "decoders": ["libdav1d", "av1", "av1_cuvid", "av1_qsv", "h264", "h264_qsv", "h264_cuvid", "hevc", "hevc_qsv", "hevc_cuvid", "mpeg2video", "mpeg2_qsv", "mpeg2_cuvid", "mpeg4", "mpeg4_cuvid", "msmpeg4", "vc1_qsv", "vc1_cuvid", "vp8", "libvpx", "vp8_cuvid", "vp8_qsv", "vp9", "libvpx-vp9", "vp9_cuvid", "vp9_qsv", "aac", "ac3", "dca", "flac", "mp3", "truehd"] [2024-06-13 15:28:00.360 +00:00] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available "encoders": ["libsvtav1", "av1_nvenc", "av1_qsv", "av1_amf", "av1_vaapi", "libx264", "h264_amf", "h264_nvenc", "h264_qsv", "h264_v4l2m2m", "h264_vaapi", "libx265", "hevc_amf", "hevc_nvenc", "hevc_qsv", "hevc_vaapi", "mjpeg_qsv", "mjpeg_vaapi", "mpeg4", "msmpeg4", "libvpx", "libvpx-vp9", "aac", "libfdk_aac", "ac3", "alac", "dca", "flac", "libmp3lame", "libopus", "truehd", "libvorbis", "srt"] [2024-06-13 15:28:00.417 +00:00] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available filters: ["deinterlace_qsv", "deinterlace_vaapi", "hwupload_cuda", "hwupload_vaapi", "libplacebo", "overlay_opencl", "overlay_qsv", "overlay_vaapi", "overlay_vulkan", "overlay_cuda", "procamp_vaapi", "scale_cuda", "scale_opencl", "scale_qsv", "scale_vaapi", "scale_vulkan", "tonemap_cuda", "tonemap_opencl", "tonemap_vaapi", "vpp_qsv", "yadif_cuda", "zscale", "alphasrc"] [2024-06-13 15:28:00.589 +00:00] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Available hwaccel types: ["cuda", "vaapi", "qsv", "drm", "opencl", "vulkan"] [2024-06-13 15:28:00.958 +00:00] [INF] [1] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: FFmpeg: "/usr/lib/jellyfin-ffmpeg/ffmpeg" [2024-06-13 15:28:00.959 +00:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: ServerId: "d2d1661ae591417b8fea95a2c551ca15" [2024-06-13 15:28:00.959 +00:00] [INF] [1] Emby.Server.Implementations.ApplicationHost: Core startup complete [2024-06-13 15:28:00.959 +00:00] [INF] [1] Main: Startup complete 0:00:14.6560082 [2024-06-13 15:28:02.174 +00:00] [INF] [16] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "192.168.0.111" request [2024-06-13 15:28:03.232 +00:00] [INF] [16] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Clean up collections and playlists" Completed after 0 minute(s) and 0 seconds [2024-06-13 15:28:07.820 +00:00] [INF] [16] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Update Plugins" Completed after 0 minute(s) and 4 seconds [2024-06-13 15:29:50.955 +00:00] [INF] [20] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "192.168.0.101" request [2024-06-13 15:29:51.861 +00:00] [INF] [16] Emby.Server.Implementations.HttpServer.WebSocketManager: WS "192.168.0.101" request ``` ### FFmpeg logs ```shell No transcoding taking place. ``` ### Please attach any browser or client logs here _No response_ ### Please attach any screenshots here _No response_ ### Code of Conduct - [X] I agree to follow this project's Code of Conduct
backuprepo 2025-12-22 03:22:07 +01:00
  • closed this issue
  • added the
    stale
    bug
    labels
Author
Owner

@jellyfin-bot commented on GitHub (Jun 13, 2024):

Hi, it seems like your issue report has the following item(s) that need to be addressed:

  • You are not running an up-to-date version of Jellyfin. Please update to the latest release.
  • The format of the environment section has been altered from the template.
  • You have not provided the ffmpeg log unaltered from the server. Please provide a valid ffmpeg log.

This is an automated message, currently under testing. Please file an issue here if you encounter any problems.

@jellyfin-bot commented on GitHub (Jun 13, 2024): Hi, it seems like your issue report has the following item(s) that need to be addressed: - You are not running an up-to-date version of Jellyfin. Please update to the latest release. - The format of the environment section has been altered from the template. - You have not provided the ffmpeg log unaltered from the server. Please provide a valid ffmpeg log. This is an automated message, currently under testing. Please file an issue [here](https://github.com/jellyfin/jellyfin-triage-scripts/issues) if you encounter any problems.
Author
Owner

@felix920506 commented on GitHub (Sep 8, 2024):

I cannot reproduce this on my side using the latest weekly unstable build.
I connected to it in Safari and then killed the browser. I repeated it 5 times and Jellyfin didn't crash. All it does is show a warning message in the logs about a client not completing a handshake.
Please enable debug logging to help us better understand what is going on.
https://jellyfin.org/docs/general/administration/troubleshooting#debug-logging

@felix920506 commented on GitHub (Sep 8, 2024): I cannot reproduce this on my side using the latest weekly unstable build. I connected to it in Safari and then killed the browser. I repeated it 5 times and Jellyfin didn't crash. All it does is show a warning message in the logs about a client not completing a handshake. Please enable debug logging to help us better understand what is going on. https://jellyfin.org/docs/general/administration/troubleshooting#debug-logging
Author
Owner

@DaRealHansForSure commented on GitHub (Dec 6, 2024):

I also observed this issue alot, did my own changes to id, made sure connection is not null and also try catched just in case.
There is no really way to reproduce it, just observed it in the logs many times.

WebSocketController.cs

        private async void OnConnectionClosed(object? sender, EventArgs e)
        {
            var connection = sender as IWebSocketConnection ?? throw new ArgumentException($"{nameof(sender)} is not of type {nameof(IWebSocketConnection)}", nameof(sender));
            _logger.LogDebug("Removing websocket from session {Session}", _session.Id);

            if (connection is not null)
            {
                try
                {
                    _sockets.Remove(connection);
                }
                catch (Exception ex)
                {
                    _logger.LogError(ex, "Error in OnConnectionClosed while removing from list");
                }

                try
                {
                    connection.Closed -= OnConnectionClosed;
                }
                catch (Exception ex)
                {
                    _logger.LogError(ex, "Error in OnConnectionClosed while removing listener");
                }
            }

            try
            {
                await _sessionManager.CloseIfNeededAsync(_session).ConfigureAwait(false);
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, "Error in OnConnectionClosed while closing");
            }
        }
@DaRealHansForSure commented on GitHub (Dec 6, 2024): I also observed this issue alot, did my own changes to id, made sure connection is not null and also try catched just in case. There is no really way to reproduce it, just observed it in the logs many times. WebSocketController.cs ```csharp private async void OnConnectionClosed(object? sender, EventArgs e) { var connection = sender as IWebSocketConnection ?? throw new ArgumentException($"{nameof(sender)} is not of type {nameof(IWebSocketConnection)}", nameof(sender)); _logger.LogDebug("Removing websocket from session {Session}", _session.Id); if (connection is not null) { try { _sockets.Remove(connection); } catch (Exception ex) { _logger.LogError(ex, "Error in OnConnectionClosed while removing from list"); } try { connection.Closed -= OnConnectionClosed; } catch (Exception ex) { _logger.LogError(ex, "Error in OnConnectionClosed while removing listener"); } } try { await _sessionManager.CloseIfNeededAsync(_session).ConfigureAwait(false); } catch (Exception ex) { _logger.LogError(ex, "Error in OnConnectionClosed while closing"); } } ```
Author
Owner

@lagset commented on GitHub (Dec 7, 2024):

This issue appears in my setup as well, albeit in irregular patterns (sometimes days without, sometimes multiple times in a few hours).

Will investigate further. Setup is Synology DS 420+, jellyfin via docker. The client with which this problem appears is a Sony Android TV, however, it's also the by far most client used in my setup.

@lagset commented on GitHub (Dec 7, 2024): This issue appears in my setup as well, albeit in irregular patterns (sometimes days without, sometimes multiple times in a few hours). Will investigate further. Setup is Synology DS 420+, jellyfin via docker. The client with which this problem appears is a Sony Android TV, however, it's also the by far most client used in my setup.
Author
Owner

@cleming commented on GitHub (Dec 29, 2024):

Hello,
I have exactly the same problem (10.10.3 here), docker + traefik as reverse proxy.

@cleming commented on GitHub (Dec 29, 2024): Hello, I have exactly the same problem (10.10.3 here), docker + traefik as reverse proxy.
Author
Owner

@jellyfin-bot commented on GitHub (Apr 29, 2025):

This issue has gone 120 days without an update and will be closed within 21 days if there is no new activity. To prevent this issue from being closed, please confirm the issue has not already been fixed by providing updated examples or logs.

If you have any questions you can use one of several ways to contact us.

@jellyfin-bot commented on GitHub (Apr 29, 2025): This issue has gone 120 days without an update and will be closed within 21 days if there is no new activity. To prevent this issue from being closed, please confirm the issue has not already been fixed by providing updated examples or logs. If you have any questions you can use one of several ways to [contact us](https://jellyfin.org/contact).
Author
Owner

@cleming commented on GitHub (Apr 29, 2025):

no more crash here since #13457 patch, thank you !! <3

@cleming commented on GitHub (Apr 29, 2025): no more crash here since #13457 patch, thank you !! <3
Author
Owner

@felix920506 commented on GitHub (Apr 29, 2025):

Fixed by #13459 according to comments

@felix920506 commented on GitHub (Apr 29, 2025): Fixed by #13459 according to comments
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: starred/jellyfin#6006
No description provided.