Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Docker image fails for read-only volumes #354

Open
otto-ifak opened this issue Oct 1, 2024 · 0 comments
Open

[Bug]: Docker image fails for read-only volumes #354

otto-ifak opened this issue Oct 1, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@otto-ifak
Copy link

Contact Details

No response

Describe the bug

When starting the docker container with a read-only volume, the following error occurs:

aasx-server-1  | Serving the AASXs from: ./aasxs
aasx-server-1  | Security 1 Startup - Server
aasx-server-1  | Security 1.1 Load X509 Root Certificates into X509 Store Root
aasx-server-1  | Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
aasx-server-1  |  ---> System.AggregateException: One or more errors occurred. (Read-only file system : '/AasxServerBlazor/aasxs/xml')
aasx-server-1  |  ---> System.IO.IOException: Read-only file system : '/AasxServerBlazor/aasxs/xml'
aasx-server-1  |    at System.IO.FileSystem.CreateDirectory(String fullPath, UnixFileMode unixCreateMode)
aasx-server-1  |    at System.IO.Directory.CreateDirectory(String path)
aasx-server-1  |    at AasxServer.Program.Run(CommandLineArguments a) in /repo/src/AasxServerStandardBib/Program.cs:line 767
aasx-server-1  |    --- End of inner exception stack trace ---
aasx-server-1  |    at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
aasx-server-1  |    at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
aasx-server-1  |    at System.Threading.Tasks.Task.Wait()
aasx-server-1  |    at AasxServer.Program.<>c.<Main>b__65_0(CommandLineArguments a) in /repo/src/AasxServerStandardBib/Program.cs:line 1226
aasx-server-1  |    at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
aasx-server-1  |    at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
aasx-server-1  |    --- End of inner exception stack trace ---
aasx-server-1  |    at System.Reflection.MethodBaseInvoker.InvokeDirectByRefWithFewArgs(Object obj, Span`1 copyOfArgs, BindingFlags invokeAttr)
aasx-server-1  |    at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
aasx-server-1  |    at System.Delegate.DynamicInvokeImpl(Object[] args)
aasx-server-1  |    at System.CommandLine.Invocation.ModelBindingCommandHandler.InvokeAsync(InvocationContext context)
aasx-server-1  |    at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
aasx-server-1  | --- End of stack trace from previous location ---
aasx-server-1  |    at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseErrorReporting>b__21_0>d.MoveNext()
aasx-server-1  | --- End of stack trace from previous location ---
aasx-server-1  |    at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<<UseHelp>b__0>d.MoveNext()
aasx-server-1  | --- End of stack trace from previous location ---
aasx-server-1  |    at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass25_0.<<UseVersionOption>b__0>d.MoveNext()
aasx-server-1  | --- End of stack trace from previous location ---
aasx-server-1  |    at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass23_0.<<UseTypoCorrections>b__0>d.MoveNext()
aasx-server-1  | --- End of stack trace from previous location ---
aasx-server-1  |    at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__22_0>d.MoveNext()
aasx-server-1  | --- End of stack trace from previous location ---
aasx-server-1  |    at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseDirective>b__20_0>d.MoveNext()
aasx-server-1  | --- End of stack trace from previous location ---
aasx-server-1  |    at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseDebugDirective>b__11_0>d.MoveNext()
aasx-server-1  | --- End of stack trace from previous location ---
aasx-server-1  |    at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__10_0>d.MoveNext()
aasx-server-1  | --- End of stack trace from previous location ---
aasx-server-1  |    at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass14_0.<<UseExceptionHandler>b__0>d.MoveNext()

I guess this is because the server tries to create the files and xml directories.

To reproduce

Mount volume read-only (or use any other read-only filesystem)

-v ./aasx:/AasxServerBlazor/aasxs:ro

Screenshots

No response

Expected Behaviour

Version

No response

Operating System

No response

Relevant log output

No response

@otto-ifak otto-ifak added the bug Something isn't working label Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant