Activities of "Spospisil"

Hi,

No steps to reproduce. It's just happening. Yes it happens with a new database as well.

  • ABP Framework version: v7.0.2
  • UI type: MVC
  • DB provider: EF Core/PostgreSQL
  • Tiered (MVC) or Identity Server Separated (Angular): Tiered/Separated Identity server
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

It seems that the 1st time I run the DBMigrator project I get errors related to a connection to the TestWebHost DB on the server.

Please advise.

[16:18:14 INF] Started database migrations... [16:18:14 INF] Migrating schema for host database... [16:18:16 ERR] An error occurred using the connection to database 'TestWebHost' on server ''. [16:18:17 ERR] 3D000: database "TestWebHost" does not exist Npgsql.PostgresException (0x80004005): 3D000: database "TestWebHost" does not exist at Npgsql.Internal.NpgsqlConnector.<ReadMessage>g__ReadMessageLong|222_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage) at Npgsql.Internal.NpgsqlConnector.<Open>g__OpenCore|204_1(NpgsqlConnector conn, SslMode sslMode, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken, Boolean isFirstAttempt) at Npgsql.Internal.NpgsqlConnector.Open(NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken) at Npgsql.PoolingDataSource.OpenNewConnector(NpgsqlConnection conn, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken) at Npgsql.PoolingDataSource.<Get>g__RentAsync|28_0(NpgsqlConnection conn, NpgsqlTimeout timeout, Boolean async, CancellationToken cancellationToken) at Npgsql.NpgsqlConnection.<Open>g__OpenAsync|45_0(Boolean async, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternalAsync(Boolean errorsExpected, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternalAsync(Boolean errorsExpected, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenAsync(CancellationToken cancellationToken, Boolean errorsExpected) at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.BeginTransactionAsync(IsolationLevel isolationLevel, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.BeginTransactionAsync(CancellationToken cancellationToken) at Volo.Abp.Uow.EntityFrameworkCore.UnitOfWorkDbContextProvider1.CreateDbContextWithTransactionAsync(IUnitOfWork unitOfWork) in C:\Src702\ABP\framework\src\Volo.Abp.EntityFrameworkCore\Volo\Abp\Uow\EntityFrameworkCore\UnitOfWorkDbContextProvider.cs:line 272 at Volo.Abp.Uow.EntityFrameworkCore.UnitOfWorkDbContextProvider1.CreateDbContextAsync(IUnitOfWork unitOfWork) in C:\Src702\ABP\framework\src\Volo.Abp.EntityFrameworkCore\Volo\Abp\Uow\EntityFrameworkCore\UnitOfWorkDbContextProvider.cs:line 160 at Volo.Abp.Uow.EntityFrameworkCore.UnitOfWorkDbContextProvider1.CreateDbContextAsync(IUnitOfWork unitOfWork, String connectionStringName, String connectionString) in C:\Src702\ABP\framework\src\Volo.Abp.EntityFrameworkCore\Volo\Abp\Uow\EntityFrameworkCore\UnitOfWorkDbContextProvider.cs:line 135 at Volo.Abp.Uow.EntityFrameworkCore.UnitOfWorkDbContextProvider1.GetDbContextAsync() at Volo.Abp.Domain.Repositories.EntityFrameworkCore.EfCoreRepository2.GetDbSetAsync() in C:\Src702\ABP\framework\src\Volo.Abp.EntityFrameworkCore\Volo\Abp\Domain\Repositories\EntityFrameworkCore\EfCoreRepository.cs:line 74 at Volo.Abp.Domain.Repositories.EntityFrameworkCore.EfCoreRepository2.GetListAsync(Boolean includeDetails, CancellationToken cancellationToken) in C:\Src702\ABP\framework\src\Volo.Abp.EntityFrameworkCore\Volo\Abp\Domain\Repositories\EntityFrameworkCore\EfCoreRepository.cs:line 226 at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() in C:\Src702\ABP\framework\src\Volo.Abp.Castle.Core\Volo\Abp\Castle\DynamicProxy\CastleAbpMethodInvocationAdapterWithReturnValue.cs:line 24 at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) in C:\Src702\ABP\framework\src\Volo.Abp.Uow\Volo\Abp\Uow\UnitOfWorkInterceptor.cs:line 49 at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) in C:\Src702\ABP\framework\src\Volo.Abp.Castle.Core\Volo\Abp\Castle\DynamicProxy\CastleAsyncAbpInterceptorAdapter.cs:line 29 at Volo.Abp.FeatureManagement.StaticFeatureSaver.UpdateChangedFeatureGroupsAsync(IEnumerable1 featureGroupRecords) in C:\Src702\ABP\modules\feature-management\src\Volo.Abp.FeatureManagement.Domain\Volo\Abp\FeatureManagement\StaticFeatureSaver.cs:line 134 at Volo.Abp.FeatureManagement.StaticFeatureSaver.SaveAsync() in C:\Src702\ABP\modules\feature-management\src\Volo.Abp.FeatureManagement.Domain\Volo\Abp\FeatureManagement\StaticFeatureSaver.cs:line 102 at Volo.Abp.FeatureManagement.StaticFeatureSaver.SaveAsync() in C:\Src702\ABP\modules\feature-management\src\Volo.Abp.FeatureManagement.Domain\Volo\Abp\FeatureManagement\StaticFeatureSaver.cs:line 116 at Volo.Abp.FeatureManagement.StaticFeatureSaver.SaveAsync() in C:\Src702\ABP\modules\feature-management\src\Volo.Abp.FeatureManagement.Domain\Volo\Abp\FeatureManagement\StaticFeatureSaver.cs:line 118 at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync() in C:\Src702\ABP\framework\src\Volo.Abp.Castle.Core\Volo\Abp\Castle\DynamicProxy\CastleAbpMethodInvocationAdapter.cs:line 23 at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) in C:\Src702\ABP\framework\src\Volo.Abp.Uow\Volo\Abp\Uow\UnitOfWorkInterceptor.cs:line 49 at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) in C:\Src702\ABP\framework\src\Volo.Abp.Castle.Core\Volo\Abp\Castle\DynamicProxy\CastleAsyncAbpInterceptorAdapter.cs:line 20 at Volo.Abp.FeatureManagement.AbpFeatureManagementDomainModule.<>c__DisplayClass6_0.<<SaveStaticFeaturesToDatabaseAsync>b__1>d.MoveNext() in C:\Src702\ABP\modules\feature-management\src\Volo.Abp.FeatureManagement.Domain\Volo\Abp\FeatureManagement\AbpFeatureManagementDomainModule.cs:line 136

  • ABP Framework version: v7.0.2
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): Tiered/Separated Identity server
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

