Hjlfmir 13 Posted June 21, 2023 Share Posted June 21, 2023 Hi all, I have an issue with my EMby server on Synology. When I put new medias in a folder they aren't found by server. I found that the issue is caused by an old media (removed) still in the database. Seems Emby can't remove it and is not able to continue to "parse" the folder. I tried to put a file with the same name and remove it from Emby, not succedded. Here the error in the log, maybe someone could help me Thank you. 2023-06-21 23:54:05.370 Info App: Removing item from database, Type: Movie, Name: Jean-Philippe, Path: /volume1/video/001-Films/J/Jean-Philippe (2006).avi, Id: 1486 2023-06-21 23:54:05.500 Error BaseItem: Error validating children for J 37 /volume1/video/001-Films/J *** Error Report *** Version: 4.7.13.0 Command line: /volume1/@appstore/EmbyServer/system/EmbyServer.dll -programdata /var/packages/EmbyServer/var -ffdetect /var/packages/EmbyServer/target/bin/ffdetect -ffmpeg /var/packages/EmbyServer/target/bin/ffmpeg -ffprobe /var/packages/EmbyServer/target/bin/ffprobe -nolocalportconfig -ignore_vaapi_enabled_flag -pidfile /var/packages/EmbyServer/var/EmbyServer.pid -defaultdirectory /volume1/Public -updatepackage emby-server-synology72_{version}_x86_64.spk Operating system: Linux version 4.4.302+ (root@build5) (gcc version 12.2.0 (GCC) ) #64561 SMP Fri May 19 01:27:06 CST 2023 Framework: .NET 6.0.14 OS/Process: x64/x64 Runtime: volume1/@appstore/EmbyServer/system/System.Private.CoreLib.dll Processor count: 8 Data path: /var/packages/EmbyServer/var Application path: /volume1/@appstore/EmbyServer/system SQLitePCL.pretty.SQLiteException: Corrupt: database disk image is malformed SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown. at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc) at SQLitePCL.pretty.StatementImpl.MoveNext() at Emby.Server.Implementations.Data.SqliteItemRepository.ExecuteWithStringFormatParam(IDatabaseConnection db, String query, String valueText, Int64[] values) at Emby.Server.Implementations.Data.SqliteItemRepository.DeleteItemsInTransaction(IDatabaseConnection db, Int64[] ids, Boolean containsFolders, Boolean supportsPeople, Boolean supportsChapters, Boolean supportsCollections, Boolean supportsMediaStreams, Boolean supportsListItems, Boolean supportsExternalDatabases) at Emby.Server.Implementations.Data.SqliteItemRepository.DeleteItemsInChunks(Int64[] ids, IDatabaseConnection db, Boolean containsFolders, Boolean supportsPeople, Boolean supportsChapters, Boolean supportsCollections, Boolean supportsMediaStreams, Boolean supportsListItems, Boolean supportsExternalDatabases) at Emby.Server.Implementations.Data.SqliteItemRepository.DeleteItems(Int64[] ids) at Emby.Server.Implementations.Data.SqliteItemRepository.DeleteItems(BaseItem[] items) at Emby.Server.Implementations.Library.LibraryManager.DeleteItem(BaseItem item, DeleteOptions options, BaseItem parent, Boolean notifyParentItem) at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal(IProgress`1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService) at MediaBrowser.Controller.Entities.Folder.ValidateSubFolders(BaseItem[] children, IDirectoryService directoryService, IProgress`1 progress, CancellationToken cancellationToken) Source: SQLitePCL.pretty TargetSite: Void CheckOk(SQLitePCLEx.sqlite3, Int32) Link to comment Share on other sites More sharing options...
Luke 37107 Posted June 21, 2023 Share Posted June 21, 2023 Hi, please see this and let us know if it helps get you squared away: https://emby.media/support/articles/Corrupt-Database.html Link to comment Share on other sites More sharing options...
Hjlfmir 13 Posted June 22, 2023 Author Share Posted June 22, 2023 Hello Luke, Thank you for your answer. But today my main concern is to access the DB on my Synology. Tried many things but, for now, I didn't succedded (I would try to remove manualy this entry :/) Link to comment Share on other sites More sharing options...
Luke 37107 Posted June 22, 2023 Share Posted June 22, 2023 12 hours ago, Hjlfmir said: Hello Luke, Thank you for your answer. But today my main concern is to access the DB on my Synology. Tried many things but, for now, I didn't succedded (I would try to remove manualy this entry :/) Hi, what did you try to do? Link to comment Share on other sites More sharing options...
Hjlfmir 13 Posted June 22, 2023 Author Share Posted June 22, 2023 (edited) Hi, for now, I follow the link and did these following : - Remove Database Locks - Run Integrity Check - Recover library.db : here, at the end, I can't start Emby (always return to "Manually stop"). I have to delete library.db and restore from library.old :s (check owner and permissions, all is good). Edited June 22, 2023 by Hjlfmir Link to comment Share on other sites More sharing options...
Luke 37107 Posted June 25, 2023 Share Posted June 25, 2023 Are you all set now? Link to comment Share on other sites More sharing options...
Hjlfmir 13 Posted June 26, 2023 Author Share Posted June 26, 2023 (edited) Hello Luke, Nope, still the same issue and I didn't succeed in recovering the Library (Emby wasn't starting after the file "exchange"). So for now I'm still stuck :s Is there any way to remove easily this entry from the database ? Edited June 26, 2023 by Hjlfmir Link to comment Share on other sites More sharing options...
Luke 37107 Posted June 26, 2023 Share Posted June 26, 2023 Deleting the database file altogether will be the best way. Link to comment Share on other sites More sharing options...
Hjlfmir 13 Posted June 26, 2023 Author Share Posted June 26, 2023 Hi Luke, Too many years of manual entries inside, can't imagine re-do everthing oO ! Link to comment Share on other sites More sharing options...
Hjlfmir 13 Posted July 4, 2023 Author Share Posted July 4, 2023 Hi, Is there anyway to "repare" the database whithout deleting it ? Link to comment Share on other sites More sharing options...
Solution Luke 37107 Posted July 9, 2023 Solution Share Posted July 9, 2023 On 7/4/2023 at 4:25 PM, Hjlfmir said: Hi, Is there anyway to "repare" the database whithout deleting it ? You're going to have to delete the rows from the MediaItems table. When you try to do that, you're going to get errors about foreign key constraints from other tables, so basically, you'll need to delete rows from those other tables first before you can delete the rows from MediaItems. Try it with something like DB Browser for sqlite to see what I mean. This is assuming you have experience working with databases though. 1 Link to comment Share on other sites More sharing options...
Hjlfmir 13 Posted July 17, 2023 Author Share Posted July 17, 2023 Hi Luke, Tahnk you for your help. I'll have a look into this 1 Link to comment Share on other sites More sharing options...
Hjlfmir 13 Posted July 23, 2023 Author Share Posted July 23, 2023 Hi Luke, After manually removed all items manually, DB and Emby is going well Thank you for your help 1 Link to comment Share on other sites More sharing options...
Luke 37107 Posted July 24, 2023 Share Posted July 24, 2023 Thanks for the feedback ! Link to comment Share on other sites More sharing options...
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