Resets everything to default if container is restarted - Unraid
So as the title implies I can't ever restart my system or shut down the container, unless i'm willing to reintegrate Sonarr and Radarr, make all the filters from scratch and redfine all the presets.
I've had this issue re-occur every time restarted the docker, regardless whether it was to make a config change or just because i needed the gpu for other tasks and needed the container shut down.
Currently happening on the latest master version with nvidia compatibility. Unraid version is 6.12.8
Please let me know if there's any more info you need - I wasn't able to find any log related to the issue, so this is the best I thought i could describe it.
Could you send me the logs from the container, covering a restart (if that's what re-creates the problem) I'm guessing it doesn't have write access to the config
The problem is that /config/appsettings.json does not exist after the docker container starts and initializes.
I fixed it by shelling into the container and copying /app/appsettings.json to /config/appsettings.json
You could just drop https://github.com/OFark/Compressarr/raw/refs/heads/master/Compressarr/appsettings.json into wherever you volume mounted /config/ to
The app is told to save the appsettings.json to the config folder when you save the settings. the one in /app/ is the defaults that are supposed to be overwritten by the ones in /config/
For some reason, in your environment, it is unable to save to the config folder. Now you've copied that file to the /config/ folder is it saving changes?
I did the following:
- Stop container
- Delete all files in config/
- Start container
There are the following files in config now FFmpeg/ffmpeg FFmpeg/ffprobe FFmpeg/version.json mediaInfo.db
- load the web interface and in config add Radarr api
- save
No additional files are created in config
- copy appsettings.json to config
- load the web interface and in config add Radarr api
- save
appsettings.json has been updated with the api key
So is the app now working as you'd expect and has kept the Radarr API key?
Yes if I manually copy the appsettings.json
If I spin one up from scratch with an empty config dir, no.
When trying to save the settings, with no existing appsettings.json, what does it say in the console? It seems like it has update but not create permissions. But as far as I know, that's not a thing. What host are you running this on?
When you try to save and the file does not exist a yellow banner pops on the bottom of the page saying
An error has occurred. This application may no longer respond until reloaded. [Reload]
Here is the log
19:54:34 warn: Compressarr.Application.ApplicationService[0] => SpanId:fac2787790217a5e, TraceId:cea565046afb56481988a02755b7fa73, ParentId:0000000000000000 => ConnectionId:0HNAD6525SVH1 => RequestPath:/_blazor RequestId:0HNAD6525SVH1:00000002 => TransportConnectionId:_5xo8C9MsMhQ7JLm-AE53g => ReadAppSettings File does not exist 19:54:34 fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111] => SpanId:fac2787790217a5e, TraceId:cea565046afb56481988a02755b7fa73, ParentId:0000000000000000 => ConnectionId:0HNAD6525SVH1 => RequestPath:/_blazor RequestId:0HNAD6525SVH1:00000002 => TransportConnectionId:_5xo8C9MsMhQ7JLm-AE53g Unhandled exception in circuit 'lT1D5LzDGD80JLG3oRzMaoqTUBZFSuWZlTb73-kN2EY'. Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Cannot perform runtime binding on a null reference at CallSite.Target(Closure , CallSite , Object , String ) at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1) at Compressarr.Application.ApplicationService.UpdateLogLevel(LogLevel level) in /src/Compressarr/Compressarr/Application/ApplicationService.cs:line 156 at Compressarr.Pages.Options.saveSettings() in /src/Compressarr/Compressarr/Pages/Options.razor:line 245 at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state) at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteSynchronously(TaskCompletionSource`1 completion, SendOrPostCallback d, Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteBackground(WorkItem item)
I tried just touching the json file (empty file) and it can't handle that either.
I tried echo "{}" >config/appsettings.json but that also err's
I am running Ubuntu Noble running latest Docker from docker.com noble repo on a x86_64 Bottom of the compressarr config page says
Application: 1.2.8467.1002
Runtime: 6.0.14
FFmpeg: 6.1
Docker: Yes
OS: Unix 6.8.0.52
OS 64bit: True
App 64bit: True
compressarr.yml (videos_volume is a cifs mount)
services:
compressarr:
image: ofark/compressarr:latest
environment:
- TZ=America/Los_Angeles
- PUID=1001
- PGID=1001
volumes:
- /var/data/config/compressarr/config:/config
- videos_volume:/media
deploy:
replicas: 1
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik_public"
- "traefik.http.routers.compressarr.rule=Host(`compressarr.foo.bar`)"
- "traefik.http.routers.compressarr.entrypoints=https"
- "traefik.http.services.compressarr.loadbalancer.server.port=80"
networks:
- traefik_public
Hmmm. Now I'm just a lowly .net programmer. My Linux skills aren't that sharp, neither are my docker skills. I know enough to get by. But it seems to me if you can't create that file, touch or echo to, then something must be wrong with the mapped path? Can you echo to a new file within the container, i.e. not in the config directory? (Sorry for the delay, Holiday)