I've been getting this error recently and don't understand why. I have not changed anything regarding the language or localization text records.

Please advise

[15:58:15 INF] Started database migrations... [15:58:15 INF] Migrating schema for host database... [15:58:20 INF] Executing host database seed... [15:59:54 ERR] value length must be equal to or lower than 65536! (Parameter 'value') System.ArgumentException: value length must be equal to or lower than 65536! (Parameter 'value') at Volo.Abp.Check.Length(String value, String parameterName, Int32 maxLength, Int32 minLength) in C:\Src702\ABP\framework\src\Volo.Abp.Core\Volo\Abp\Check.cs:line 160 at Volo.Abp.LanguageManagement.External.LocalizationTextRecord..ctor(Guid id, String resourceName, String cultureName, String value) in C:\Src702\ABP-Pro-Modules\language-management\src\Volo.Abp.LanguageManagement.Domain\Volo\Abp\LanguageManagement\External\LocalizationTextRecord.cs:line 33 at Volo.Abp.LanguageManagement.External.ExternalLocalizationSaver.UpdateResourceTextChangesAsync(SaveContext context, LocalizationResource resource, String cultureName, IStringLocalizer localizer) in C:\Src702\ABP-Pro-Modules\language-management\src\Volo.Abp.LanguageManagement.Domain\Volo\Abp\LanguageManagement\External\ExternalLocalizationSaver.cs:line 339 at Volo.Abp.LanguageManagement.External.ExternalLocalizationSaver.UpdateResourceTextChangesAsync(SaveContext context, LocalizationResource resource, String cultureName, IStringLocalizer localizer) in C:\Src702\ABP-Pro-Modules\language-management\src\Volo.Abp.LanguageManagement.Domain\Volo\Abp\LanguageManagement\External\ExternalLocalizationSaver.cs:line 355 at Volo.Abp.LanguageManagement.External.ExternalLocalizationSaver.UpdateResourceChangesAsync(SaveContext context, LocalizationResource resource) in C:\Src702\ABP-Pro-Modules\language-management\src\Volo.Abp.LanguageManagement.Domain\Volo\Abp\LanguageManagement\External\ExternalLocalizationSaver.cs:line 176 at Volo.Abp.LanguageManagement.External.ExternalLocalizationSaver.SaveAsync() in C:\Src702\ABP-Pro-Modules\language-management\src\Volo.Abp.LanguageManagement.Domain\Volo\Abp\LanguageManagement\External\ExternalLocalizationSaver.cs:line 85 at Volo.Abp.LanguageManagement.External.ExternalLocalizationSaver.SaveAsync() in C:\Src702\ABP-Pro-Modules\language-management\src\Volo.Abp.LanguageManagement.Domain\Volo\Abp\LanguageManagement\External\ExternalLocalizationSaver.cs:line 91 at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync() in C:\Src702\ABP\framework\src\Volo.Abp.Castle.Core\Volo\Abp\Castle\DynamicProxy\CastleAbpMethodInvocationAdapter.cs:line 23 at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) in C:\Src702\ABP\framework\src\Volo.Abp.Uow\Volo\Abp\Uow\UnitOfWorkInterceptor.cs:line 49 at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) in C:\Src702\ABP\framework\src\Volo.Abp.Castle.Core\Volo\Abp\Castle\DynamicProxy\CastleAsyncAbpInterceptorAdapter.cs:line 20 at Volo.Abp.LanguageManagement.LanguageManagementDomainModule.<>c__DisplayClass6_1.<<SaveLocalizationsAsync>b__2>d.MoveNext() in C:\Src702\ABP-Pro-Modules\language-management\src\Volo.Abp.LanguageManagement.Domain\Volo\Abp\LanguageManagement\LanguageManagementDomainModule.cs:line 134

