Description
β Have you read and understood the above guidelines?
yes
π What is the name of the script you are using?
ErsatzTV
π What was the exact command used to execute the script?
update
βοΈ What settings are you using?
- Default Settings
- Advanced Settings
π₯οΈ Which Linux distribution are you using?
Debian 12
π Provide a clear and concise description of the issue.
The update
command is unable to safely update ErsatzTV (ETV) the new 25.2.0 release that came our earlier today without breaking my existing instance. The update includes an updated ffmpeg bundle from 6.1 to 7.1.1 (in docker only I'm assuming) and is required for this version to properly work too.
π Steps to reproduce the issue.
After creating a snapshot prior to updating with WinSCP open and sshed into the LXC to monitor file changes:
- Ran the
update
command in the lxc console verbosely; update was a success - My reverse-proxied URL to ETV presented "Bad Gateway," but directly accessing via IP/Port failed too
- Checked the service to see if it was still running (systemctl status ersatzTV) and it was in a failed/exited state
- Rebooted LXC just in case; same issue
- Attempted to run
update
again, but it confirmed that it was on the latest version - Rolled back snapshot and re-ran the
update
command; it was rinse and repeat with it not working again - Downloaded my last nightly Proxmox Backup Server backup of the LXC of the
opt/ErsatzTV
folder to compare and contrast file modification dates and other possible discrepancies - Checked
/root/.local/share/ersatztv
folder for discrepancies; I noticed that ersatztv.sqlite3-shm & ersatztv.sqlite3-wal get deleted when theupdate
command is ran (after my third rollback/test I did later on), but that may be inconsequential since those files are temp files generated while the db is actually properly running? - Manually downloaded ErsatzTV-v25.2.0-linux-x64.tar.gz, uploaded it to the LXC, and replaced the opt/ErsatzTV folder with an untar'd copy of the download (after appending old folder with -backup to its name and renaming the newly untar'd folder to "ErsatzTV" like the old one to have the service reference it without change)
- Manually update sort of works in that I was able to launch the executable and my session, but it's in a broken state (previous site links work, but many HTML elements remain unclickable) and FFmpeg was the old version still (6.1 instead of the required 7.1.1); FFmpeg probably needs to be manually too, but I didn't do that for this test
- I noticed that the folder
/root/.net/ErsatzTV
gets a new associated folder (with naming akin to a hash, e.g.nwoq+SbySr5SzMDQg_C0smTNkAarR34=
for this update) each for each new update since there are also older folders corresponding to the last two times I updated (with matching modification dates for those eras), so I'm assuming there's a component of .NET that needs to be updated or referenced with each update?
β Paste the full error output (if available).
Starting from top to bottom (from when the update script shut down the server to update it), this is part of the log in /root/.local/share/ersatztv/logs
that's available from the broken updated instance. Everything prior to this is personalized to my instance (showing channels, libraries, etc.), so I've redacted that. These errors do not appear in any of my previous logs from a working prod environment:
It mostly repeats, so I'm cutting it off earlier to not break the 65536 character limit
2025-06-24 15:35:16.248 -04:00 [INF] Search index worker service shutting down
2025-06-24 15:35:16.249 -04:00 [INF] FFmpeg worker service shutting down
2025-06-24 15:35:16.249 -04:00 [INF] Scheduler service shutting down
2025-06-24 15:35:16.280 -04:00 [DBG] Completed garbage collection
2025-06-24 15:35:16.280 -04:00 [INF] Worker service shutting down
2025-06-24 15:35:16.280 -04:00 [INF] Scanner service shutting down
2025-06-24 15:35:16.281 -04:00 [INF] Plex service shutting down
2025-06-24 15:35:16.281 -04:00 [INF] Jellyfin service shutting down
2025-06-24 15:35:16.281 -04:00 [INF] Emby service shutting down
2025-06-24 15:35:20.858 -04:00 [INF] ErsatzTV version v25.2.0-linux-x64
2025-06-24 15:35:20.889 -04:00 [WRN] Give feedback at https://github.com/ErsatzTV/ErsatzTV or https://discord.gg/hHaJm3yGy6
2025-06-24 15:35:20.892 -04:00 [INF] Database is at /root/.local/share/ersatztv/ersatztv.sqlite3
2025-06-24 15:35:20.899 -04:00 [INF] Transcode folder is /root/.local/share/etv-transcode
2025-06-24 15:35:20.982 -04:00 [INF] Using Lucene (embedded) search index backend
2025-06-24 15:35:21.058 -04:00 [INF] Server will listen on streaming port 8409, UI port 8409 - try UI at http://localhost:8409
2025-06-24 15:35:21.058 -04:00 [INF] Applying database migrations
2025-06-24 15:35:21.091 -04:00 [INF] Worker service started
2025-06-24 15:35:21.110 -04:00 [INF] FFmpeg worker service started
2025-06-24 15:35:21.286 -04:00 [ERR] Hosting failed to start
System.IO.IOException: Failed to bind to address http://[::]:8409: address already in use.
---> Microsoft.AspNetCore.Connections.AddressInUseException: Address already in use
---> System.Net.Sockets.SocketException (98): Address already in use
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportOptions.CreateDefaultBoundListenSocket(EndPoint endpoint)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory.BindAsync(EndPoint endpoint, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TransportManager.BindAsync(EndPoint endPoint, ConnectionDelegate connectionDelegate, EndpointConfig endpointConfig, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.<>c__DisplayClass28_0`1.<<StartAsync>g__OnBind|0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.AnyIPListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.EndpointsStrategy.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.Internal.Host.<StartAsync>b__14_1(IHostedService service, CancellationToken token)
at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable`1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List`1 exceptions, Func`3 operation)
2025-06-24 15:35:21.293 -04:00 [INF] FFmpeg worker service shutting down
2025-06-24 15:35:21.293 -04:00 [INF] Worker service shutting down
2025-06-24 15:35:21.293 -04:00 [ERR] BackgroundService failed
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForDatabase(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 26
at ErsatzTV.Services.FFmpegLocatorService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/FFmpegLocatorService.cs:line 27
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:35:21.294 -04:00 [FTL] Host terminated unexpectedly
System.IO.IOException: Failed to bind to address http://[::]:8409: address already in use.
---> Microsoft.AspNetCore.Connections.AddressInUseException: Address already in use
---> System.Net.Sockets.SocketException (98): Address already in use
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportOptions.CreateDefaultBoundListenSocket(EndPoint endpoint)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory.BindAsync(EndPoint endpoint, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TransportManager.BindAsync(EndPoint endPoint, ConnectionDelegate connectionDelegate, EndpointConfig endpointConfig, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.<>c__DisplayClass28_0`1.<<StartAsync>g__OnBind|0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.AnyIPListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.EndpointsStrategy.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.Internal.Host.<StartAsync>b__14_1(IHostedService service, CancellationToken token)
at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable`1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List`1 exceptions, Func`3 operation)
at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at ErsatzTV.Program.Main(String[] args) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Program.cs:line 120
2025-06-24 15:35:21.294 -04:00 [ERR] BackgroundService failed
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForDatabase(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 26
at ErsatzTV.Services.PlexService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/PlexService.cs:line 34
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:35:21.294 -04:00 [ERR] BackgroundService failed
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForDatabase(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 26
at ErsatzTV.Services.ScannerService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/ScannerService.cs:line 38
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:35:21.294 -04:00 [ERR] BackgroundService failed
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForSearchIndex(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 32
at ErsatzTV.Services.SchedulerService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/SchedulerService.cs:line 51
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:35:21.294 -04:00 [ERR] BackgroundService failed
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForDatabase(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 26
at ErsatzTV.Services.SearchIndexService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/SearchIndexService.cs:line 33
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:35:21.294 -04:00 [ERR] BackgroundService failed
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForDatabase(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 26
at ErsatzTV.Services.EmbyService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/EmbyService.cs:line 34
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:35:21.294 -04:00 [ERR] BackgroundService failed
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForDatabase(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 26
at ErsatzTV.Services.JellyfinService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/JellyfinService.cs:line 34
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:35:21.299 -04:00 [FTL] The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted.
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForDatabase(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 26
at ErsatzTV.Services.FFmpegLocatorService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/FFmpegLocatorService.cs:line 27
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:35:21.301 -04:00 [FTL] The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted.
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForDatabase(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 26
at ErsatzTV.Services.JellyfinService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/JellyfinService.cs:line 34
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:35:21.300 -04:00 [FTL] The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted.
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForDatabase(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 26
at ErsatzTV.Services.PlexService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/PlexService.cs:line 34
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:35:21.300 -04:00 [FTL] The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted.
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForDatabase(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 26
at ErsatzTV.Services.ScannerService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/ScannerService.cs:line 38
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:35:21.300 -04:00 [FTL] The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted.
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForSearchIndex(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 32
at ErsatzTV.Services.SchedulerService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/SchedulerService.cs:line 51
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:35:21.300 -04:00 [FTL] The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted.
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForDatabase(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 26
at ErsatzTV.Services.SearchIndexService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/SearchIndexService.cs:line 33
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:35:56.793 -04:00 [INF] ErsatzTV version v25.2.0-linux-x64
2025-06-24 15:35:56.823 -04:00 [WRN] Give feedback at https://github.com/ErsatzTV/ErsatzTV or https://discord.gg/hHaJm3yGy6
2025-06-24 15:35:56.826 -04:00 [INF] Database is at /root/.local/share/ersatztv/ersatztv.sqlite3
2025-06-24 15:35:56.833 -04:00 [INF] Transcode folder is /root/.local/share/etv-transcode
2025-06-24 15:35:56.910 -04:00 [INF] Using Lucene (embedded) search index backend
2025-06-24 15:35:56.975 -04:00 [INF] Server will listen on streaming port 8409, UI port 8409 - try UI at http://localhost:8409
2025-06-24 15:35:56.975 -04:00 [INF] Applying database migrations
2025-06-24 15:35:57.003 -04:00 [INF] Worker service started
2025-06-24 15:35:57.026 -04:00 [INF] FFmpeg worker service started
2025-06-24 15:35:57.167 -04:00 [ERR] Hosting failed to start
System.IO.IOException: Failed to bind to address http://[::]:8409: address already in use.
---> Microsoft.AspNetCore.Connections.AddressInUseException: Address already in use
---> System.Net.Sockets.SocketException (98): Address already in use
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportOptions.CreateDefaultBoundListenSocket(EndPoint endpoint)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory.BindAsync(EndPoint endpoint, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TransportManager.BindAsync(EndPoint endPoint, ConnectionDelegate connectionDelegate, EndpointConfig endpointConfig, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.<>c__DisplayClass28_0`1.<<StartAsync>g__OnBind|0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.AnyIPListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.EndpointsStrategy.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.Internal.Host.<StartAsync>b__14_1(IHostedService service, CancellationToken token)
at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable`1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List`1 exceptions, Func`3 operation)
2025-06-24 15:35:57.172 -04:00 [INF] FFmpeg worker service shutting down
2025-06-24 15:35:57.172 -04:00 [ERR] BackgroundService failed
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForDatabase(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 26
at ErsatzTV.Services.SearchIndexService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/SearchIndexService.cs:line 33
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:35:57.173 -04:00 [FTL] Host terminated unexpectedly
System.IO.IOException: Failed to bind to address http://[::]:8409: address already in use.
---> Microsoft.AspNetCore.Connections.AddressInUseException: Address already in use
---> System.Net.Sockets.SocketException (98): Address already in use
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportOptions.CreateDefaultBoundListenSocket(EndPoint endpoint)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory.BindAsync(EndPoint endpoint, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TransportManager.BindAsync(EndPoint endPoint, ConnectionDelegate connectionDelegate, EndpointConfig endpointConfig, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.<>c__DisplayClass28_0`1.<<StartAsync>g__OnBind|0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.AnyIPListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.EndpointsStrategy.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.Internal.Host.<StartAsync>b__14_1(IHostedService service, CancellationToken token)
at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable`1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List`1 exceptions, Func`3 operation)
at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at ErsatzTV.Program.Main(String[] args) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Program.cs:line 120
2025-06-24 15:35:57.173 -04:00 [INF] Worker service shutting down
2025-06-24 15:35:57.178 -04:00 [FTL] The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted.
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForDatabase(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 26
at ErsatzTV.Services.SearchIndexService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/SearchIndexService.cs:line 33
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:35:57.173 -04:00 [ERR] BackgroundService failed
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForDatabase(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 26
at ErsatzTV.Services.FFmpegLocatorService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/FFmpegLocatorService.cs:line 27
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:35:57.173 -04:00 [ERR] BackgroundService failed
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForDatabase(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 26
at ErsatzTV.Services.EmbyService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/EmbyService.cs:line 34
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:35:57.173 -04:00 [ERR] BackgroundService failed
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForDatabase(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 26
at ErsatzTV.Services.PlexService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/PlexService.cs:line 34
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:35:57.173 -04:00 [ERR] BackgroundService failed
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForDatabase(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 26
at ErsatzTV.Services.ScannerService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/ScannerService.cs:line 38
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:35:57.173 -04:00 [ERR] BackgroundService failed
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForDatabase(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 26
at ErsatzTV.Services.JellyfinService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/JellyfinService.cs:line 34
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:35:57.178 -04:00 [ERR] BackgroundService failed
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForDatabase(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 26
at ErsatzTV.Services.RunOnce.RebuildSearchIndexService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/RunOnce/RebuildSearchIndexService.cs:line 23
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:35:57.178 -04:00 [FTL] The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted.
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForDatabase(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 26
at ErsatzTV.Services.FFmpegLocatorService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/FFmpegLocatorService.cs:line 27
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:35:57.179 -04:00 [FTL] The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted.
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForDatabase(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 26
at ErsatzTV.Services.EmbyService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/EmbyService.cs:line 34
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:35:57.179 -04:00 [FTL] The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted.
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForDatabase(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 26
at ErsatzTV.Services.PlexService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/PlexService.cs:line 34
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:35:57.179 -04:00 [FTL] The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted.
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForDatabase(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 26
at ErsatzTV.Services.ScannerService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/ScannerService.cs:line 38
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:36:32.525 -04:00 [INF] ErsatzTV version v25.2.0-linux-x64
2025-06-24 15:36:32.555 -04:00 [WRN] Give feedback at https://github.com/ErsatzTV/ErsatzTV or https://discord.gg/hHaJm3yGy6
2025-06-24 15:36:32.558 -04:00 [INF] Database is at /root/.local/share/ersatztv/ersatztv.sqlite3
2025-06-24 15:36:32.564 -04:00 [INF] Transcode folder is /root/.local/share/etv-transcode
2025-06-24 15:36:32.642 -04:00 [INF] Using Lucene (embedded) search index backend
2025-06-24 15:36:32.709 -04:00 [INF] Applying database migrations
2025-06-24 15:36:32.709 -04:00 [INF] Server will listen on streaming port 8409, UI port 8409 - try UI at http://localhost:8409
2025-06-24 15:36:32.725 -04:00 [INF] Worker service started
2025-06-24 15:36:32.750 -04:00 [INF] FFmpeg worker service started
2025-06-24 15:36:32.928 -04:00 [ERR] Hosting failed to start
System.IO.IOException: Failed to bind to address http://[::]:8409: address already in use.
---> Microsoft.AspNetCore.Connections.AddressInUseException: Address already in use
---> System.Net.Sockets.SocketException (98): Address already in use
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportOptions.CreateDefaultBoundListenSocket(EndPoint endpoint)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory.BindAsync(EndPoint endpoint, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TransportManager.BindAsync(EndPoint endPoint, ConnectionDelegate connectionDelegate, EndpointConfig endpointConfig, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.<>c__DisplayClass28_0`1.<<StartAsync>g__OnBind|0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.AnyIPListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.EndpointsStrategy.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.Internal.Host.<StartAsync>b__14_1(IHostedService service, CancellationToken token)
at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable`1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List`1 exceptions, Func`3 operation)
2025-06-24 15:36:32.934 -04:00 [INF] FFmpeg worker service shutting down
2025-06-24 15:36:32.935 -04:00 [ERR] BackgroundService failed
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForDatabase(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 26
at ErsatzTV.Services.SearchIndexService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/SearchIndexService.cs:line 33
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:36:32.935 -04:00 [INF] Worker service shutting down
2025-06-24 15:36:32.935 -04:00 [FTL] Host terminated unexpectedly
System.IO.IOException: Failed to bind to address http://[::]:8409: address already in use.
---> Microsoft.AspNetCore.Connections.AddressInUseException: Address already in use
---> System.Net.Sockets.SocketException (98): Address already in use
at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.Sockets.Socket.Bind(EndPoint localEP)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportOptions.CreateDefaultBoundListenSocket(EndPoint endpoint)
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory.BindAsync(EndPoint endpoint, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Infrastructure.TransportManager.BindAsync(EndPoint endPoint, ConnectionDelegate connectionDelegate, EndpointConfig endpointConfig, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.<>c__DisplayClass28_0`1.<<StartAsync>g__OnBind|0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.AnyIPListenOptions.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.EndpointsStrategy.BindAsync(AddressBindContext context, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.BindAsync(CancellationToken cancellationToken)
at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServerImpl.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.Internal.Host.<StartAsync>b__14_1(IHostedService service, CancellationToken token)
at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable`1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List`1 exceptions, Func`3 operation)
at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at ErsatzTV.Program.Main(String[] args) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Program.cs:line 120
2025-06-24 15:36:32.935 -04:00 [ERR] BackgroundService failed
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForDatabase(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 26
at ErsatzTV.Services.FFmpegLocatorService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/FFmpegLocatorService.cs:line 27
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:36:32.935 -04:00 [ERR] BackgroundService failed
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForDatabase(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 26
at ErsatzTV.Services.JellyfinService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/JellyfinService.cs:line 34
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:36:32.935 -04:00 [ERR] BackgroundService failed
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForDatabase(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 26
at ErsatzTV.Services.ScannerService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/ScannerService.cs:line 38
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:36:32.935 -04:00 [ERR] BackgroundService failed
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForSearchIndex(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 32
at ErsatzTV.Services.SchedulerService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/SchedulerService.cs:line 51
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:36:32.942 -04:00 [FTL] The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted.
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForSearchIndex(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 32
at ErsatzTV.Services.SchedulerService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/SchedulerService.cs:line 51
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:36:32.935 -04:00 [ERR] BackgroundService failed
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForDatabase(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 26
at ErsatzTV.Services.PlexService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/PlexService.cs:line 34
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:36:32.941 -04:00 [ERR] BackgroundService failed
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForDatabase(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 26
at ErsatzTV.Services.EmbyService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/EmbyService.cs:line 34
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:36:32.941 -04:00 [FTL] The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted.
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForDatabase(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 26
at ErsatzTV.Services.SearchIndexService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/SearchIndexService.cs:line 33
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:36:32.943 -04:00 [FTL] The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted.
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForDatabase(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 26
at ErsatzTV.Services.EmbyService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/EmbyService.cs:line 34
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:36:32.941 -04:00 [FTL] The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted.
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForDatabase(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 26
at ErsatzTV.Services.JellyfinService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/JellyfinService.cs:line 34
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
2025-06-24 15:36:32.942 -04:00 [FTL] The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted.
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeoutAsync(TaskNode asyncWaiter, Int32 millisecondsTimeout, CancellationToken cancellationToken)
at ErsatzTV.Core.SystemStartup.WaitForDatabase(CancellationToken cancellationToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV.Core/SystemStartup.cs:line 26
at ErsatzTV.Services.ScannerService.ExecuteAsync(CancellationToken stoppingToken) in /home/runner/work/ErsatzTV/ErsatzTV/ErsatzTV/Services/ScannerService.cs:line 38
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
πΌοΈ Additional context (optional).
I'm by no means a Linux expert still, so I wouldn't be surprised if a fix was staring me in the face. The last time I updated with the update
command was from .88 beta (or whatever pre-release version it was) to 25.1.0 in February. It broke my instance back then too. I was able to fix that by manually copying the ETV executable into the opt/ErsatzTV folder manually (at least I think that's what I did, it was back in Feb and I never documented it unfortunately since I fixed it and moved on). One thing I couldn't verify since the instance was not working was if FFmpeg was updated too. I'm the script accounts for also updating ffmpeg to the latest version since there's no direct upgrade path from 6.1 to 7.1.1 too apparently, so sharing that info JIC.
Since the script is saying it's updateable, I'm its safe to assume others will face similar issues too (assuming they didn't change around directories and whatnot) whether they used Advanced or Default settings.