Aldursil 15 Posted June 7, 2025 Posted June 7, 2025 Please see the atatched log. I was using Emby to listen to some music on my TV through the Roku TV app and then the music stopped playing. I went back to the playlist to start it up again and then nothing was displayed in the music playlist anymore. I had been working on a new library and in the server manager > Library I attempted to remove the "Youtube" library as it was showing files from the 'Youtube Favorites' library in addition to all the files from Folder 1 through Folder 5. Apparently this was not a good idea as I saw a SQLLite exception error when I removed 'Youtube' as a library entry. ├── Youtube │ ├── Folder 1 │ ├── Folder 2 │ ├── Folder 3 │ ├── Folder 4 │ ├── Folder 5 │ └── Youtube Favorites After I got the SQLite exception erorr I then looked into different libraries and all of them are empty. The files are still there on the hard drive though. Please see this section in the log. A few lines below this almost all the data with the database pertaining to media file references was removed. 2025-06-06 23:32:22.601 Info App: Creating folder in database data - /data 2025-06-06 23:32:22.602 Info App: Created folder in database data 133162 - /data 2025-06-06 23:32:22.606 Info App: Rebasing 15361 /data/CelestialNavigations to be underneath 133162 /data 2025-06-06 23:32:22.607 Info App: Rebasing 15484 /data/Christmas to be underneath 133162 /data 2025-06-06 23:32:22.608 Info App: Rebasing 15658 /data/Comedy to be underneath 133162 /data 2025-06-06 23:32:22.609 Info App: Rebasing 16030 /data/Meditation to be underneath 133162 /data 2025-06-06 23:32:22.612 Info App: Rebasing 5358 /data/movies to be underneath 133162 /data 2025-06-06 23:32:22.614 Info App: Rebasing 4 /data/music to be underneath 133162 /data 2025-06-06 23:32:22.784 Info App: Rebasing 14138 /data/tvshows to be underneath 133162 /data Is my best thing to get Emby data populated again to restore from backup? Thanks embyserver-63884850143.txt
Happy2Play 9780 Posted June 7, 2025 Posted June 7, 2025 What libraries/library paths do you have setup? As it would appear to be a parent/child issue that does not play well in 4.8 with some improvement in 4.9 but is not officially supported and creates db issues like you are having. Most likely you will have to remove all /data libraries do a scan and readd without any parent/child paths. As a /data library absorbs all other sub/child pathes.
Aldursil 15 Posted June 7, 2025 Author Posted June 7, 2025 I'm not sure what you mean in regards to "readd without any parent/child paths". Below is my docker compose. This was working fine until I tried to remove the Youtube library while it had other items below it. services: Emby: image: "lscr.io/linuxserver/emby:latest" container_name: "Emby" environment: - "PGID=1002" # The UID to run emby as (default: 2) - "PUID=1002" # - "GID=100" # The GID to run emby as (default 2) - "TZ=America/Detroit" volumes: - "/home/myuser/embybackup:/data/backup" - "/mnt/media/CelestialNavigations:/data/CelestialNavigations" - "/mnt/media/Christmas:/data/Christmas" - "/mnt/media/Comedy:/data/Comedy" - "/mnt/media/JackiesMusic:/data/jackiesmusic" - "/mnt/media/Meditation:/data/Meditation" - "/mnt/media/Movies:/data/movies" - "/mnt/media/Music:/data/music" - "/mnt/media/Television:/data/tvshows" - "/mnt/media/Youtube:/data/Youtube" - "/home/myuser/docker/emby/config:/config" ports: - "8096:8096/tcp" restart: "unless-stopped"
Happy2Play 9780 Posted June 7, 2025 Posted June 7, 2025 But as some point you pointed directly to /data correct? 2025-06-06 23:32:22.601 Info App: Creating folder in database data - /data 2025-06-06 23:32:22.602 Info App: Created folder in database data 133162 - /data 2025-06-06 23:32:22.606 Info App: Rebasing 15361 /data/CelestialNavigations to be underneath 133162 /data 2025-06-06 23:32:22.607 Info App: Rebasing 15484 /data/Christmas to be underneath 133162 /data 2025-06-06 23:32:22.608 Info App: Rebasing 15658 /data/Comedy to be underneath 133162 /data 2025-06-06 23:32:22.609 Info App: Rebasing 16030 /data/Meditation to be underneath 133162 /data 2025-06-06 23:32:22.612 Info App: Rebasing 5358 /data/movies to be underneath 133162 /data 2025-06-06 23:32:22.614 Info App: Rebasing 4 /data/music to be underneath 133162 /data 2025-06-06 23:32:22.784 Info App: Rebasing 14138 /data/tvshows to be underneath 133162 /data That would completely mess up the database for every path subfolder shown here. I suspect you will have to remove every library with /data and /data/* to correct the database issue. There are a few topics on this issue. SQLiteException: Constraint: FOREIGN KEY constraint failed
Aldursil 15 Posted June 7, 2025 Author Posted June 7, 2025 (edited) I'm not sure this is the same issue. I point to the same docker volume that is in the compose file as that is how Emby sees the volumes. The only new thing I did was remove the top level Youtube library and left the child libraries and that is what caused the SQLite exception. Otherwise this was having no issues in this regard for years. Edited June 7, 2025 by Aldursil
Happy2Play 9780 Posted June 7, 2025 Posted June 7, 2025 Looks exactly the same to me, parent path was applied then later removed breaking all existing paths with child paths of /data. Line 11649: 2025-06-06 23:32:22.602 Info App: Created folder in database data 133162 - /data Line 11650: 2025-06-06 23:32:22.606 Info App: Rebasing 15361 /data/CelestialNavigations to be underneath 133162 /data Line 11651: 2025-06-06 23:32:22.607 Info App: Rebasing 15484 /data/Christmas to be underneath 133162 /data Line 11652: 2025-06-06 23:32:22.608 Info App: Rebasing 15658 /data/Comedy to be underneath 133162 /data Line 11653: 2025-06-06 23:32:22.609 Info App: Rebasing 16030 /data/Meditation to be underneath 133162 /data Line 11654: 2025-06-06 23:32:22.612 Info App: Rebasing 5358 /data/movies to be underneath 133162 /data Line 11655: 2025-06-06 23:32:22.614 Info App: Rebasing 4 /data/music to be underneath 133162 /data Line 11656: 2025-06-06 23:32:22.784 Info App: Rebasing 14138 /data/tvshows to be underneath 133162 /data Line 12508: 2025-06-06 23:32:27.239 Info App: Removing item from database, Type: Folder, Name: data, Path: /data, Id: 133162 Line 12596: 2025-06-06 23:32:33.252 Info LibraryMonitor: Changing existing watcher from /data/CelestialNavigations to /data for item 133162 @sa2000isn't that the same issue?
Aldursil 15 Posted June 7, 2025 Author Posted June 7, 2025 (edited) I only see two instances of "Error validating children" in my log file when this happened. Is that enough to rebase /data? Never mind. After reading the linked thread it looks like what caused this to happen was me removing the Youtube path. Edited June 7, 2025 by Aldursil
Aldursil 15 Posted June 7, 2025 Author Posted June 7, 2025 Will a restore from backup fix this? I don't want to remove and add back the libraries if I don't have to.
Luke 42077 Posted June 8, 2025 Posted June 8, 2025 On 6/7/2025 at 2:30 PM, Aldursil said: Will a restore from backup fix this? I don't want to remove and add back the libraries if I don't have to. You would need to have a backup from before the sqliteexception started occurring, otherwise you'll just end up bringing back the same problem.
Aldursil 15 Posted June 8, 2025 Author Posted June 8, 2025 1 minute ago, Luke said: You would need to have a backup from before the sqliteexception started occurring, otherwise you'll just end up bringing back the same problem. I do have a backup from about a week ago.
Luke 42077 Posted June 8, 2025 Posted June 8, 2025 34 minutes ago, Aldursil said: I do have a backup from about a week ago. Were the libraries already setup that way though, even in that db?
Aldursil 15 Posted June 8, 2025 Author Posted June 8, 2025 10 minutes ago, Luke said: Were the libraries already setup that way though, even in that db? Only the /data/Youtube library was set up. I had not tried to add any child libraries beneath this. I'll create another volume mapping in Docker for the other library so the content does not get mixed together into one library.
Solution Aldursil 15 Posted June 8, 2025 Author Solution Posted June 8, 2025 I restored from backup and then created the new docker mapping and created the new library and now everything is working again and working as I want with the two new libraries. Thanks for all the feedback. 1
sa2000 674 Posted June 9, 2025 Posted June 9, 2025 (edited) great On 07/06/2025 at 17:25, Happy2Play said: @sa2000isn't that the same issue? yes looks the same The log suggests 2 sets of overlaps - would need to see the library definitions 2025-06-06 23:32:33.252 Info LibraryMonitor: Stopping directory watching for path /data/CelestialNavigations 2025-06-06 23:42:23.467 Info LibraryMonitor: Stopping directory watching for path /data 2025-06-06 23:42:23.480 Info LibraryMonitor: Stopping directory watching for path /data/Christmas 2025-06-06 23:42:23.481 Info LibraryMonitor: Stopping directory watching for path /data/Comedy 2025-06-06 23:42:23.481 Info LibraryMonitor: Stopping directory watching for path /data/jackiesmusic 2025-06-06 23:42:23.481 Info LibraryMonitor: Stopping directory watching for path /data/Meditation 2025-06-06 23:42:23.481 Info LibraryMonitor: Stopping directory watching for path /data/movies 2025-06-06 23:42:23.481 Info LibraryMonitor: Stopping directory watching for path /data/music 2025-06-06 23:42:23.483 Info LibraryMonitor: Stopping directory watching for path /data/tvshows 2025-06-06 23:42:23.483 Info LibraryMonitor: Stopping directory watching for path /data/Youtube 2025-06-06 23:42:23.483 Info LibraryMonitor: Stopping directory watching for path /data/Youtube/VINwiki I see overlaps for "/data" and one further overlap one level down between "/data/Youtube" and "/data/Youtube/VINwiki" This overlapping with all the others 2025-06-06 23:42:23.467 Info LibraryMonitor: Stopping directory watching for path /data and this overlapping with the lower level path 2025-06-06 23:42:23.483 Info LibraryMonitor: Stopping directory watching for path /data/Youtube 2025-06-06 23:42:23.483 Info LibraryMonitor: Stopping directory watching for path /data/Youtube/VINwiki Double check all the libraries folder path and make sure no overlaps of parent / child folders Edited June 9, 2025 by sa2000 1
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