spon 26 Posted December 17, 2024 Posted December 17, 2024 Hi everyone. I've been working on moving over to a Docker setup for a few weeks now and have run up against db errors that I haven't been able to figure out. I am new to Linux and Docker but had everything working on on smaller text folders. When I try to add my large folders (I have a LOT of media), I get the DB errors. I stepped back and started to add the HDDs one by one, but anytime I add a second source in my TV library, for example, I get an error, sometimes slightly different. Version 4.8.10.0; Server file attached. I've double checked and I'm 99% sure the folder structure in the Docker compose file is correct and I've verified permissions on all drives, folders and subfolders. Thanks so much for any help! embyserver.txt
Luke 42077 Posted December 18, 2024 Posted December 18, 2024 HI, please take a look at this and let us know if it helps get you squared away: Corrupt Database Thanks.
spon 26 Posted December 18, 2024 Author Posted December 18, 2024 Thanks @LukeI should have mentioned that I went through all of those steps multiple times. I also complete deleted my docker and started fresh, but I keep running into the same issue. One question I have is the instruction to shut down emby, delete certain db related files and then restart emby. In the context of a Docker install, does that mean Stop the docker, delete, then restart the docker? This is the first error in the latest log that I pulled after a fresh DB. info App: Sqlite: 11 - statement aborts at 6: [select Id from UserDataKeys2 where UserDataKey=@UserDataKey limit 1] database disk image is malformed embyserver.txt
Luke 42077 Posted December 18, 2024 Posted December 18, 2024 Quote In the context of a Docker install, does that mean Stop the docker, delete, then restart the docker? Hi, correct, yes. If this keeps happening I would check out the section of the doc that goes over the leading causes of this. Do any of those apply to you?
spon 26 Posted December 18, 2024 Author Posted December 18, 2024 (edited) sorry @Luke, I'm super dense when it comes to Linux and SQL. I've downloaded SQL tools from sqllite.org, but now I"m not sure what to do. There are 4 files (sqldiff, sqlite3,sql_analyzer,sqllite3_rsync) however nothing happens when I click on them. Sorry, I have no idea what I'm doing in Linux. Just to be sure I'm on the same page, the "leading causes" would be something that you can help me find out after I analyze the sql database? I don't see any causes listed on this page at all. https://emby.media/support/articles/Corrupt-Database.html Also, I've followed the steps in "Steps to Reset Library Database & Load Fresh" and the same errors continue to occur. Final clue - when I stop the docker container, then delete library.db-shm & library.db-wal, then restart the docker container, Emby is completely inaccessible. The only way I can get access again is to reboot the machine entirely. Edited December 18, 2024 by spon
spon 26 Posted December 18, 2024 Author Posted December 18, 2024 (edited) I've completely started over in an attempt to troubleshoot this. My family is about ready to kick me out of the house at this point. lol. I've attached my simple compose file for reference. The file path's should be fine, as I've test them multiple times, but who knows. I'm running all media on an 8 bay external drive bay connected via USB3. I only have 2 drives plugged in right now. I've verified that the folder permissions are correctly assigned to my user (1000:1000). I've also double checked and there was no Emby folder at all before doing this test - completely fresh. I loaded up the docker compose file no problem. Emby starts up with the normal quick start guide. I create a user and then add one HDD (containing TV series) using the correct path to the library. I then sign into the server and I can see Emby scanning the library. The scan runs and the result is all of the folders but no actual media files at all. Multiple errors in the log file. Sorry for the multiple self-replies. I'm just running out of ideas. Thanks again. COMPOSE FILE: services: # image used to manage media and stream it emby: image: linuxserver/emby:latest container_name: arr-suite-emby network_mode: host # enable DLNA and Wake-on-lan environment: - PUID=1000 - PGID=1000 - GIDLIST=44,492 - TZ=America/Los_Angeles volumes: - /MSMedia/arr-suite/configs/emby:/config # location of database and configs - /MSMedia/arr-suite/data/media:/data/media # location of media library expose: - 8096/tcp # http web ui - 8920/tcp # https web ui ports: - 8096:8096/tcp # http web ui devices: - /dev/dri:/dev/dri #optional # - /dev/vchiq:/dev/vchiq #optional # - /dev/video10:/dev/video10 #optional # - /dev/video11:/dev/video11 #optional # - /dev/video12:/dev/video12 #optional restart: unless-stopped embyserver(1).txt Edited December 18, 2024 by spon
Solution spon 26 Posted December 18, 2024 Author Solution Posted December 18, 2024 In case anyone runs across this, the solution was simply a hardware issue. Turns out the Mediasonic ProBox I’ve had for years does not support Linux. Sorry to waste your time on this one @Luke!
Q-Droid 989 Posted December 18, 2024 Posted December 18, 2024 (edited) 6 hours ago, spon said: volumes: - /MSMedia/arr-suite/configs/emby:/config # location of database and configs Don't run Emby with data, config and cache on network/external storage. Edited December 18, 2024 by Q-Droid 1
spon 26 Posted December 18, 2024 Author Posted December 18, 2024 3 hours ago, Q-Droid said: Don't run Emby with data, config and cache on network/external storage. @Q-Droid does that still hold true if the external storage is a nmve drive? I get super fast read/write via usb3.2.
Q-Droid 989 Posted December 18, 2024 Posted December 18, 2024 Yes. Speed is only one factor and not one that would cause DB errors. The filesystem type is the most likely cause of the errors you're getting. The full and more detailed explanation is if you're running Emby on Linux or UNIX(-like) OS then make sure the data, config and cache paths are on a POSIX compliant filesystem that is provisioned through a block storage protocol. So to avoid problems with the databases you want Emby using a native Linux/UNIX file system mounted from a local block device (this can work with USB). There's more flexibility with media and external/remote storage is less of a problem. The cache location is more of a speed concern than data integrity.
spon 26 Posted December 18, 2024 Author Posted December 18, 2024 @Q-Droidthank you very much! I'll switch it over to the internal storage drive on my miniPC. I've also got a new external enclosure on order for the media that is compatible with Linux.
spon 26 Posted December 18, 2024 Author Posted December 18, 2024 @Q-Droidthank you! This fixed all of my problems, even with an external enclosure that supposedly does not support Linux. Everything working great now. Thanks again. 1 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