Compressarr
Compressarr copied to clipboard
Docker config not saved
Seems something is wrong in docker and the appsettings are not correctly saved in /config
which means losing the config when restarting the container.
The only thing I'm seeing in my /config
is mediaInfo.db*
which lead me to believe something is wrong here when calculating the config path to use: https://github.com/OFark/Compressarr/blob/e165780c1f37fc74e190d0ff9763e15be40d1776/Compressarr/Application/FileService.cs#L80
I'm using the nvidia image. Here are the env in the container:
root@b734ddc424f1:/app# echo $NVIDIA_DRIVER_CAPABILITIES
compute,utility,video
root@b734ddc424f1:/app# echo $DOTNET_RUNNING_IN_CONTAINER
true
root@b734ddc424f1:/app#
I'm wondering if the app has write permissions to the folder. Can you send me the logs from the container?
I thought so too and chmod 777 just to be sure but to no avail. Also I'm assuming if write was not possible then mediaInfo.db
wouldn't be there either.
Here are the container logs truncated with just the initial ones:
2024-03-05T22:00:59.249309022Z 22:00:59 warn: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[60]
2024-03-05T22:00:59.249343643Z Storing keys in a directory '/root/.aspnet/DataProtection-Keys' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed.
2024-03-05T22:00:59.322607639Z 22:00:59 warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35]
2024-03-05T22:00:59.322632289Z No XML encryptor configured. Key {646c8b8d-22cf-4a3d-abaa-f9c8647d7042} may be persisted to storage in unencrypted form.
2024-03-05T22:00:59.333585455Z 22:00:59 info: Compressarr.Initialisation.StartupBackgroundService[0]
2024-03-05T22:00:59.333595275Z StartupBackgroundService is running.
2024-03-05T22:00:59.334238646Z 22:00:59 info: Compressarr.Initialisation.StartupBackgroundService[0]
2024-03-05T22:00:59.334243466Z StartupBackgroundService is working.
2024-03-05T22:00:59.433018840Z 22:00:59 dbug: Compressarr.FFmpeg.FFmpegProcessor[0]
2024-03-05T22:00:59.433029480Z => Initialising Application => Initialising FFmpeg => Get FFmpeg Version. => Get FFmpeg Version.
2024-03-05T22:00:59.433032720Z Version file missing. Trying manually
2024-03-05T22:00:59.438977843Z 22:00:59 dbug: Compressarr.FFmpeg.FFmpegProcessor[0]
2024-03-05T22:00:59.438983893Z => Initialising Application => Initialising FFmpeg => Get FFmpeg Version. => Get FFmpeg Version. => Run Process: /usr/local/bin/ffmpeg
2024-03-05T22:00:59.438987333Z Starting process: /usr/local/bin/ffmpeg -version
2024-03-05T22:00:59.464767609Z 22:00:59 info: Microsoft.Hosting.Lifetime[14]
2024-03-05T22:00:59.464777780Z Now listening on: http://[::]:80
2024-03-05T22:00:59.464780420Z 22:00:59 info: Microsoft.Hosting.Lifetime[0]
2024-03-05T22:00:59.464782420Z Application started. Press Ctrl+C to shut down.
2024-03-05T22:00:59.464813951Z 22:00:59 info: Microsoft.Hosting.Lifetime[0]
2024-03-05T22:00:59.464821671Z Hosting environment: Production
2024-03-05T22:00:59.464824431Z 22:00:59 info: Microsoft.Hosting.Lifetime[0]
2024-03-05T22:00:59.464826671Z Content root path: /app/
2024-03-05T22:00:59.470542247Z 22:00:59 info: Compressarr.Application.ApplicationInitialiser[0]
2024-03-05T22:00:59.470554857Z => Initialising Application => Initialising FFmpeg
2024-03-05T22:00:59.470557567Z Nvidia Docker, download not required. Existing Version: N-101934-g7e241a1
2024-03-05T22:00:59.470657170Z 22:00:59 dbug: Compressarr.Application.ApplicationInitialiser[0]
2024-03-05T22:00:59.470683241Z => Initialising Application => Initialising FFmpeg
2024-03-05T22:00:59.470687011Z Get available codecs.
2024-03-05T22:00:59.472606103Z 22:00:59 dbug: Compressarr.FFmpeg.FFmpegProcessor[0]
2024-03-05T22:00:59.472612924Z => Initialising Application => Initialising FFmpeg => Get Available Codecs => Run Process: /usr/local/bin/ffmpeg
2024-03-05T22:00:59.472621494Z Starting process: /usr/local/bin/ffmpeg -codecs -v 1
2024-03-05T22:00:59.499776265Z 22:00:59 info: Compressarr.Application.ApplicationInitialiser[0]
2024-03-05T22:00:59.499797225Z => Initialising Application => Initialising FFmpeg
2024-03-05T22:00:59.499803265Z Codecs loaded: 478
2024-03-05T22:00:59.499807646Z 22:00:59 dbug: Compressarr.Application.ApplicationInitialiser[0]
2024-03-05T22:00:59.499811956Z => Initialising Application => Initialising FFmpeg
2024-03-05T22:00:59.499816476Z Get available formats.
2024-03-05T22:00:59.500373134Z 22:00:59 dbug: Compressarr.FFmpeg.FFmpegProcessor[0]
2024-03-05T22:00:59.500382114Z => Initialising Application => Initialising FFmpeg => Get Available Formats => Run Process: /usr/local/bin/ffmpeg
2024-03-05T22:00:59.500385114Z Starting process: /usr/local/bin/ffmpeg -formats -v 1
2024-03-05T22:00:59.528580849Z 22:00:59 info: Compressarr.Application.ApplicationInitialiser[0]
2024-03-05T22:00:59.528612250Z => Initialising Application => Initialising FFmpeg
2024-03-05T22:00:59.528616120Z Containers loaded: 381
2024-03-05T22:00:59.528631730Z 22:00:59 dbug: Compressarr.Application.ApplicationInitialiser[0]
2024-03-05T22:00:59.528639631Z => Initialising Application => Initialising FFmpeg
2024-03-05T22:00:59.528642301Z Get available hardware decoders.
2024-03-05T22:00:59.530835192Z 22:00:59 dbug: Compressarr.FFmpeg.FFmpegProcessor[0]
2024-03-05T22:00:59.530845242Z => Initialising Application => Initialising FFmpeg => Get available hardware decoders => Run Process: /usr/local/bin/ffmpeg
2024-03-05T22:00:59.530848492Z Starting process: /usr/local/bin/ffmpeg -hwaccels -v 1
2024-03-05T22:00:59.546329154Z 22:00:59 info: Compressarr.Application.ApplicationInitialiser[0]
2024-03-05T22:00:59.546340985Z => Initialising Application => Initialising FFmpeg
2024-03-05T22:00:59.546343685Z Hardware decoders loaded: 1
2024-03-05T22:00:59.546345795Z 22:00:59 dbug: Compressarr.Application.ApplicationInitialiser[0]
2024-03-05T22:00:59.546347795Z => Initialising Application => Initialising FFmpeg
2024-03-05T22:00:59.546349845Z Get available encoders.
2024-03-05T22:00:59.548600818Z 22:00:59 dbug: Compressarr.FFmpeg.FFmpegProcessor[0]
2024-03-05T22:00:59.548613118Z => Initialising Application => Initialising FFmpeg => Get Available Encoders => Run Process: /usr/local/bin/ffmpeg
2024-03-05T22:00:59.548616129Z Starting process: /usr/local/bin/ffmpeg -encoders -v 1
2024-03-05T22:00:59.571312505Z 22:00:59 info: Compressarr.Application.ApplicationInitialiser[0]
2024-03-05T22:00:59.571331725Z => Initialising Application => Initialising FFmpeg
2024-03-05T22:00:59.571343466Z Encoders loaded: 111
2024-03-05T22:00:59.571345676Z 22:00:59 dbug: Compressarr.Application.ApplicationInitialiser[0]
2024-03-05T22:00:59.571347836Z => Initialising Application => Initialising FFmpeg
2024-03-05T22:00:59.571350056Z Get FFmpeg demuxer extensions.
2024-03-05T22:00:59.579459729Z 22:00:59 dbug: Compressarr.FFmpeg.FFmpegProcessor[0]
2024-03-05T22:00:59.579472689Z => Initialising Application => Initialising FFmpeg => Get FFmpeg Extensions => Run Process: /usr/local/bin/ffmpeg
2024-03-05T22:00:59.579476019Z Starting process: /usr/local/bin/ffmpeg -v 1 -h demuxer=3dostr
2024-03-05T22:00:59.579478480Z 22:00:59 dbug: Compressarr.FFmpeg.FFmpegProcessor[0]
Do the logs say anything when you save some settings? Is there a config file created, but then lost later? Can you set the log level to debug, then try changing setting and then send me the logs?
Config is never set/created in /config
at all. I'm getting the following error when saving:
An error has occurred. This application may no longer respond until reloaded. [Reload](http://192.168.2.253:8880/)
but refreshing the page shows the settings was applied correctly and is there until I restart the container.
Logs on setting save:
2024-03-06T17:18:37.083739630Z 17:18:37 warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware[3]
2024-03-06T17:18:37.083795162Z => SpanId:4a2d494dce854cab, TraceId:0b1777c0a8e103b10c5fb01ad6b0e36c, ParentId:0000000000000000 => ConnectionId:0HN1U05QINEBG => RequestPath:/ RequestId:0HN1U05QINEBG:00000002
2024-03-06T17:18:37.083803062Z Failed to determine the https port for redirect.
2024-03-06T17:18:39.513867802Z 17:18:39 dbug: Compressarr.Services.RadarrService[0]
2024-03-06T17:18:39.513902583Z => SpanId:f759950ae2c2a9c9, TraceId:9e82ae0fa65d11567e98bd3dd185a09f, ParentId:0000000000000000 => ConnectionId:0HN1U05QINEBL => RequestPath:/_blazor RequestId:0HN1U05QINEBL:00000002 => TransportConnectionId:Z8uFRCeF2kkeDXMBwyUCzw => Test Connection
2024-03-06T17:18:39.513909083Z Test aborted, due to insufficient settings
2024-03-06T17:18:39.589481256Z 17:18:39 dbug: Compressarr.Services.SonarrService[0]
2024-03-06T17:18:39.589513127Z => SpanId:f759950ae2c2a9c9, TraceId:9e82ae0fa65d11567e98bd3dd185a09f, ParentId:0000000000000000 => ConnectionId:0HN1U05QINEBL => RequestPath:/_blazor RequestId:0HN1U05QINEBL:00000002 => TransportConnectionId:Z8uFRCeF2kkeDXMBwyUCzw => Test Connection
2024-03-06T17:18:39.589520387Z Test aborted, due to insufficient settings
2024-03-06T17:18:49.671731483Z 17:18:49 info: Compressarr.Presets.PresetManager[0]
2024-03-06T17:18:49.671779484Z => SpanId:f759950ae2c2a9c9, TraceId:9e82ae0fa65d11567e98bd3dd185a09f, ParentId:0000000000000000 => ConnectionId:0HN1U05QINEBL => RequestPath:/_blazor RequestId:0HN1U05QINEBL:00000002 => TransportConnectionId:Z8uFRCeF2kkeDXMBwyUCzw => Adding Preset
2024-03-06T17:18:49.671801695Z Preset Name: test
2024-03-06T17:18:49.671806675Z 17:18:49 dbug: Compressarr.Presets.PresetManager[0]
2024-03-06T17:18:49.671811856Z => SpanId:f759950ae2c2a9c9, TraceId:9e82ae0fa65d11567e98bd3dd185a09f, ParentId:0000000000000000 => ConnectionId:0HN1U05QINEBL => RequestPath:/_blazor RequestId:0HN1U05QINEBL:00000002 => TransportConnectionId:Z8uFRCeF2kkeDXMBwyUCzw => Adding Preset
2024-03-06T17:18:49.671821216Z Adding a new preset.
2024-03-06T17:18:49.675704839Z 17:18:49 warn: Compressarr.Application.ApplicationService[0]
2024-03-06T17:18:49.675737370Z => SpanId:f759950ae2c2a9c9, TraceId:9e82ae0fa65d11567e98bd3dd185a09f, ParentId:0000000000000000 => ConnectionId:0HN1U05QINEBL => RequestPath:/_blazor RequestId:0HN1U05QINEBL:00000002 => TransportConnectionId:Z8uFRCeF2kkeDXMBwyUCzw => Adding Preset => ReadAppSettings
2024-03-06T17:18:49.675741230Z File does not exist
2024-03-06T17:18:49.739786836Z 17:18:49 fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
2024-03-06T17:18:49.739799027Z => SpanId:f759950ae2c2a9c9, TraceId:9e82ae0fa65d11567e98bd3dd185a09f, ParentId:0000000000000000 => ConnectionId:0HN1U05QINEBL => RequestPath:/_blazor RequestId:0HN1U05QINEBL:00000002 => TransportConnectionId:Z8uFRCeF2kkeDXMBwyUCzw
2024-03-06T17:18:49.739802577Z Unhandled exception in circuit '1qR9smYwaP9Jv6naTp0aH2tQT1VyNeuFT6VSy8-F7sw'.
2024-03-06T17:18:49.739804727Z Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Cannot perform runtime binding on a null reference
2024-03-06T17:18:49.739806887Z at CallSite.Target(Closure , CallSite , Object , String , JToken )
2024-03-06T17:18:49.739808887Z at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)
2024-03-06T17:18:49.739811077Z at Compressarr.Application.ApplicationService.SaveAppSetting() in /src/Compressarr/Compressarr/Application/ApplicationService.cs:line 139
2024-03-06T17:18:49.739813497Z at Compressarr.Presets.PresetManager.AddPresetAsync(FFmpegPreset newPreset) in /src/Compressarr/Compressarr/Presets/PresetManager.cs:line 618
2024-03-06T17:18:49.739815677Z at Compressarr.Shared.PresetView.SavePreset() in /src/Compressarr/Compressarr/Shared/PresetView.razor.cs:line 98
2024-03-06T17:18:49.739818127Z at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
2024-03-06T17:18:49.739820498Z at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteSynchronously(TaskCompletionSource`1 completion, SendOrPostCallback d, Object state)
2024-03-06T17:18:49.739822658Z at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
2024-03-06T17:18:49.739824738Z --- End of stack trace from previous location ---
2024-03-06T17:18:49.739826728Z at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteBackground(WorkItem item)
2024-03-06T17:21:25.330983872Z 17:21:25 dbug: Compressarr.Services.RadarrService[0]
2024-03-06T17:21:25.331048574Z => SpanId:47a8f88042714aa9, TraceId:f87a923c4b60fb318bec107233cdcd97, ParentId:0000000000000000 => ConnectionId:0HN1U05QINEBM => RequestPath:/options RequestId:0HN1U05QINEBM:00000002 => /_Host => Test Connection
2024-03-06T17:21:25.331054834Z Test aborted, due to insufficient settings
2024-03-06T17:21:25.331058244Z 17:21:25 dbug: Compressarr.Services.SonarrService[0]
2024-03-06T17:21:25.331061274Z => SpanId:47a8f88042714aa9, TraceId:f87a923c4b60fb318bec107233cdcd97, ParentId:0000000000000000 => ConnectionId:0HN1U05QINEBM => RequestPath:/options RequestId:0HN1U05QINEBM:00000002 => /_Host => Test Connection
2024-03-06T17:21:25.331064414Z Test aborted, due to insufficient settings
2024-03-06T17:21:25.469429151Z 17:21:25 dbug: Compressarr.Services.RadarrService[0]
2024-03-06T17:21:25.469463373Z => SpanId:ab50e4d36e4b284f, TraceId:8ef49718a61baa1a5f9a45c4ad4469c2, ParentId:0000000000000000 => ConnectionId:0HN1U05QINEBS => RequestPath:/_blazor RequestId:0HN1U05QINEBS:00000002 => TransportConnectionId:BYTp331lV_I7_pgrYmEN1A => Test Connection
2024-03-06T17:21:25.469467703Z Test aborted, due to insufficient settings
2024-03-06T17:21:25.469470263Z 17:21:25 dbug: Compressarr.Services.SonarrService[0]
2024-03-06T17:21:25.469472703Z => SpanId:ab50e4d36e4b284f, TraceId:8ef49718a61baa1a5f9a45c4ad4469c2, ParentId:0000000000000000 => ConnectionId:0HN1U05QINEBS => RequestPath:/_blazor RequestId:0HN1U05QINEBS:00000002 => TransportConnectionId:BYTp331lV_I7_pgrYmEN1A => Test Connection
2024-03-06T17:21:25.469475513Z Test aborted, due to insufficient settings
2024-03-06T17:21:31.156886566Z 17:21:31 dbug: Compressarr.Services.RadarrService[0]
2024-03-06T17:21:31.156913567Z => SpanId:ab50e4d36e4b284f, TraceId:8ef49718a61baa1a5f9a45c4ad4469c2, ParentId:0000000000000000 => ConnectionId:0HN1U05QINEBS => RequestPath:/_blazor RequestId:0HN1U05QINEBS:00000002 => TransportConnectionId:BYTp331lV_I7_pgrYmEN1A => Test Connection
2024-03-06T17:21:31.156917927Z Test aborted, due to insufficient settings
2024-03-06T17:21:31.156964669Z 17:21:31 dbug: Compressarr.Services.SonarrService[0]
2024-03-06T17:21:31.156994870Z => SpanId:ab50e4d36e4b284f, TraceId:8ef49718a61baa1a5f9a45c4ad4469c2, ParentId:0000000000000000 => ConnectionId:0HN1U05QINEBS => RequestPath:/_blazor RequestId:0HN1U05QINEBS:00000002 => TransportConnectionId:BYTp331lV_I7_pgrYmEN1A => Test Connection
2024-03-06T17:21:31.157002940Z Test aborted, due to insufficient settings
2024-03-06T17:21:38.248946215Z 17:21:38 warn: Compressarr.Application.ApplicationService[0]
2024-03-06T17:21:38.248985786Z => SpanId:ab50e4d36e4b284f, TraceId:8ef49718a61baa1a5f9a45c4ad4469c2, ParentId:0000000000000000 => ConnectionId:0HN1U05QINEBS => RequestPath:/_blazor RequestId:0HN1U05QINEBS:00000002 => TransportConnectionId:BYTp331lV_I7_pgrYmEN1A => ReadAppSettings
2024-03-06T17:21:38.248990306Z File does not exist
2024-03-06T17:21:38.253987475Z 17:21:38 fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
2024-03-06T17:21:38.254031996Z => SpanId:ab50e4d36e4b284f, TraceId:8ef49718a61baa1a5f9a45c4ad4469c2, ParentId:0000000000000000 => ConnectionId:0HN1U05QINEBS => RequestPath:/_blazor RequestId:0HN1U05QINEBS:00000002 => TransportConnectionId:BYTp331lV_I7_pgrYmEN1A
2024-03-06T17:21:38.254036896Z Unhandled exception in circuit 'b21mc2bRKRqXP-aB6MrBLtcENxb9mXPIrE2YvSkDZkg'.
2024-03-06T17:21:38.254039596Z Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Cannot perform runtime binding on a null reference
2024-03-06T17:21:38.254042366Z at CallSite.Target(Closure , CallSite , Object , String )
2024-03-06T17:21:38.254044996Z at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
2024-03-06T17:21:38.254047656Z at Compressarr.Application.ApplicationService.UpdateLogLevel(LogLevel level) in /src/Compressarr/Compressarr/Application/ApplicationService.cs:line 156
2024-03-06T17:21:38.254050557Z at Compressarr.Pages.Options.saveSettings() in /src/Compressarr/Compressarr/Pages/Options.razor:line 245
2024-03-06T17:21:38.254052767Z at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
2024-03-06T17:21:38.254055037Z at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteSynchronously(TaskCompletionSource`1 completion, SendOrPostCallback d, Object state)
2024-03-06T17:21:38.254057237Z at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
2024-03-06T17:21:38.254059267Z --- End of stack trace from previous location ---
2024-03-06T17:21:38.254061237Z at Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.ExecuteBackground(WorkItem item)
The file that you don't have should have been put there on startup from a file in the image called appsettings.docker.json. There should be a file in there named appsettings.json.
if you can't find it try creating the file and put the following in there:
{
"Logging": {
"LogLevel": {
"Default": "Information"
},
"File": {
"PathFormat": "/config/logs/log-{Date}.txt"
}
}
}
It should be UTF-8 Encoded.