Question
  • ABP Framework version: v7.0.2
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): Tiered and Identity Server Separated
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

I am still unable to get my solution working in a deployed local docker environment. Here is the log and docker-compose file that I'm using. I get a 400 error after I hit the login button after entering the admin credentials.

[12:19:26 INF] The authorization request was successfully validated. [12:19:26 INF] Executing endpoint 'Volo.Abp.OpenIddict.Controllers.AuthorizeController.HandleAsync (Volo.Abp.OpenIddict.AspNetCore)' [12:19:26 INF] Route matched with {action = "Handle", controller = "Authorize", area = "", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.IActionResult] HandleAsync() on controller Volo.Abp.OpenIddict.Controllers.AuthorizeController (Volo.Abp.OpenIddict.AspNetCore). [12:19:26 INF] Skipping the execution of current filter as its not the most effective filter implementing the policy Microsoft.AspNetCore.Mvc.ViewFeatures.IAntiforgeryPolicy [12:19:26 INF] Executing SignInResult with authentication scheme (OpenIddict.Server.AspNetCore) and the following principal: System.Security.Claims.ClaimsPrincipal. [12:19:27 INF] The authorization response was successfully returned to 'https://localhost:44353/signin-oidc' using the form post response mode: { "code": "[redacted]", "id_token": "[redacted]", "state": "CfDJ8JNGHrywwLhJnvwAUL66UAxPdLLBfPpa7emn0WrG6bMsqF6V2Nv9xIt9U0xN9zs7ZqO_13mO26aijrLaz-f0_R3MU-VKISz_Pf8xWkLzNzPvJwEvudhPzbQoIXyFavyCIJK5hbdYBQicpQSOV_oKWdVNo_ITCpkEIahJpg0S51mXmskdbOKihz_FAfjCyzRdfxPqVocSAPKztHaq0a-wqSGKWjEPO-AKtr_XIiij7Tj1xeFrFhl9UcP6mQdXHKg4Xu0ysxgszeb2ZeAMKPV2SOS0DT8K__ikGf8N_JhDdQGP6yiX-aH7vO6QWGMKDNN6Fg", "iss": "https://localhost:44334/" }. [12:19:27 INF] Executed action Volo.Abp.OpenIddict.Controllers.AuthorizeController.HandleAsync (Volo.Abp.OpenIddict.AspNetCore) in 637.4761ms [12:19:27 INF] Executed endpoint 'Volo.Abp.OpenIddict.Controllers.AuthorizeController.HandleAsync (Volo.Abp.OpenIddict.AspNetCore)' [12:19:27 INF] Request finished HTTP/2 GET https://localhost:44334/connect/authorize?client_id=StructureWeb_Web&redirect_uri=https%3A%2F%2Flocalhost%3A44353%2Fsignin-oidc&response_type=code%20id_token&scope=openid%20profile%20roles%20email%20phone%20StructureWeb&response_mode=form_post&nonce=638150843365765353.NmRjZTI4NzUtNmRjZS00YmQxLWFjMTMtZTkzYWE5ZTMxNWM3ZTU5MDk2NjAtMzM5ZC00YThjLTg1MjAtMTJkZDAwMTA2ODA4&state=CfDJ8JNGHrywwLhJnvwAUL66UAxPdLLBfPpa7emn0WrG6bMsqF6V2Nv9xIt9U0xN9zs7ZqO_13mO26aijrLaz-f0_R3MU-VKISz_Pf8xWkLzNzPvJwEvudhPzbQoIXyFavyCIJK5hbdYBQicpQSOV_oKWdVNo_ITCpkEIahJpg0S51mXmskdbOKihz_FAfjCyzRdfxPqVocSAPKztHaq0a-wqSGKWjEPO-AKtr_XIiij7Tj1xeFrFhl9UcP6mQdXHKg4Xu0ysxgszeb2ZeAMKPV2SOS0DT8K__ikGf8N_JhDdQGP6yiX-aH7vO6QWGMKDNN6Fg&x-client-SKU=ID_NET6_0&x-client-ver=6.15.1.0 - - - 200 2021 text/html;charset=UTF-8 671.7820ms [12:19:27 INF] Request starting HTTP/1.1 POST http://structureweb-authserver/connect/token application/x-www-form-urlencoded 188 [12:19:27 INF] The request URI matched a server endpoint: Token. [12:19:27 INF] The token request was successfully extracted: { "client_id": "StructureWeb_Web", "client_secret": "[redacted]", "code": "[redacted]", "grant_type": "authorization_code", "redirect_uri": "https://localhost:44353/signin-oidc" }. [12:19:27 INF] The response was successfully returned as a JSON document: { "error": "invalid_grant", "error_description": "The issuer associated to the specified token is not valid.", "error_uri": "https://documentation.openiddict.com/errors/ID2088" }. [12:19:27 INF] Request finished HTTP/1.1 POST http://structureweb-authserver/connect/token application/x-www-form-urlencoded 188 - 400 184 application/json;charset=UTF-8 107.0345ms [12:19:35 INF] Application is shutting down...

  • Docker-Compose.yml

