Open Closed

Deploy abp to docker #1081


User avatar
0
sgal created
  • ABP Framework version: v4.2.2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
 2021-03-23 06:38:22.426 +00:00 [INF] Starting Yiki.CoFarm.IdentityServer.
2021-03-23 06:38:24.278 +00:00 [WRN] 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.
2021-03-23 06:38:24.280 +00:00 [INF] User profile is available. Using '/root/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest.
2021-03-23 06:38:24.315 +00:00 [INF] Creating key {bdb6cead-ab9f-47e5-972e-3062c2af2453} with creation date 2021-03-23 06:38:24Z, activation date 2021-03-23 06:38:24Z, and expiration date 2021-06-21 06:38:24Z.
2021-03-23 06:38:24.321 +00:00 [WRN] No XML encryptor configured. Key {bdb6cead-ab9f-47e5-972e-3062c2af2453} may be persisted to storage in unencrypted form.
2021-03-23 06:38:24.324 +00:00 [INF] Writing data to file '/root/.aspnet/DataProtection-Keys/key-bdb6cead-ab9f-47e5-972e-3062c2af2453.xml'.
2021-03-23 06:38:24.368 +00:00 [INF] Loaded ABP modules:
2021-03-23 06:38:24.368 +00:00 [INF] - Volo.Abp.Castle.AbpCastleCoreModule
2021-03-23 06:38:24.368 +00:00 [INF] - Volo.Abp.Autofac.AbpAutofacModule
2021-03-23 06:38:24.368 +00:00 [INF] - Volo.Abp.Threading.AbpThreadingModule
......
2021-03-23 06:38:24.369 +00:00 [INF] - Yiki.CoFarm.CoFarmIdentityServerModule
2021-03-23 06:38:24.654 +00:00 [FTL] Application startup exception
Volo.Abp.AbpInitializationException: An error occurred during the initialize Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor phase of the module Yiki.CoFarm.CoFarmIdentityServerModule, Yiki.CoFarm.IdentityServer, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: An exception was thrown while activating λ:Volo.Abp.AspNetCore.VirtualFileSystem.IWebContentFileProvider -> Volo.Abp.AspNetCore.VirtualFileSystem.WebContentFileProvider -> λ:Volo.Abp.VirtualFileSystem.IVirtualFileProvider -> Volo.Abp.VirtualFileSystem.VirtualFileProvider.. See the inner exception for details.
 ---> Autofac.Core.DependencyResolutionException: An exception was thrown while activating λ:Volo.Abp.AspNetCore.VirtualFileSystem.IWebContentFileProvider -> Volo.Abp.AspNetCore.VirtualFileSystem.WebContentFileProvider -> λ:Volo.Abp.VirtualFileSystem.IVirtualFileProvider -> Volo.Abp.VirtualFileSystem.VirtualFileProvider.
 ---> Autofac.Core.DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(Microsoft.Extensions.Options.IOptions`1[Volo.Abp.VirtualFileSystem.AbpVirtualFileSystemOptions], Volo.Abp.VirtualFileSystem.IDynamicFileProvider)' on type 'VirtualFileProvider'.
 ---> System.IO.DirectoryNotFoundException: /Yiki.CoFarm.Domain.Shared/
   at Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root, ExclusionFilters filters)
   at Volo.Abp.VirtualFileSystem.VirtualFileSetListExtensions.ReplaceEmbeddedByPhysical[T](VirtualFileSetList fileSets, String physicalPath)
   at Yiki.CoFarm.CoFarmIdentityServerModule.<>c__DisplayClass1_0.<ConfigureServices>b__3(AbpVirtualFileSystemOptions options) in /src/aspnet-core/src/Yiki.CoFarm.IdentityServer/CoFarmIdentityServerModule.cs:line 90
   at Microsoft.Extensions.Options.ConfigureNamedOptions`1.Configure(String name, TOptions options)
   at Microsoft.Extensions.Options.OptionsFactory`1.Create(String name)
   at Microsoft.Extensions.Options.OptionsManager`1.<>c__DisplayClass5_0.<Get>b__0()
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
   at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.get_Value()
   at Microsoft.Extensions.Options.OptionsCache`1.GetOrAdd(String name, Func`1 createOptions)
   at Microsoft.Extensions.Options.OptionsManager`1.Get(String name)
   at Microsoft.Extensions.Options.OptionsManager`1.get_Value()
   at Volo.Abp.VirtualFileSystem.VirtualFileProvider..ctor(IOptions`1 options, IDynamicFileProvider dynamicFileProvider)
   at lambda_method962(Closure , Object[] )
   at Autofac.Core.Activators.Reflection.BoundConstructor.Instantiate()
   --- End of inner exception stack trace ---
   at Autofac.Core.Activators.Reflection.BoundConstructor.Instantiate()
   at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters)
   at Autofac.Core.Activators.Reflection.ReflectionActivator.<ConfigurePipeline>b__11_0(ResolveRequestContext ctxt, Action`1 next)
   at Autofac.Core.Resolving.Middleware.DelegateMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
   at Autofac.Core.Resolving.Middleware.DisposalTrackingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.&lt;&gt;c__DisplayClass14_0.&lt;BuildPipeline&gt;b__1(ResolveRequestContext ctxt)
   at Autofac.Builder.RegistrationBuilder`3.<>c__DisplayClass41_0.<PropertiesAutowired>b__0(ResolveRequestContext ctxt, Action`1 next)
   at Autofac.Core.Resolving.Middleware.DelegateMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt)
   at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   --- End of inner exception stack trace ---
