millerajm 4 Posted February 15, 2018 Posted February 15, 2018 Hi, running 3.2.70.0 on Ubuntu server 16.04 This evening I noticed some notifications on the emby dashboard, involving SQLite exceptions when refreshing the database. some googling suggested that the library.db file was corrupted, so I shut down the emby server, removed the file, and then restarted the emby server again. After a library scan, all appears as it should, but I can then no longer restart the emby server. It stops immediately, when I check service emby-server status, I see: ● emby-server.service - Emby Media Server Loaded: loaded (/lib/systemd/system/emby-server.service; enabled; vendor preset: enabled) Active: inactive (dead) since Thu 2018-02-15 00:28:46 EST; 8s ago Process: 3270 ExecStopPost=/usr/bin/emby-server clear (code=exited, status=0/SUCCESS) Process: 3240 ExecStart=/usr/bin/emby-server start (code=exited, status=0/SUCCESS) Main PID: 3240 (code=exited, status=0/SUCCESS) Feb 15 00:28:45 THE-SERVER systemd[1]: Started Emby Media Server. Feb 15 00:28:45 THE-SERVER su[3240]: Successful su for emby by root Feb 15 00:28:45 THE-SERVER su[3240]: + ??? root:emby Feb 15 00:28:45 THE-SERVER su[3240]: pam_unix(su:session): session opened for user emby by (uid=0) By deleting the library.db file again, I can restart the server. I was unable to open my original library.db file with sqlite3, so it appears it was in fact corrupted. Could the new library scan be always giving me a new corrupt library.db? Is there some other db that is also corrupt that I need to purge as well? I did try restarting the machine, but the emby-server service still wouldn't start without deleting the newly made library.db Here is the info from the system log on this crash: 2018-02-15 00:17:00.036 Info Main: Emby Command line: /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe -programdata /var/lib/emby-server -restartpath /usr/lib/emby-server/restart.sh Operating system: Unix 4.4.0.112 64-Bit OS: True 64-Bit Process: True User Interactive: False Mono: 4.8.1 (Stable 4.8.1.0/22a39d7 Tue May 2 22:26:20 UTC 2017) Processor count: 8 Program data path: /var/lib/emby-server Application directory: /usr/lib/emby-server/bin 2018-02-15 00:17:01.788 Info App: Application version: 3.2.70.0 2018-02-15 00:17:01.789 Info App: Loading assemblies 2018-02-15 00:17:02.217 Info App: Loading AutoBoxSets, Version=1.1.2.0, Culture=neutral, PublicKeyToken=null 2018-02-15 00:17:02.217 Info App: Loading Emby.Kodi.SyncQueue, Version=2.0.1.0, Culture=neutral, PublicKeyToken=null 2018-02-15 00:17:02.217 Info App: Loading MediaBrowser.Api, Version=3.2.70.0, Culture=neutral, PublicKeyToken=null 2018-02-15 00:17:02.217 Info App: Loading MediaBrowser.WebDashboard, Version=3.2.70.0, Culture=neutral, PublicKeyToken=null 2018-02-15 00:17:02.218 Info App: Loading MediaBrowser.Model, Version=3.2.70.0, Culture=neutral, PublicKeyToken=null 2018-02-15 00:17:02.218 Info App: Loading MediaBrowser.Common, Version=3.2.70.0, Culture=neutral, PublicKeyToken=null 2018-02-15 00:17:02.218 Info App: Loading MediaBrowser.Controller, Version=3.2.70.0, Culture=neutral, PublicKeyToken=null 2018-02-15 00:17:02.218 Info App: Loading MediaBrowser.Providers, Version=3.2.70.0, Culture=neutral, PublicKeyToken=null 2018-02-15 00:17:02.218 Info App: Loading Emby.Photos, Version=3.2.70.0, Culture=neutral, PublicKeyToken=null 2018-02-15 00:17:02.218 Info App: Loading Emby.Server.Implementations, Version=3.2.70.0, Culture=neutral, PublicKeyToken=null 2018-02-15 00:17:02.218 Info App: Loading Emby.Server.MediaEncoding, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 2018-02-15 00:17:02.218 Info App: Loading Emby.Dlna, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 2018-02-15 00:17:02.218 Info App: Loading MediaBrowser.LocalMetadata, Version=3.2.70.0, Culture=neutral, PublicKeyToken=null 2018-02-15 00:17:02.218 Info App: Loading MediaBrowser.XbmcMetadata, Version=3.2.70.0, Culture=neutral, PublicKeyToken=null 2018-02-15 00:17:02.218 Info App: Loading MediaBrowser.Server.Mono, Version=3.2.70.0, Culture=neutral, PublicKeyToken=null 2018-02-15 00:17:02.218 Info App: Loading Emby.Server.CinemaMode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 2018-02-15 00:17:02.218 Info App: Loading Emby.Server.Connect, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 2018-02-15 00:17:02.218 Info App: Loading Emby.Server.Sync, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 2018-02-15 00:17:02.645 Info SqliteUserRepository: Sqlite version: 3.18.0 2018-02-15 00:17:02.646 Info SqliteUserRepository: Sqlite compiler options: COMPILER=gcc-5.3.1 20160413,DEFAULT_SYNCHRONOUS=2,DEFAULT_WAL_SYNCHRONOUS=2,ENABLE_COLUMN_METADATA,ENABLE_DBSTAT_VTAB,ENABLE_FTS3,ENABLE_FTS3_PARENTHESIS,ENABLE_FTS5,ENABLE_JSON1,ENABLE_LOAD_EXTENSION,ENABLE_RTREE,ENABLE_UNLOCK_NOTIFY,ENABLE_UPDATE_DELETE_LIMIT,LIKE_DOESNT_MATCH_BLOBS,MAX_SCHEMA_RETRY=25,OMIT_LOOKASIDE,SECURE_DELETE,SYSTEM_MALLOC,THREADSAFE=1 2018-02-15 00:17:02.744 Info SqliteUserRepository: Default journal_mode for /var/lib/emby-server/data/users.db is wal 2018-02-15 00:17:02.746 Info SqliteUserRepository: PRAGMA synchronous=1 2018-02-15 00:17:02.799 Info AuthenticationRepository: Default journal_mode for /var/lib/emby-server/data/authentication.db is wal 2018-02-15 00:17:02.799 Info AuthenticationRepository: PRAGMA synchronous=1 2018-02-15 00:17:03.058 Info DeviceManager: Default journal_mode for /var/lib/emby-server/data/devices.db is wal 2018-02-15 00:17:03.059 Info DeviceManager: PRAGMA synchronous=1 2018-02-15 00:17:03.330 Info ActivityRepository: Default journal_mode for /var/lib/emby-server/data/activitylog.db is wal 2018-02-15 00:17:03.330 Info ActivityRepository: PRAGMA synchronous=1 2018-02-15 00:17:03.383 Info SqliteDisplayPreferencesRepository: Default journal_mode for /var/lib/emby-server/data/displaypreferences.db is wal 2018-02-15 00:17:03.383 Info SqliteDisplayPreferencesRepository: PRAGMA synchronous=1 2018-02-15 00:17:03.444 Error Main: UnhandledException *** Error Report *** Version: 3.2.70.0 Command line: /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe -programdata /var/lib/emby-server -restartpath /usr/lib/emby-server/restart.sh Operating system: Unix 4.4.0.112 64-Bit OS: True 64-Bit Process: True User Interactive: False Mono: 4.8.1 (Stable 4.8.1.0/22a39d7 Tue May 2 22:26:20 UTC 2017) Processor count: 8 Program data path: /var/lib/emby-server Application directory: /usr/lib/emby-server/bin System.AggregateException: One or more errors occurred. ---> SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown. at SQLitePCL.pretty.SQLiteException.CheckOk (SQLitePCL.sqlite3 db, System.Int32 rc) [0x0001a] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at SQLitePCL.pretty.SQLiteDatabaseConnection.PrepareStatement (System.String sql, System.String& tail) [0x00038] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at SQLitePCL.pretty.DatabaseConnection.PrepareStatement (SQLitePCL.pretty.IDatabaseConnection This, System.String sql) [0x0000c] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at SQLitePCL.pretty.DatabaseConnection+<Query>c__AnonStorey1.<>m__0 () [0x00000] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at SQLitePCL.pretty.DelegatingEnumerable`1[T].GetEnumerator () [0x00000] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at System.Linq.Enumerable+WhereSelectEnumerableIterator`2[TSource,TResult].MoveNext () [0x0001a] in <2392cff65f724abaaed9de072f62bc4a>:0 at System.Linq.Enumerable.First[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0003e] in <2392cff65f724abaaed9de072f62bc4a>:0 at Emby.Server.Implementations.Data.BaseSqliteRepository.CreateConnection (System.Boolean isReadOnly) [0x000f3] in <730a104ef6c8470ebc4f70071ce76249>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at Emby.Server.Implementations.ApplicationHost+<Init>c__async1.MoveNext () [0x00271] in <730a104ef6c8470ebc4f70071ce76249>:0 --- End of inner exception stack trace --- at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks, System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x00242] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks, System.Int32 millisecondsTimeout) [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks) [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at MediaBrowser.Server.Mono.MainClass.RunApplication (Emby.Server.Implementations.ServerApplicationPaths appPaths, MediaBrowser.Model.Logging.ILogManager logManager, Emby.Server.Implementations.StartupOptions options) [0x000d5] in <e77604e7ef59468fb9591ab69a2eaac8>:0 at MediaBrowser.Server.Mono.MainClass.Main (System.String[] args) [0x000a1] in <e77604e7ef59468fb9591ab69a2eaac8>:0 ---> (Inner Exception #0) CannotOpen: unable to open database file SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown. at SQLitePCL.pretty.SQLiteException.CheckOk (SQLitePCL.sqlite3 db, System.Int32 rc) [0x0001a] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at SQLitePCL.pretty.SQLiteDatabaseConnection.PrepareStatement (System.String sql, System.String& tail) [0x00038] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at SQLitePCL.pretty.DatabaseConnection.PrepareStatement (SQLitePCL.pretty.IDatabaseConnection This, System.String sql) [0x0000c] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at SQLitePCL.pretty.DatabaseConnection+<Query>c__AnonStorey1.<>m__0 () [0x00000] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at SQLitePCL.pretty.DelegatingEnumerable`1[T].GetEnumerator () [0x00000] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at System.Linq.Enumerable+WhereSelectEnumerableIterator`2[TSource,TResult].MoveNext () [0x0001a] in <2392cff65f724abaaed9de072f62bc4a>:0 at System.Linq.Enumerable.First[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0003e] in <2392cff65f724abaaed9de072f62bc4a>:0 at Emby.Server.Implementations.Data.BaseSqliteRepository.CreateConnection (System.Boolean isReadOnly) [0x000f3] in <730a104ef6c8470ebc4f70071ce76249>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at Emby.Server.Implementations.ApplicationHost+<Init>c__async1.MoveNext () [0x00271] in <730a104ef6c8470ebc4f70071ce76249>:0 <--- System.AggregateException at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks, System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x00242] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks, System.Int32 millisecondsTimeout) [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks) [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at MediaBrowser.Server.Mono.MainClass.RunApplication (Emby.Server.Implementations.ServerApplicationPaths appPaths, MediaBrowser.Model.Logging.ILogManager logManager, Emby.Server.Implementations.StartupOptions options) [0x000d5] in <e77604e7ef59468fb9591ab69a2eaac8>:0 at MediaBrowser.Server.Mono.MainClass.Main (System.String[] args) [0x000a1] in <e77604e7ef59468fb9591ab69a2eaac8>:0 InnerException: SQLitePCL.pretty.SQLiteException CannotOpen: unable to open database file SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown. at SQLitePCL.pretty.SQLiteException.CheckOk (SQLitePCL.sqlite3 db, System.Int32 rc) [0x0001a] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at SQLitePCL.pretty.SQLiteDatabaseConnection.PrepareStatement (System.String sql, System.String& tail) [0x00038] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at SQLitePCL.pretty.DatabaseConnection.PrepareStatement (SQLitePCL.pretty.IDatabaseConnection This, System.String sql) [0x0000c] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at SQLitePCL.pretty.DatabaseConnection+<Query>c__AnonStorey1.<>m__0 () [0x00000] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at SQLitePCL.pretty.DelegatingEnumerable`1[T].GetEnumerator () [0x00000] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at System.Linq.Enumerable+WhereSelectEnumerableIterator`2[TSource,TResult].MoveNext () [0x0001a] in <2392cff65f724abaaed9de072f62bc4a>:0 at System.Linq.Enumerable.First[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0003e] in <2392cff65f724abaaed9de072f62bc4a>:0 at Emby.Server.Implementations.Data.BaseSqliteRepository.CreateConnection (System.Boolean isReadOnly) [0x000f3] in <730a104ef6c8470ebc4f70071ce76249>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at Emby.Server.Implementations.ApplicationHost+<Init>c__async1.MoveNext () [0x00271] in <730a104ef6c8470ebc4f70071ce76249>:0 at SQLitePCL.pretty.SQLiteException.CheckOk (SQLitePCL.sqlite3 db, System.Int32 rc) [0x0001a] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at SQLitePCL.pretty.SQLiteDatabaseConnection.PrepareStatement (System.String sql, System.String& tail) [0x00038] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at SQLitePCL.pretty.DatabaseConnection.PrepareStatement (SQLitePCL.pretty.IDatabaseConnection This, System.String sql) [0x0000c] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at SQLitePCL.pretty.DatabaseConnection+<Query>c__AnonStorey1.<>m__0 () [0x00000] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at SQLitePCL.pretty.DelegatingEnumerable`1[T].GetEnumerator () [0x00000] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at System.Linq.Enumerable+WhereSelectEnumerableIterator`2[TSource,TResult].MoveNext () [0x0001a] in <2392cff65f724abaaed9de072f62bc4a>:0 at System.Linq.Enumerable.First[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0003e] in <2392cff65f724abaaed9de072f62bc4a>:0 at Emby.Server.Implementations.Data.BaseSqliteRepository.CreateConnection (System.Boolean isReadOnly) [0x000f3] in <730a104ef6c8470ebc4f70071ce76249>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at Emby.Server.Implementations.ApplicationHost+<Init>c__async1.MoveNext () [0x00271] in <730a104ef6c8470ebc4f70071ce76249> Thanks in advance for any insight anyone might have into this! -Andrew
Luke 42077 Posted February 15, 2018 Posted February 15, 2018 As it turns out, it's not the library db file you wanted to delete but rather displaypreferences However, if you're at the point of deleting the library db file then you may also want to consider a complete uninstall followed by a fresh install based on our newer download instructions: https://emby.media/download I can see from your log you're running our older package. Our newer package will perform better with a lighter footprint. You don't have to do this, it's only a suggestion since you've already deleted the library db file anyway.
millerajm 4 Posted February 15, 2018 Author Posted February 15, 2018 (edited) Thanks for the quick reply Luke! So, I've now shut down, then removed displaypreferences.db (leaving the library.db file that was regenerated minutes ago). It still appears to die immediately on startup, same behavior. I will try deleting BOTH, rescan library, and then see if I am able to restart. EDIT: While it's rescanning, I checked, and I am able to open the original displaypreferences.db in sqlite3, whereas I wasn't able to open my original library.db (I am able to open the newly generated library.db files though, just can't start emby while they're present it seems) Edited February 15, 2018 by millerajm
Solution Luke 42077 Posted February 15, 2018 Solution Posted February 15, 2018 I'll need to see a complete server log, thanks. having said that, if we don't see anything obvious then it will be best just to move onto the new install package. thanks. 1
millerajm 4 Posted February 15, 2018 Author Posted February 15, 2018 So, I deleted the displaypreferences.db and library.db, then started the server. I then scanned the library, and attempted to restart the server. No luck, here is the log file: 2018-02-15 01:21:46.680 Info Main: Emby Command line: /usr/lib/emby-server/bin/MediaBrowser.Server.Mono.exe -programdata /var/lib/emby-server -restartpath /usr/lib/emby-server/restart.sh Operating system: Unix 4.4.0.112 64-Bit OS: True 64-Bit Process: True User Interactive: False Mono: 4.8.1 (Stable 4.8.1.0/22a39d7 Tue May 2 22:26:20 UTC 2017) Processor count: 8 Program data path: /var/lib/emby-server Application directory: /usr/lib/emby-server/bin 2018-02-15 01:21:47.276 Info App: Application version: 3.2.70.0 2018-02-15 01:21:47.277 Info App: Loading assemblies 2018-02-15 01:21:47.319 Info App: Loading AutoBoxSets, Version=1.1.2.0, Culture=neutral, PublicKeyToken=null 2018-02-15 01:21:47.319 Info App: Loading Emby.Kodi.SyncQueue, Version=2.0.1.0, Culture=neutral, PublicKeyToken=null 2018-02-15 01:21:47.319 Info App: Loading MediaBrowser.Api, Version=3.2.70.0, Culture=neutral, PublicKeyToken=null 2018-02-15 01:21:47.319 Info App: Loading MediaBrowser.WebDashboard, Version=3.2.70.0, Culture=neutral, PublicKeyToken=null 2018-02-15 01:21:47.319 Info App: Loading MediaBrowser.Model, Version=3.2.70.0, Culture=neutral, PublicKeyToken=null 2018-02-15 01:21:47.319 Info App: Loading MediaBrowser.Common, Version=3.2.70.0, Culture=neutral, PublicKeyToken=null 2018-02-15 01:21:47.319 Info App: Loading MediaBrowser.Controller, Version=3.2.70.0, Culture=neutral, PublicKeyToken=null 2018-02-15 01:21:47.319 Info App: Loading MediaBrowser.Providers, Version=3.2.70.0, Culture=neutral, PublicKeyToken=null 2018-02-15 01:21:47.319 Info App: Loading Emby.Photos, Version=3.2.70.0, Culture=neutral, PublicKeyToken=null 2018-02-15 01:21:47.319 Info App: Loading Emby.Server.Implementations, Version=3.2.70.0, Culture=neutral, PublicKeyToken=null 2018-02-15 01:21:47.319 Info App: Loading Emby.Server.MediaEncoding, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 2018-02-15 01:21:47.319 Info App: Loading Emby.Dlna, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 2018-02-15 01:21:47.319 Info App: Loading MediaBrowser.LocalMetadata, Version=3.2.70.0, Culture=neutral, PublicKeyToken=null 2018-02-15 01:21:47.319 Info App: Loading MediaBrowser.XbmcMetadata, Version=3.2.70.0, Culture=neutral, PublicKeyToken=null 2018-02-15 01:21:47.319 Info App: Loading MediaBrowser.Server.Mono, Version=3.2.70.0, Culture=neutral, PublicKeyToken=null 2018-02-15 01:21:47.319 Info App: Loading Emby.Server.CinemaMode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 2018-02-15 01:21:47.319 Info App: Loading Emby.Server.Connect, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 2018-02-15 01:21:47.319 Info App: Loading Emby.Server.Sync, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 2018-02-15 01:21:47.576 Info SqliteUserRepository: Sqlite version: 3.18.0 2018-02-15 01:21:47.576 Info SqliteUserRepository: Sqlite compiler options: COMPILER=gcc-5.3.1 20160413,DEFAULT_SYNCHRONOUS=2,DEFAULT_WAL_SYNCHRONOUS=2,ENABLE_COLUMN_METADATA,ENABLE_DBSTAT_VTAB,ENABLE_FTS3,ENABLE_FTS3_PARENTHESIS,ENABLE_FTS5,ENABLE_JSON1,ENABLE_LOAD_EXTENSION,ENABLE_RTREE,ENABLE_UNLOCK_NOTIFY,ENABLE_UPDATE_DELETE_LIMIT,LIKE_DOESNT_MATCH_BLOBS,MAX_SCHEMA_RETRY=25,OMIT_LOOKASIDE,SECURE_DELETE,SYSTEM_MALLOC,THREADSAFE=1 2018-02-15 01:21:47.604 Info SqliteUserRepository: Default journal_mode for /var/lib/emby-server/data/users.db is wal Here is the unhandled file produced in the log directory also in case that helps: System.AggregateException: One or more errors occurred. ---> SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown. at SQLitePCL.pretty.SQLiteException.CheckOk (SQLitePCL.sqlite3 db, System.Int32 rc) [0x0001a] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at SQLitePCL.pretty.SQLiteDatabaseConnection.PrepareStatement (System.String sql, System.String& tail) [0x00038] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at SQLitePCL.pretty.DatabaseConnection.PrepareStatement (SQLitePCL.pretty.IDatabaseConnection This, System.String sql) [0x0000c] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at SQLitePCL.pretty.DatabaseConnection+<Query>c__AnonStorey1.<>m__0 () [0x00000] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at SQLitePCL.pretty.DelegatingEnumerable`1[T].GetEnumerator () [0x00000] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at System.Linq.Enumerable+WhereSelectEnumerableIterator`2[TSource,TResult].MoveNext () [0x0001a] in <2392cff65f724abaaed9de072f62bc4a>:0 at System.Linq.Enumerable.First[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0003e] in <2392cff65f724abaaed9de072f62bc4a>:0 at Emby.Server.Implementations.Data.BaseSqliteRepository.CreateConnection (System.Boolean isReadOnly) [0x000f3] in <730a104ef6c8470ebc4f70071ce76249>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at Emby.Server.Implementations.ApplicationHost+<Init>c__async1.MoveNext () [0x00271] in <730a104ef6c8470ebc4f70071ce76249>:0 --- End of inner exception stack trace --- at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks, System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x00242] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks, System.Int32 millisecondsTimeout) [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks) [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at MediaBrowser.Server.Mono.MainClass.RunApplication (Emby.Server.Implementations.ServerApplicationPaths appPaths, MediaBrowser.Model.Logging.ILogManager logManager, Emby.Server.Implementations.StartupOptions options) [0x000d5] in <e77604e7ef59468fb9591ab69a2eaac8>:0 at MediaBrowser.Server.Mono.MainClass.Main (System.String[] args) [0x000a1] in <e77604e7ef59468fb9591ab69a2eaac8>:0 ---> (Inner Exception #0) CannotOpen: unable to open database file SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown. at SQLitePCL.pretty.SQLiteException.CheckOk (SQLitePCL.sqlite3 db, System.Int32 rc) [0x0001a] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at SQLitePCL.pretty.SQLiteDatabaseConnection.PrepareStatement (System.String sql, System.String& tail) [0x00038] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at SQLitePCL.pretty.DatabaseConnection.PrepareStatement (SQLitePCL.pretty.IDatabaseConnection This, System.String sql) [0x0000c] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at SQLitePCL.pretty.DatabaseConnection+<Query>c__AnonStorey1.<>m__0 () [0x00000] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at SQLitePCL.pretty.DelegatingEnumerable`1[T].GetEnumerator () [0x00000] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at System.Linq.Enumerable+WhereSelectEnumerableIterator`2[TSource,TResult].MoveNext () [0x0001a] in <2392cff65f724abaaed9de072f62bc4a>:0 at System.Linq.Enumerable.First[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0003e] in <2392cff65f724abaaed9de072f62bc4a>:0 at Emby.Server.Implementations.Data.BaseSqliteRepository.CreateConnection (System.Boolean isReadOnly) [0x000f3] in <730a104ef6c8470ebc4f70071ce76249>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at Emby.Server.Implementations.ApplicationHost+<Init>c__async1.MoveNext () [0x00271] in <730a104ef6c8470ebc4f70071ce76249>:0 <--- System.AggregateException at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks, System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x00242] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks, System.Int32 millisecondsTimeout) [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Threading.Tasks.Task.WaitAll (System.Threading.Tasks.Task[] tasks) [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at MediaBrowser.Server.Mono.MainClass.RunApplication (Emby.Server.Implementations.ServerApplicationPaths appPaths, MediaBrowser.Model.Logging.ILogManager logManager, Emby.Server.Implementations.StartupOptions options) [0x000d5] in <e77604e7ef59468fb9591ab69a2eaac8>:0 at MediaBrowser.Server.Mono.MainClass.Main (System.String[] args) [0x000a1] in <e77604e7ef59468fb9591ab69a2eaac8>:0 InnerException: SQLitePCL.pretty.SQLiteException CannotOpen: unable to open database file SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown. at SQLitePCL.pretty.SQLiteException.CheckOk (SQLitePCL.sqlite3 db, System.Int32 rc) [0x0001a] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at SQLitePCL.pretty.SQLiteDatabaseConnection.PrepareStatement (System.String sql, System.String& tail) [0x00038] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at SQLitePCL.pretty.DatabaseConnection.PrepareStatement (SQLitePCL.pretty.IDatabaseConnection This, System.String sql) [0x0000c] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at SQLitePCL.pretty.DatabaseConnection+<Query>c__AnonStorey1.<>m__0 () [0x00000] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at SQLitePCL.pretty.DelegatingEnumerable`1[T].GetEnumerator () [0x00000] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at System.Linq.Enumerable+WhereSelectEnumerableIterator`2[TSource,TResult].MoveNext () [0x0001a] in <2392cff65f724abaaed9de072f62bc4a>:0 at System.Linq.Enumerable.First[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0003e] in <2392cff65f724abaaed9de072f62bc4a>:0 at Emby.Server.Implementations.Data.BaseSqliteRepository.CreateConnection (System.Boolean isReadOnly) [0x000f3] in <730a104ef6c8470ebc4f70071ce76249>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at Emby.Server.Implementations.ApplicationHost+<Init>c__async1.MoveNext () [0x00271] in <730a104ef6c8470ebc4f70071ce76249>:0 at SQLitePCL.pretty.SQLiteException.CheckOk (SQLitePCL.sqlite3 db, System.Int32 rc) [0x0001a] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at SQLitePCL.pretty.SQLiteDatabaseConnection.PrepareStatement (System.String sql, System.String& tail) [0x00038] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at SQLitePCL.pretty.DatabaseConnection.PrepareStatement (SQLitePCL.pretty.IDatabaseConnection This, System.String sql) [0x0000c] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at SQLitePCL.pretty.DatabaseConnection+<Query>c__AnonStorey1.<>m__0 () [0x00000] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at SQLitePCL.pretty.DelegatingEnumerable`1[T].GetEnumerator () [0x00000] in <926d5dc8f35f4aae9a6008f11f233fd0>:0 at System.Linq.Enumerable+WhereSelectEnumerableIterator`2[TSource,TResult].MoveNext () [0x0001a] in <2392cff65f724abaaed9de072f62bc4a>:0 at System.Linq.Enumerable.First[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0003e] in <2392cff65f724abaaed9de072f62bc4a>:0 at Emby.Server.Implementations.Data.BaseSqliteRepository.CreateConnection (System.Boolean isReadOnly) [0x000f3] in <730a104ef6c8470ebc4f70071ce76249>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0004e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at Emby.Server.Implementations.ApplicationHost+<Init>c__async1.MoveNext () [0x00271] in <730a104ef6c8470ebc4f70071ce76249>:0 I can also send you the log from the instance where I started the server successfully and rescanned the library if you need it, but I don't post here because it contains IPs
Luke 42077 Posted February 15, 2018 Posted February 15, 2018 It could be one of the other databases as well. the log possibly suggests the users.db file is also corrupt.
millerajm 4 Posted February 15, 2018 Author Posted February 15, 2018 Hi Luke, thanks again for your time on this! I think I will just go ahead and upgrade to the newer package, as I was planning to do it soon anyway. Does the newer package use the same style databases for users, etc? I don't mind rescanning the library etc, as I have all images and nfo files saved locally with the media, so that shouldn't be an issue, but I would prefer to avoid recreating each user individually if possible.
Luke 42077 Posted February 16, 2018 Posted February 16, 2018 Yes but if your user db I'd corrupted then you'll just be bringing along the same problem to the new server. You can try it and then always delete it if you see the same errors.
millerajm 4 Posted February 16, 2018 Author Posted February 16, 2018 Yes, I should have clarified, I do have backups of my db files from last month when everything was working fine, so I will try to use that to get all my user accounts back.
millerajm 4 Posted February 20, 2018 Author Posted February 20, 2018 Hi Luke, quick question to reinstall with the new package. I used apt-get remove emby-server, then used apt autoremove after that tried to do the install as directed on the link you gave, but it gave an error about something being masked. Then I couldn't start the emby service, so I did apt-get remove emby-server again, and did a reboot. After that, I tried to install the package again dpkg -i emby-server-deb_3.2.70.0_amd64.deb And I get this output: Selecting previously unselected package emby-server. (Reading database ... 119191 files and directories currently installed.) Preparing to unpack emby-server-deb_3.2.70.0_amd64.deb ... Unpacking emby-server (3.2.70.0) ... Setting up emby-server (3.2.70.0) ... usermod: no changes Synchronizing state of emby-server.service with SysV init with /lib/systemd/systemd-sysv-install... Executing /lib/systemd/systemd-sysv-install enable emby-server insserv: warning: current start runlevel(s) (empty) of script `emby-server' overrides LSB defaults (2 3 4 5). insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `emby-server' overrides LSB defaults (0 1 6). Failed to execute operation: Unit file is masked Failed to start emby-server.service: Unit emby-server.service is masked. Processing triggers for libc-bin (2.23-0ubuntu10) ... Processing triggers for ureadahead (0.100.0-19) ... ajm@THE-SERVER:~/packages$ sudo service emby-server start Failed to start emby-server.service: Unit emby-server.service is masked. What do I need to do to get this new version of the emby service enabled? Thanks again for your help, and if this should be a new thread I'm happy to post it again in the proper place.
millerajm 4 Posted February 20, 2018 Author Posted February 20, 2018 Sorry to bother, you I ran the following commands and now I am able to start and restart the new package with no issues! user@THE-SERVER:~/packages$ sudo systemctl unmask emby-server Removed symlink /etc/systemd/system/emby-server.service. user@THE-SERVER:~/packages$ sudo dpkg -i emby-server-deb_3.2.70.0_amd64.deb (Reading database ... 124225 files and directories currently installed.) Preparing to unpack emby-server-deb_3.2.70.0_amd64.deb ... Synchronizing state of emby-server.service with SysV init with /lib/systemd/systemd-sysv-install... Executing /lib/systemd/systemd-sysv-install disable emby-server insserv: warning: current start runlevel(s) (empty) of script `emby-server' overrides LSB defaults (2 3 4 5). insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `emby-server' overrides LSB defaults (0 1 6). Removed symlink /etc/systemd/system/multi-user.target.wants/emby-server.service. Unpacking emby-server (3.2.70.0) over (3.2.70.0) ... Setting up emby-server (3.2.70.0) ... usermod: no changes Synchronizing state of emby-server.service with SysV init with /lib/systemd/systemd-sysv-install... Executing /lib/systemd/systemd-sysv-install enable emby-server insserv: warning: current start runlevel(s) (empty) of script `emby-server' overrides LSB defaults (2 3 4 5). insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `emby-server' overrides LSB defaults (0 1 6). Created symlink from /etc/systemd/system/multi-user.target.wants/emby-server.service to /usr/lib/systemd/system/emby-server.service. Processing triggers for libc-bin (2.23-0ubuntu10) ... Processing triggers for ureadahead (0.100.0-19) ... Still a couple warning but everything starts up fine now. It appears to have the library, users, etc. without a rescan even. Thanks again!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now