version: '3.7'

services: structureweb-web: image: cfdata/structureweb-web:latest container_name: structureweb-web hostname: structureweb-web build: context: ../../../ dockerfile: aspnet-core/src/StructureWeb.Web/Dockerfile.local environment: - ASPNETCORE_URLS=https://+:443;http://+:80; - ASPNETCORE_ENVIRONMENT=Production - Kestrel__Certificates__Default__Path=/root/certificate/localhost.pfx - Kestrel__Certificates__Default__Password=91f91912-5ab0-49df-8166-23377efaf3cc - App__SelfUrl=https://localhost:44353 - App__CorsOrigins=https://localhost:44334 - AuthServer__RequireHttpsMetadata=false - AuthServer__IsContainerizedOnLocalhost=true - AuthServer__Authority=https://localhost:44334/ - RemoteServices__Default__BaseUrl=http://structureweb-host - RemoteServices__AbpAccountPublic__BaseUrl=http://structureweb-authserver - AuthServer__MetaAddress=http://structureweb-authserver - StringEncryption__DefaultPassPhrase=hsaEIdKpXAUfEH5D - ConnectionStrings__Default=Host=xxx.xxx.xxx.xxx;Port=5432;Database=StructureWebHost;User ID=xxx;Password=xxx;
- Redis__Configuration=redis - RabbitMQ__Connections__Default__HostName=rabbitmq - RabbitMQ__Connections__Default__UserName=guest - RabbitMQ__Connections__Default__Password=guest - RabbitMQ__EventBus__ClientName=StructureWeb - RabbitMQ__EventBus__ExchangeName=StructureWeb - RabbitMQ__EventBus__ConnectionName=PrimaryConnection ports: - "44353:443" depends_on: - structureweb.httpapi.host restart: on-failure volumes: - ./certs:/root/certificate - ./aspnet-core/src/tokens:/root/.abp/cli/ networks: - abp-network

structureweb.httpapi.host: container_name: structureweb-host hostname: structureweb-host image: cfdata/structureweb-api:latest build: context: ../../../ dockerfile: aspnet-core/src/StructureWeb.HttpApi.Host/Dockerfile.local environment: - ASPNETCORE_URLS=https://+:443;http://+:80; - ASPNETCORE_ENVIRONMENT=Production - Kestrel__Certificates__Default__Path=/root/certificate/localhost.pfx - Kestrel__Certificates__Default__Password=91f91912-5ab0-49df-8166-23377efaf3cc - App__SelfUrl=https://localhost:44354 - App__HealthCheckUrl=http://structureweb-host/health-status - AuthServer__RequireHttpsMetadata=false - AuthServer__Authority=http://structureweb-authserver - ConnectionStrings__Default=Host=xxx.xxx.xxx.xxx;Port=5432;Database=StructureWebHost;User ID=xxx;Password=xxx;
- StringEncryption__DefaultPassPhrase=hsaEIdKpXAUfEH5D - Redis__Configuration=redis - RabbitMQ__Connections__Default__HostName=rabbitmq - RabbitMQ__Connections__Default__UserName=guest - RabbitMQ__Connections__Default__Password=guest - RabbitMQ__EventBus__ClientName=StructureWebHttpApi - RabbitMQ__EventBus__ExchangeName=StructureWeb - RabbitMQ__EventBus__ConnectionName=PrimaryConnection ports: - "44354:443" depends_on: redis: condition: service_healthy restart: on-failure volumes: - ./certs:/root/certificate networks: - abp-network