......
  • Steps to reproduce the issue: after operator key from step [License check failed for 'Volo.Abp.LanguageManagement.Domain.Shared-v2.3.0.0'. #69](https://support.abp.io/QA/Questions/69/License-check-failed-for-%27VoloAbpLanguageManagementDomainShared-v2300%27) relation issue [Use docker to deploy abp #1072](https://support.abp.io/QA/Questions/1072/Use-docker-to-deploy-abp)

28 Answer(s)
  • User Avatar
    0
    sgal created

    This is not related to Csrf, I think your application config is not correct

    Our focus is different

  • User Avatar
    0
    gterdem created
    Senior .NET Developer

    When I deploy to the production environment, this problem still exists

    2021-04-23 09:26:14.799 +00:00 [ERR] Connection id "0HM867749Q1JJ", Request id "0HM867749Q1JJ:00000002": An unhandled exception was thrown by the application. 
    System.InvalidOperationException: IDX20803: Unable to obtain configuration from: 'System.String'. 
     ---> System.IO.IOException: IDX20804: Unable to retrieve document from: 'System.String'. 
     ---> System.Net.Http.HttpRequestException: Connection refused (identity.co-farming.com:443) 
     ---> System.Net.Sockets.SocketException (111): Connection refused 
       at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken) 
       at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) 
       at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|283_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken) 
       at System.Net.Http.HttpConnectionPool.DefaultConnectAsync(SocketsHttpConnectionContext context, CancellationToken cancellationToken) 
       at System.Net.Http.ConnectHelper.ConnectAsync(Func`3 callback, DnsEndPoint endPoint, HttpRequestMessage requestMessage, CancellationToken cancellationToken) 
       --- End of inner exception stack trace --- 
       at System.Net.Http.ConnectHelper.ConnectAsync(Func`3 callback, DnsEndPoint endPoint, HttpRequestMessage requestMessage, CancellationToken cancellationToken) 
       at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) 
       at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) 
       at System.Net.Http.HttpConnectionPool.GetHttpConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) 
       at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) 
       at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) 
       at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) 
    

    If this error still persist, this is related with IdentityServer configuration which is, your api resource can not connect to IdentityServer.

    Check api's Authorization configuration is appsettings match with your production authentication server's url. Most likely it is related with HTTPS.

  • User Avatar
    0
    sgal created

    Yes, when I check and find the document, this issue is still http

Made with ❤️ on ABP v9.1.0-preview. Updated on November 01, 2024, 05:35