studzik5521 3 Posted September 4, 2024 Posted September 4, 2024 Hey, I'm having trouble setting up Emby with /config on a CIFS volume hosted on TrueNAS. It's showing me a locked database error, but other files are being created normally. log: emby | Info SqliteUserRepository: Opening sqlite connection to /config/data/users.db emby | Info SqliteUserRepository: Default journal_mode for /config/data/users.db is delete emby | Info SqliteUserRepository: PRAGMA foreign_keys=1 emby | Info SqliteUserRepository: Result of setting SQLITE_DBCONFIG_DQS_DDL to 0 is 0 emby | Info SqliteUserRepository: Result of setting SQLITE_DBCONFIG_DQS_DML to 0 is 0 emby | Error Main: Error in appHost.Init emby | *** Error Report *** emby | Version: 4.8.8.0 emby | Command line: /app/emby/system/EmbyServer.dll -programdata /config -ffdetect /app/emby/bin/ffdetect -ffmpeg /app/emby/bin/ffmpeg -ffprobe /app/emby/bin/ffprobe -restartexitcode 3 emby | Operating system: Linux version 6.8.12-1-pve (build@proxmox) (gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-1 emby | Framework: .NET 6.0.25 emby | OS/Process: x64/x64 emby | Runtime: app/emby/system/System.Private.CoreLib.dll emby | Processor count: 14 emby | Data path: /config emby | Application path: /app/emby/system emby | SQLitePCL.pretty.SQLiteException: Busy: database is locked emby | SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown. emby | at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc) emby | at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3_stmt stmt, Int32 rc) emby | at SQLitePCL.pretty.StatementImpl.MoveNext() emby | at SQLitePCL.pretty.DatabaseConnection.ExecuteAll(IDatabaseConnection This, String sql) emby | at Emby.Sqlite.BaseSqliteRepository.RunDefaultInitialization(IDatabaseConnection db) emby | at Emby.Server.Implementations.Data.SqliteUserRepository.Initialize() emby | at Emby.Server.Implementations.ApplicationHost.GetUserRepository() emby | at Emby.Server.Implementations.ApplicationHost.RegisterResources() emby | at Emby.Server.Implementations.ApplicationHost.Init() emby | at EmbyServer.HostedService.StartAsync(CancellationToken cancellationToken) emby | Source: SQLitePCL.pretty emby | TargetSite: Void CheckOk(SQLitePCLEx.sqlite3, Int32) emby | emby | Info Main: Shutdown complete emby | Info Main: Application path: /app/emby/system/EmbyServer.dll docker compose: services: emby: image: lscr.io/linuxserver/emby:latest # image: emby/embyserver:latest container_name: emby environment: - PUID=1000 # - PUID=568 - PGID=1000 # - PGID=568 - TZ=Etc/UTC volumes: # - /opt/emby/config:/config - truenas_movies:/Filmy - truenas_series:/Seriale - truenas_emby:/config ports: - 8096:8096 - 8920:8920 #optional devices: # - /dev/dri:/dev/dri #optional - /dev/nvidia0:/dev/nvidia0 #optional - /dev/nvidiactl:/dev/nvidiactl #optional - /dev/nvidia-uvm:/dev/nvidia-uvm #optional - /dev/nvidia-uvm-tools:/dev/nvidia-uvm-tools #optional deploy: resources: reservations: devices: - driver: nvidia count: 1 capabilities: [gpu] restart: unless-stopped volumes: truenas_series: driver: local driver_opts: type: cifs device: "//192.168.1.242/Media/Filmy" o: "username=dockerapps,password=12345678,uid=1000,gid=1000" truenas_movies: driver: local driver_opts: type: cifs device: "//192.168.1.242/Media/Seriale" o: "username=dockerapps,password=12345678,uid=1000,gid=1000" truenas_emby: driver: local driver_opts: type: cifs device: "//192.168.1.242/DockerAppsCfg/emby" o: "username=dockerapps,password=12345678,vers=3,sec=ntlmsspi,file_mode=0777,dir_mode=0777"
studzik5521 3 Posted September 4, 2024 Author Posted September 4, 2024 on emby/embyserver:latest image emby | Error GlobalExceptionHandler: UnhandledException emby | System.AggregateException: System.AggregateException: One or more errors occurred. (Access to the path '/config/logs' is denied.) emby | ---> System.UnauthorizedAccessException: Access to the path '/config/logs' is denied. emby | ---> System.IO.IOException: Permission denied emby | --- End of inner exception stack trace --- emby | at System.IO.FileSystem.CreateDirectory(String fullPath) emby | at System.IO.Directory.CreateDirectory(String path) emby | at Emby.Server.Implementations.Logging.FileLogger..ctor(String path) emby | at Emby.Server.Implementations.Logging.SimpleLogManager.ReloadLogger(LogSeverity severity, CancellationToken cancellationToken) emby | --- End of inner exception stack trace --- emby | at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) emby | at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) emby | at System.Threading.Tasks.Task.Wait() emby | at EmbyServer.Program.Main(String[] args) emby | Source: System.Private.CoreLib emby | TargetSite: Void ThrowIfExceptional(Boolean) emby | InnerException: System.UnauthorizedAccessException: Access to the path '/config/logs' is denied. emby | Source: System.Private.CoreLib emby | TargetSite: Void CreateDirectory(System.String) emby | at System.IO.FileSystem.CreateDirectory(String fullPath) emby | at System.IO.Directory.CreateDirectory(String path) emby | at Emby.Server.Implementations.Logging.FileLogger..ctor(String path) emby | at Emby.Server.Implementations.Logging.SimpleLogManager.ReloadLogger(LogSeverity severity, CancellationToken cancellationToken) emby | InnerException: System.IO.IOException: Permission denied emby | Source: emby | TargetSite: emby | emby | UnhandledException emby | System.AggregateException: System.AggregateException: One or more errors occurred. (Access to the path '/config/logs' is denied.) emby | ---> System.UnauthorizedAccessException: Access to the path '/config/logs' is denied. emby | ---> System.IO.IOException: Permission denied emby | --- End of inner exception stack trace --- emby | at System.IO.FileSystem.CreateDirectory(String fullPath) emby | at System.IO.Directory.CreateDirectory(String path) emby | at Emby.Server.Implementations.Logging.FileLogger..ctor(String path) emby | at Emby.Server.Implementations.Logging.SimpleLogManager.ReloadLogger(LogSeverity severity, CancellationToken cancellationToken) emby | --- End of inner exception stack trace --- emby | at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) emby | at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) emby | at System.Threading.Tasks.Task.Wait() emby | at EmbyServer.Program.Main(String[] args) emby | Source: System.Private.CoreLib emby | TargetSite: Void ThrowIfExceptional(Boolean) emby | InnerException: System.UnauthorizedAccessException: Access to the path '/config/logs' is denied. emby | Source: System.Private.CoreLib emby | TargetSite: Void CreateDirectory(System.String) emby | at System.IO.FileSystem.CreateDirectory(String fullPath) emby | at System.IO.Directory.CreateDirectory(String path) emby | at Emby.Server.Implementations.Logging.FileLogger..ctor(String path) emby | at Emby.Server.Implementations.Logging.SimpleLogManager.ReloadLogger(LogSeverity severity, CancellationToken cancellationToken) emby | InnerException: System.IO.IOException: Permission denied emby | Source: emby | TargetSite: emby | emby | emby | [cont-finish.d] executing container finish scripts... emby | [cont-finish.d] done. emby | [s6-finish] waiting for services. emby | [s6-finish] sending all processes the TERM signal. emby | [s6-finish] sending all processes the KILL signal and exiting.
studzik5521 3 Posted September 4, 2024 Author Posted September 4, 2024 1 hour ago, studzik5521 said: on emby/embyserver:latest image emby | Error GlobalExceptionHandler: UnhandledException emby | System.AggregateException: System.AggregateException: One or more errors occurred. (Access to the path '/config/logs' is denied.) emby | ---> System.UnauthorizedAccessException: Access to the path '/config/logs' is denied. emby | ---> System.IO.IOException: Permission denied emby | --- End of inner exception stack trace --- emby | at System.IO.FileSystem.CreateDirectory(String fullPath) emby | at System.IO.Directory.CreateDirectory(String path) emby | at Emby.Server.Implementations.Logging.FileLogger..ctor(String path) emby | at Emby.Server.Implementations.Logging.SimpleLogManager.ReloadLogger(LogSeverity severity, CancellationToken cancellationToken) emby | --- End of inner exception stack trace --- emby | at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) emby | at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) emby | at System.Threading.Tasks.Task.Wait() emby | at EmbyServer.Program.Main(String[] args) emby | Source: System.Private.CoreLib emby | TargetSite: Void ThrowIfExceptional(Boolean) emby | InnerException: System.UnauthorizedAccessException: Access to the path '/config/logs' is denied. emby | Source: System.Private.CoreLib emby | TargetSite: Void CreateDirectory(System.String) emby | at System.IO.FileSystem.CreateDirectory(String fullPath) emby | at System.IO.Directory.CreateDirectory(String path) emby | at Emby.Server.Implementations.Logging.FileLogger..ctor(String path) emby | at Emby.Server.Implementations.Logging.SimpleLogManager.ReloadLogger(LogSeverity severity, CancellationToken cancellationToken) emby | InnerException: System.IO.IOException: Permission denied emby | Source: emby | TargetSite: emby | emby | UnhandledException emby | System.AggregateException: System.AggregateException: One or more errors occurred. (Access to the path '/config/logs' is denied.) emby | ---> System.UnauthorizedAccessException: Access to the path '/config/logs' is denied. emby | ---> System.IO.IOException: Permission denied emby | --- End of inner exception stack trace --- emby | at System.IO.FileSystem.CreateDirectory(String fullPath) emby | at System.IO.Directory.CreateDirectory(String path) emby | at Emby.Server.Implementations.Logging.FileLogger..ctor(String path) emby | at Emby.Server.Implementations.Logging.SimpleLogManager.ReloadLogger(LogSeverity severity, CancellationToken cancellationToken) emby | --- End of inner exception stack trace --- emby | at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) emby | at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) emby | at System.Threading.Tasks.Task.Wait() emby | at EmbyServer.Program.Main(String[] args) emby | Source: System.Private.CoreLib emby | TargetSite: Void ThrowIfExceptional(Boolean) emby | InnerException: System.UnauthorizedAccessException: Access to the path '/config/logs' is denied. emby | Source: System.Private.CoreLib emby | TargetSite: Void CreateDirectory(System.String) emby | at System.IO.FileSystem.CreateDirectory(String fullPath) emby | at System.IO.Directory.CreateDirectory(String path) emby | at Emby.Server.Implementations.Logging.FileLogger..ctor(String path) emby | at Emby.Server.Implementations.Logging.SimpleLogManager.ReloadLogger(LogSeverity severity, CancellationToken cancellationToken) emby | InnerException: System.IO.IOException: Permission denied emby | Source: emby | TargetSite: emby | emby | emby | [cont-finish.d] executing container finish scripts... emby | [cont-finish.d] done. emby | [s6-finish] waiting for services. emby | [s6-finish] sending all processes the TERM signal. emby | [s6-finish] sending all processes the KILL signal and exiting. "I fixed the permissions on the official image, and I'm having the same problem as with 'lscr.io/linuxserver'." emby | Info SqliteUserRepository: Sqlite version: 3.42.0 emby | Info SqliteUserRepository: Sqlite compiler options: ATOMIC_INTRINSICS=1,COMPILER=gcc-10.3.0,DEFAULT_AUTOVACUUM,DEFAULT_CACHE_SIZE=-2000,DEFAULT_FILE_FORMAT=4,DEFAULT_JOURNAL_SIZE_LIMIT=-1,DEFAULT_MMAP_SIZE=0,DEFAULT_PAGE_SIZE=4096,DEFAULT_PCACHE_INITSZ=20,DEFAULT_RECURSIVE_TRIGGERS,DEFAULT_SECTOR_SIZE=4096,DEFAULT_SYNCHRONOUS=2,DEFAULT_WAL_AUTOCHECKPOINT=1000,DEFAULT_WAL_SYNCHRONOUS=2,DEFAULT_WORKER_THREADS=0,ENABLE_COLUMN_METADATA,ENABLE_DBSTAT_VTAB,ENABLE_FTS3,ENABLE_FTS3_PARENTHESIS,ENABLE_FTS3_TOKENIZER,ENABLE_FTS4,ENABLE_FTS5,ENABLE_GEOPOLY,ENABLE_MATH_FUNCTIONS,ENABLE_PREUPDATE_HOOK,ENABLE_RTREE,ENABLE_SESSION,ENABLE_UNLOCK_NOTIFY,ENABLE_UPDATE_DELETE_LIMIT,LIKE_DOESNT_MATCH_BLOBS,MALLOC_SOFT_LIMIT=1024,MAX_ATTACHED=10,MAX_COLUMN=2000,MAX_COMPOUND_SELECT=500,MAX_DEFAULT_PAGE_SIZE=8192,MAX_EXPR_DEPTH=1000,MAX_FUNCTION_ARG=127,MAX_LENGTH=1000000000,MAX_LIKE_PATTERN_LENGTH=50000,MAX_MMAP_SIZE=0x7fff0000,MAX_PAGE_COUNT=1073741823,MAX_PAGE_SIZE=65536,MAX_SCHEMA_RETRY=25,MAX_SQL_LENGTH=1000000000,MAX_TRIGGER_DEPTH=1000,MAX_VARIABLE_NUMBER=250000,MAX_VDBE_OP=250000000,MAX_WORKER_THREADS=8,MUTEX_PTHREADS,OMIT_LOOKASIDE,SECURE_DELETE,SYSTEM_MALLOC,TEMP_STORE=1,THREADSAFE=1 emby | Info SqliteUserRepository: Opening sqlite connection to /config/data/users.db emby | Info SqliteUserRepository: Default journal_mode for /config/data/users.db is delete emby | Info SqliteUserRepository: PRAGMA foreign_keys=1 emby | Info SqliteUserRepository: Result of setting SQLITE_DBCONFIG_DQS_DDL to 0 is 0 emby | Info SqliteUserRepository: Result of setting SQLITE_DBCONFIG_DQS_DML to 0 is 0 emby | Error Main: Error in appHost.Init emby | *** Error Report *** emby | Version: 4.8.8.0 emby | Command line: /system/EmbyServer.dll -programdata /config -ffdetect /bin/ffdetect -ffmpeg /bin/ffmpeg -ffprobe /bin/ffprobe -restartexitcode 3 emby | Operating system: Linux version 6.8.12-1-pve (build@proxmox) (gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-1 emby | Framework: .NET 6.0.25 emby | OS/Process: x64/x64 emby | Runtime: system/System.Private.CoreLib.dll emby | Processor count: 14 emby | Data path: /config emby | Application path: /system emby | SQLitePCL.pretty.SQLiteException: Busy: database is locked emby | SQLitePCL.pretty.SQLiteException: Exception of type 'SQLitePCL.pretty.SQLiteException' was thrown. emby | at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3 db, Int32 rc) emby | at SQLitePCL.pretty.SQLiteException.CheckOk(sqlite3_stmt stmt, Int32 rc) emby | at SQLitePCL.pretty.StatementImpl.MoveNext() emby | at SQLitePCL.pretty.DatabaseConnection.ExecuteAll(IDatabaseConnection This, String sql) emby | at Emby.Sqlite.BaseSqliteRepository.RunDefaultInitialization(IDatabaseConnection db) emby | at Emby.Server.Implementations.Data.SqliteUserRepository.Initialize() emby | at Emby.Server.Implementations.ApplicationHost.GetUserRepository() emby | at Emby.Server.Implementations.ApplicationHost.RegisterResources() emby | at Emby.Server.Implementations.ApplicationHost.Init() emby | at EmbyServer.HostedService.StartAsync(CancellationToken cancellationToken) emby | Source: SQLitePCL.pretty emby | TargetSite: Void CheckOk(SQLitePCLEx.sqlite3, Int32) emby | emby | Info Main: Shutdown complete emby | [cont-finish.d] executing container finish scripts... emby | [cont-finish.d] done. emby | [s6-finish] waiting for services. emby | [s6-finish] sending all processes the TERM signal.
Happy2Play 9780 Posted September 4, 2024 Posted September 4, 2024 Have you tried the Locked db section from the KB? https://emby.media/support/articles/Corrupt-Database.html
studzik5521 3 Posted September 4, 2024 Author Posted September 4, 2024 2 hours ago, Happy2Play said: Have you tried the Locked db section from the KB? https://emby.media/support/articles/Corrupt-Database.html Yes, I tried that. In the meantime, I discovered that the problem is with SQLite in other services as well. 2 hours ago, Luke said: I would also try rebooting the machine. It didn't work Now I'm trying to do it with NFS because I read somewhere that SMB/CIFS locks files.
adminExitium 355 Posted September 4, 2024 Posted September 4, 2024 SQLite over a network share is never going to work. Even if it seems like its working, it will eventually fail. From: https://sqlite.org/wal.html Quote All processes using a database must be on the same host computer; WAL does not work over a network filesystem. This is because WAL requires all processes to share a small amount of memory and processes on separate host machines obviously cannot share memory with each other. From https://sqlite.org/useovernet.html Quote However, the SQLite library is not tested in across-a-network scenarios, nor is that reasonably possible. Hence, use of a remote database is done at the user's risk. 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