structureweb-authserver: container_name: structureweb-authserver image: cfdata/structureweb-authserver:latest build: context: ../../../ dockerfile: aspnet-core/src/StructureWeb.AuthServer/Dockerfile.local environment: - ASPNETCORE_URLS=https://+:443;http://+:80; - ASPNETCORE_ENVIRONMENT=Production - Kestrel__Certificates__Default__Path=/root/certificate/localhost.pfx - Kestrel__Certificates__Default__Password=91f91912-5ab0-49df-8166-23377efaf3cc - App__SelfUrl=https://localhost:44334 - App__CorsOrigins=https://localhost:44353,https://localhost:44354 - AuthServer__RequireHttpsMetadata=false - AuthServer__Authority=http://structureweb-authserver - StringEncryption__DefaultPassPhrase=hsaEIdKpXAUfEH5D - ConnectionStrings__Default=Host=xxx.xxx.xxx.xxx;Port=5432;Database=StructureWebHost;User ID=xxx;Password=xxx;
- Redis__Configuration=redis - RabbitMQ__Connections__Default__HostName=rabbitmq - RabbitMQ__Connections__Default__UserName=guest - RabbitMQ__Connections__Default__Password=guest - RabbitMQ__EventBus__ClientName=StructureWebIdentityServer - RabbitMQ__EventBus__ExchangeName=StructureWeb - RabbitMQ__EventBus__ConnectionName=PrimaryConnection ports: - "44334:443" depends_on: redis: condition: service_healthy restart: on-failure volumes: - ./certs:/root/certificate - ./aspnet-core/src/tokens:/root/.abp/cli/ networks: - abp-network

db-migrator: image: cfdata/structureweb-db-migrator:latest container_name: structureweb-db-migrator build: context: ../../ dockerfile: aspnet-core/src/StructureWeb.DbMigrator/Dockerfile.local environment: - OpenIddict__Applications__StructureWeb_Web__RootUrl=https://localhost:44353 - OpenIddict__Applications__StructureWeb_Swagger__RootUrl=https://localhost:44354 - ConnectionStrings__Default=Host=xxx.xxx.xxx.xxx;Port=5432;Database=StructureWebHost;User ID=xxx;Password=xxx;
- Redis__Configuration=redis - RabbitMQ__Connections__Default__HostName=rabbitmq - RabbitMQ__Connections__Default__UserName=guest - RabbitMQ__Connections__Default__Password=guest - RabbitMQ__EventBus__ClientName=StructureWebDbMigrator - RabbitMQ__EventBus__ExchangeName=StructureWeb - RabbitMQ__EventBus__ConnectionName=PrimaryConnection
networks: - abp-network

redis: container_name: redis image: redis:alpine ports: - "6379:6379" networks: - abp-network healthcheck: test: ["CMD", "redis-cli","ping"]

rabbitmq: container_name: rabbitmq image: rabbitmq:management-alpine ports: - "15672:15672" - "5672:5672" networks: - abp-network

elsaserver: container_name: elsaserver image: elsaworkflows/elsa-dashboard-and-server:latest ports: - "13000:80" networks: - abp-network

networks: abp-network: name: structureweb-network driver: bridge

I got past the initial error.....however the out of the box solution STILL does not work within a local docker environment. Actually I'm in a worse position now as the API does not even load properly now.

Can you please provide step by step documentation on how to get the out of the box solution you created to work within a local docker environment.

Again, I am using exactly the same version of ABP you used and cannot get it to run.

Thanks.

So, not surprisingly to me the out of the box solution produced using the version you specified be used does not even build, so I'll have to spend some time here first figuring out what the issue is in the build before trying out the solution you suggested.

Any assistance you could provide to the error I'm getting out of the box would be very helpful.

PS C:\bookstore\bookstore\etc\docker> .\run-docker.ps1 docker-compose : Creating network "bookstore-network" with driver "bridge" At C:\bookstore\bookstore\etc\docker\run-docker.ps1:16 char:1

  • docker-compose up -d
  •   + CategoryInfo          : NotSpecified: (Creating networ...driver "bridge":String) [], RemoteException
      + FullyQualifiedErrorId : NativeCommandError
    
    

