jellyfin-plugin-playbackreporting
jellyfin-plugin-playbackreporting copied to clipboard
Playback Reporting plugin breaks dashboard restart button
When the playback reporting plugin is installed, when a restart from the dashboard is initiated it causes the server to fail to restart. The resulting error appears in the log.
[2024-07-10 17:59:33.475 +00:00] [FTL] Error while starting server
Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 8: 'attempt to write a readonly database'.
at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
at Emby.Server.Implementations.Data.SqliteExtensions.Execute(SqliteConnection sqliteConnection, String commandText)
at Emby.Server.Implementations.Data.ManagedConnection.Execute(String commandText)
at Emby.Server.Implementations.Data.BaseSqliteRepository.Initialize()
at Emby.Server.Implementations.Data.SqliteItemRepository.Initialize()
at Emby.Server.Implementations.ApplicationHost.InitializeServices()
at Jellyfin.Server.Program.StartServer(IServerApplicationPaths appPaths, StartupOptions options, IConfiguration startupConfig)
Uninstalling the plugin resolved the issue. I was able to re-produce the problem when I re-installed the plugin.
Ubuntu 24.04 - bare metal Jellyfin 10.9.7 - package install
I was also able to replicate on a Docker instance I have for testing.
I was able to produce and reproduce the problem also by activating and deactivating the plugin.
One thing I noticed was that a package install directly on Ubuntu will not attempt to restart after the fatal database error. But the docker instance will restart again and appears to recover on its own.
I added Restart = always to the systemd service because the generic linux install guide mentioned it and the docker guide also. This remedies the symptoms but not the cause
I have the same issue, also reported here.
For me this problem only seems to arise when you update the Jellyfin server version. So another work around is disable the plugin before updating Jellyfin server, restart server, update jellyfin server, restart server, enable plugin, and restart server. Now the plugin should no longer prevent restarts.
If you are currently experiencing the issue, try following the above instructions (minus the jellyfin server udpate) and it may resolve the issue until you update jellyfin server again.
Disable then restart server and it should update the plugin to 15.0.0.0 from 14.0.0.0
That worked! Thank you for your help.
But 15.0.0.0 still has this issue
Playback Reporting was breaking the restart of the server. NO plugin should stop the server from booting. I had it fixed but after a few weeks it stopped restarting.
Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'database is locked For more information on this error code see https://www.sqlite.org/rescode.html'.
at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
at Microsoft.Data.Sqlite.SqliteConnection.Deactivate()
at Microsoft.Data.Sqlite.SqliteConnection.Close()
at System.Data.Common.DbConnection.CloseAsync()
--- End of stack trace from previous location ---
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.CloseAsync()
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.CloseAsync()
at Microsoft.EntityFrameworkCore.Storage.RelationalDataReader.DisposeAsync()
at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable`1 source, CancellationToken cancellationToken)
at Jellyfin.Server.Implementations.Trickplay.TrickplayManager.GetTrickplayResolutions(Guid itemId)
at Jellyfin.Server.Implementations.Trickplay.TrickplayManager.GetTrickplayResolutions(Guid itemId)
at Jellyfin.Server.Implementations.Trickplay.TrickplayManager.GetTrickplayManifest(BaseItem item)
at Emby.Server.Implementations.Dto.DtoService.AttachBasicFields(BaseItemDto dto, BaseItem item, BaseItem owner, DtoOptions options)
at Emby.Server.Implementations.Dto.DtoService.GetBaseItemDtoInternal(BaseItem item, DtoOptions options, User user, BaseItem owner)
at Jellyfin.Api.Controllers.UserLibraryController.GetItem(Nullable`1 userId, Guid itemId)
at lambda_method1194(Closure, Object)
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Jellyfin.Api.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManager)
at Jellyfin.Api.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager)
at Jellyfin.Api.Middleware.IPBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager)
at Jellyfin.Api.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Jellyfin.Api.Middleware.QueryStringDecodingMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Jellyfin.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
at Jellyfin.Api.Middleware.ExceptionMiddleware.Invoke(HttpContext context)
[ERR] An error occurred using the connection to database '"main"' on server '"/var/lib/jellyfin/data/jellyfin.db"'.
[ERR] An exception occurred while iterating over the results of a query for context type '"Jellyfin.Server.Implementations.JellyfinDbContext"'."
""Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'not an error'.
at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
at Microsoft.Data.Sqlite.SqliteConnection.Open()
at System.Data.Common.DbConnection.OpenAsync(CancellationToken cancellationToken)
--- End of stack trace from previous location ---
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternalAsync(Boolean errorsExpected, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternalAsync(Boolean errorsExpected, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenAsync(CancellationToken cancellationToken, Boolean errorsExpected)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.AsyncEnumerator.InitializeReaderAsync(AsyncEnumerator enumerator, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()"
Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 5: 'not an error'.
at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
at Microsoft.Data.Sqlite.SqliteConnection.Open()
at System.Data.Common.DbConnection.OpenAsync(CancellationToken cancellationToken)
--- End of stack trace from previous location ---
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternalAsync(Boolean errorsExpected, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternalAsync(Boolean errorsExpected, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenAsync(CancellationToken cancellationToken, Boolean errorsExpected)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.AsyncEnumerator.InitializeReaderAsync(AsyncEnumerator enumerator, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()
at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)
at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString)
at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfoFromDictionary(Dictionary`2 auth, IHeaderDictionary headers, IQueryCollection queryString)
at Jellyfin.Server.Implementations.Security.AuthorizationContext.GetAuthorizationInfo(HttpRequest requestContext)
This was in the log, not sure if it's the cause. Trickplay error?
I think this should be moved to Jellyfin server issues? @Bond-009 @thornbill
Don't ping random team members
@thornbill I wasn't random. I have notice both of you around (outside Server and web UI) sometimes doing admin work. I am sorry I pinged you in this manner.
I believe this issue still exists. Able to replicate it on unraid v7.0.1 using Jellyfin v10.10.7 and Playback Reporting v16.0.0.0
Still an active bug
at Emby.Server.Implementations.Data.ManagedConnection.Execute(String commandText)
at Emby.Server.Implementations.Data.BaseSqliteRepository.Initialize()
at Emby.Server.Implementations.Data.SqliteItemRepository.Initialize()
at Emby.Server.Implementations.ApplicationHost.InitializeServices()
at Jellyfin.Server.Program.StartServer(IServerApplicationPaths appPaths, StartupOptions options, IConfiguration sta>
[INF] Running query planner optimizations in the database... This might take a while
[INF] Disposing CoreAppHost
[INF] Disposing PluginManager
systemd[1]: jellyfin.service: Deactivated successfully.
I believe this issue still exists. Able to replicate it on unraid v7.0.1 using Jellyfin v10.10.7 and Playback Reporting v16.0.0.0
it very much does still exist. with the plugin enabled, restarting jellyfin via the webui fails.
Try shutting down jf completly then delete any leftover folders of the plugin of pre v16.0.0.0 versions in the plugin dir and then do a cold start of jf. Never ever had the issue since v16.0.0.0
Try shutting down jf completly then delete any leftover folders of the plugin of pre v16.0.0.0 versions in the plugin dir and then do a cold start of jf. Never ever had the issue since v16.0.0.0
in /var/lib/jellyfin/plugins, which folders would be leftover? my JF instance is a proxmox ubuntu container.
'Playback Reporting_15.0.0.0' in your case
guess i'm missing something obvious. have stopped the jellyfind service
then used rm -rf /var/lib/jellyfin/plugins/Playback\ Reporting_15.0.0.0/*, however there are no errors but the folder does not delete.
remove the asterix, with it you will just delete the files inside the folder
remove the asterix, with it you will just delete the files inside the folder
removing the old plugin folders hasn't made any difference. restarting jellyfin from the dashboard UI still fails.
For completeness (as this was the original reported issue for this problem), there are a few more of us in #96 who have noted that the fix in 16.0.0.0 doesn't seem to have helped.