Building db-migrator #1 [internal] load build definition from Dockerfile.local #1 sha256:6c9be97f9f8271f05874fb52f7bcccfc4c31691a1c114c723c053b1529d83196 #1 transferring dockerfile: 38B done #1 DONE 0.0s #2 [internal] load .dockerignore #2 sha256:3b5b004ae2d4be64dd318933a5c91a53c3bacf0671f5b5de5016f34a1e1cd992 #2 transferring context: 366B done #2 DONE 0.0s #3 [internal] load metadata for mcr.microsoft.com/dotnet/aspnet:7.0 #3 sha256:bd81707146cb292c295dcfd83d3d7f373e1cbce6796768c5454f972e96118801 #3 DONE 0.0s #4 [1/3] FROM mcr.microsoft.com/dotnet/aspnet:7.0 #4 sha256:fca9347c67c2a2d23af44c6e8d6dcb7691ddb36bcfa46dbc8c338612349514b9 #4 CACHED #5 [internal] load build context #5 sha256:4ad41e85c8cbe41a30b57549e8807d3a01884469bba0e31295e5db07c821fdcd #5 transferring context: 25B done #5 DONE 0.0s #6 [2/3] COPY bin/Release/net7.0/publish/ app/ #6 sha256:3dac2ec270c0eea5c43deffff9c7b9aec2e2c1f1ff0da08cefe6ec900288542d #6 ERROR: "/bin/Release/net7.0/publish" not found: not found

[2/3] COPY bin/Release/net7.0/publish/ app/:


failed to compute cache key: "/bin/Release/net7.0/publish" not found: not found Service 'db-migrator' failed to build : Build failed

So, not surprisingly to me the out of the box solution produced using the version you specified be used does not even build, so I'll have to spend some time here first figuring out what the issue is in the build before trying out the solution you suggested.

Currently, the generated docker-compose.yml file for a tiered solution only has the 'web' service defined in it, but I'm more concerned about all the url settings needed to run ABP, such as the ones for oidc, etc

On which version did you come across this behavior? This problem should have been fixed on version 7.1.0-rc.

Here is the docker-compose.yml file I've just generated for a tiered mvc project named Acme.BookStore on latest rc version 7.1.0-rc.3:

version: '3.7'  
  
services:  
  bookstore-web:  
    image: acme/bookstore-web:latest  
    container_name: bookstore-web  
    hostname: bookstore-web  
    build:  
      context: ../../  
      dockerfile: src/Acme.BookStore.Web/Dockerfile.local  
    environment:  
      - ASPNETCORE_URLS=https://+:443;http://+:80;  
      - Kestrel__Certificates__Default__Path=/root/certificate/localhost.pfx  
      - Kestrel__Certificates__Default__Password=91f91912-5ab0-49df-8166-23377efaf3cc  
      - App__SelfUrl=https://localhost:44353  
      - AuthServer__RequireHttpsMetadata=false  
      - AuthServer__IsContainerizedOnLocalhost=true  
      - AuthServer__Authority=https://localhost:44334/  
      - RemoteServices__Default__BaseUrl=http://bookstore-api  
      - RemoteServices__AbpAccountPublic__BaseUrl=http://bookstore-authserver  
      - AuthServer__MetaAddress=http://bookstore-authserver  
      - Redis__Configuration=redis  
    ports:  
      - "44353:443"  
    depends_on:  
      - bookstore-api  
    restart: on-failure  
    volumes:  
      - ./certs:/root/certificate  
    networks:  
      - abp-network  
  
  bookstore-api:  
    image: acme/bookstore-api:latest  
    container_name: bookstore-api  
    hostname: bookstore-api  
    build:  
      context: ../../  
      dockerfile: src/Acme.BookStore.HttpApi.Host/Dockerfile.local  
    environment:  
      - ASPNETCORE_URLS=https://+:443;http://+:80;  
      - Kestrel__Certificates__Default__Path=/root/certificate/localhost.pfx  
      - Kestrel__Certificates__Default__Password=91f91912-5ab0-49df-8166-23377efaf3cc  
      - App__SelfUrl=https://localhost:44354  
      - App__HealthCheckUrl=http://bookstore-api/health-status  
      - AuthServer__RequireHttpsMetadata=false  
      - AuthServer__Authority=http://bookstore-authserver  
      - ConnectionStrings__Default=Data Source=sql-server;Initial Catalog=BookStore;User Id=sa;Password=myPassw0rd;MultipleActiveResultSets=true;TrustServerCertificate=True;  
      - Redis__Configuration=redis  
    ports:  
      - "44354:443"  
    depends_on:  
      sql-server:  
        condition: service_healthy  
      redis:  
        condition: service_healthy  
    restart: on-failure  
    volumes:  
      - ./certs:/root/certificate  
    networks:  
      - abp-network  
    
  bookstore-authserver:  
    image: acme/bookstore-authserver:latest  
    container_name: bookstore-authserver  
    build:  
      context: ../../  
      dockerfile: src/Acme.BookStore.AuthServer/Dockerfile.local  
    environment:  
      - ASPNETCORE_URLS=https://+:443;http://+:80;  
      - App__SelfUrl=https://localhost:44334  
      - App__CorsOrigins=https://localhost:44353,https://localhost:44354  
      - AuthServer__RequireHttpsMetadata=false  
      - AuthServer__Authority=http://bookstore-authserver  
      - Kestrel__Certificates__Default__Path=/root/certificate/localhost.pfx  
      - Kestrel__Certificates__Default__Password=91f91912-5ab0-49df-8166-23377efaf3cc  
      - ConnectionStrings__Default=Data Source=sql-server;Initial Catalog=BookStore;User Id=sa;Password=myPassw0rd;MultipleActiveResultSets=true;TrustServerCertificate=True;  
      - Redis__Configuration=redis  
    ports:  
      - "44334:443"  
    depends_on:  
      sql-server:  
        condition: service_healthy  
      redis:  
        condition: service_healthy  
    restart: on-failure  
    volumes:  
      - ./certs:/root/certificate  
    networks:  
      - abp-network  
  
    
  db-migrator:  
    image: acme/bookstore-db-migrator:latest  
    container_name: db-migrator  
    build:  
      context: ../../  
      dockerfile: src/BookStore.DbMigrator/Dockerfile.local  
    environment:  
      - OpenIddict__Applications__BookStore_Web__RootUrl=https://localhost:44353  
      - OpenIddict__Applications__BookStore_Swagger__RootUrl=https://localhost:44354  
      - ConnectionStrings__Default=Data Source=sql-server;Initial Catalog=BookStore;User Id=sa;Password=myPassw0rd;MultipleActiveResultSets=true;TrustServerCertificate=True;  
    depends_on:  
      sql-server:  
        condition: service_healthy  
    networks:  
      - abp-network  
    
  sql-server:  
    container_name: sql-server  
    image: mcr.microsoft.com/mssql/server:2019-latest  
    ports:  
      - "1434:1433"  
    environment:  
      SA_PASSWORD: "myPassw0rd"  
      ACCEPT_EULA: "Y"  
    volumes:  
      - sqldata:/var/opt/mssql  
    networks:  
      - abp-network  
    healthcheck:  
      test: /opt/mssql-tools/bin/sqlcmd -S sql-server -U sa -P "myPassw0rd" -Q "SELECT 1" -b -o /dev/null  
      interval: 10s  
      timeout: 3s  
      retries: 10  
      start_period: 10s  
  redis:  
    container_name: redis  
    image: redis:alpine  
    ports:  
      - "6379:6379"  
    networks:  
      - abp-network  
    healthcheck:  
      test: ["CMD", "redis-cli","ping"]  
volumes:  
  sqldata:  
    name: bookstore_sqldata  
networks:  
  abp-network:  
    name: bookstore-network  
    driver: bridge  

You can try to use this and update as you see fit.

As I indicated in the initial support ticket I am running 7.0.2. However let me take what you outlined and apply it to what my current docker-compose is currently.

Can you also show me what your OpenIddictApplications table looks like as well please?

Currently, the generated docker-compose.yml file for a tiered solution only has the 'web' service defined in it, but I'm more concerned about all the url settings needed to run ABP, such as the ones for oidc, etc

On which version did you come across this behavior? This problem should have been fixed on version 7.1.0-rc.

Here is the docker-compose.yml file I've just generated for a tiered mvc project named Acme.BookStore on latest rc version 7.1.0-rc.3:

version: '3.7' 
 
services: 
  bookstore-web: 
    image: acme/bookstore-web:latest 
    container_name: bookstore-web 
    hostname: bookstore-web 
    build: 
      context: ../../ 
      dockerfile: src/Acme.BookStore.Web/Dockerfile.local 
    environment: 
      - ASPNETCORE_URLS=https://+:443;http://+:80; 
      - Kestrel__Certificates__Default__Path=/root/certificate/localhost.pfx 
      - Kestrel__Certificates__Default__Password=91f91912-5ab0-49df-8166-23377efaf3cc 
      - App__SelfUrl=https://localhost:44353 
      - AuthServer__RequireHttpsMetadata=false 
      - AuthServer__IsContainerizedOnLocalhost=true 
      - AuthServer__Authority=https://localhost:44334/ 
      - RemoteServices__Default__BaseUrl=http://bookstore-api 
      - RemoteServices__AbpAccountPublic__BaseUrl=http://bookstore-authserver 
      - AuthServer__MetaAddress=http://bookstore-authserver 
      - Redis__Configuration=redis 
    ports: 
      - "44353:443" 
    depends_on: 
      - bookstore-api 
    restart: on-failure 
    volumes: 
      - ./certs:/root/certificate 
    networks: 
      - abp-network 
 
  bookstore-api: 
    image: acme/bookstore-api:latest 
    container_name: bookstore-api 
    hostname: bookstore-api 
    build: 
      context: ../../ 
      dockerfile: src/Acme.BookStore.HttpApi.Host/Dockerfile.local 
    environment: 
      - ASPNETCORE_URLS=https://+:443;http://+:80; 
      - Kestrel__Certificates__Default__Path=/root/certificate/localhost.pfx 
      - Kestrel__Certificates__Default__Password=91f91912-5ab0-49df-8166-23377efaf3cc 
      - App__SelfUrl=https://localhost:44354 
      - App__HealthCheckUrl=http://bookstore-api/health-status 
      - AuthServer__RequireHttpsMetadata=false 
      - AuthServer__Authority=http://bookstore-authserver 
      - ConnectionStrings__Default=Data Source=sql-server;Initial Catalog=BookStore;User Id=sa;Password=myPassw0rd;MultipleActiveResultSets=true;TrustServerCertificate=True; 
      - Redis__Configuration=redis 
    ports: 
      - "44354:443" 
    depends_on: 
      sql-server: 
        condition: service_healthy 
      redis: 
        condition: service_healthy 
    restart: on-failure 
    volumes: 
      - ./certs:/root/certificate 
    networks: 
      - abp-network 
   
  bookstore-authserver: 
    image: acme/bookstore-authserver:latest 
    container_name: bookstore-authserver 
    build: 
      context: ../../ 
      dockerfile: src/Acme.BookStore.AuthServer/Dockerfile.local 
    environment: 
      - ASPNETCORE_URLS=https://+:443;http://+:80; 
      - App__SelfUrl=https://localhost:44334 
      - App__CorsOrigins=https://localhost:44353,https://localhost:44354 
      - AuthServer__RequireHttpsMetadata=false 
      - AuthServer__Authority=http://bookstore-authserver 
      - Kestrel__Certificates__Default__Path=/root/certificate/localhost.pfx 
      - Kestrel__Certificates__Default__Password=91f91912-5ab0-49df-8166-23377efaf3cc 
      - ConnectionStrings__Default=Data Source=sql-server;Initial Catalog=BookStore;User Id=sa;Password=myPassw0rd;MultipleActiveResultSets=true;TrustServerCertificate=True; 
      - Redis__Configuration=redis 
    ports: 
      - "44334:443" 
    depends_on: 
      sql-server: 
        condition: service_healthy 
      redis: 
        condition: service_healthy 
    restart: on-failure 
    volumes: 
      - ./certs:/root/certificate 
    networks: 
      - abp-network 
 
   
  db-migrator: 
    image: acme/bookstore-db-migrator:latest 
    container_name: db-migrator 
    build: 
      context: ../../ 
      dockerfile: src/BookStore.DbMigrator/Dockerfile.local 
    environment: 
      - OpenIddict__Applications__BookStore_Web__RootUrl=https://localhost:44353 
      - OpenIddict__Applications__BookStore_Swagger__RootUrl=https://localhost:44354 
      - ConnectionStrings__Default=Data Source=sql-server;Initial Catalog=BookStore;User Id=sa;Password=myPassw0rd;MultipleActiveResultSets=true;TrustServerCertificate=True; 
    depends_on: 
      sql-server: 
        condition: service_healthy 
    networks: 
      - abp-network 
   
  sql-server: 
    container_name: sql-server 
    image: mcr.microsoft.com/mssql/server:2019-latest 
    ports: 
      - "1434:1433" 
    environment: 
      SA_PASSWORD: "myPassw0rd" 
      ACCEPT_EULA: "Y" 
    volumes: 
      - sqldata:/var/opt/mssql 
    networks: 
      - abp-network 
    healthcheck: 
      test: /opt/mssql-tools/bin/sqlcmd -S sql-server -U sa -P "myPassw0rd" -Q "SELECT 1" -b -o /dev/null 
      interval: 10s 
      timeout: 3s 
      retries: 10 
      start_period: 10s 
  redis: 
    container_name: redis 
    image: redis:alpine 
    ports: 
      - "6379:6379" 
    networks: 
      - abp-network 
    healthcheck: 
      test: ["CMD", "redis-cli","ping"] 
volumes: 
  sqldata: 
    name: bookstore_sqldata 
networks: 
  abp-network: 
    name: bookstore-network 
    driver: bridge 

You can try to use this and update as you see fit.

As I indicated in the initial support ticket I am running 7.0.2. However let me take what you outlined and apply it to what my current docker-compose is currently.

We're preparing to guide explaining how to run ABP application using docker-compose on localhost environment. Postgres is not supported currently.

You need to update the docker-compose.yml file and update the sql-server service with a postgres image and update the connectionstrings based on that.

Afterwards, please share the problems you come across.

That is fine but I don't use Postgres inside a container docker. I have a local running postgres db installation and in fact I've had this working for a while.

My main issue is getting the 3 tiers (web, api and auth server) talking to each other within the separate containers. When can I expect this 'guide'? Currently, the generated docker-compose.yml file for a tiered solution only has the 'web' service defined in it, but I'm more concerned about all the url settings needed to run ABP, such as the ones for oidc, etc

Showing 91 to 100 of 261 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 20, 2024, 08:30