I suspect that you are using environment value like this:
HQ_ConnectionStrings__DefaultConnection: ‘Server=db;Port=5432;User Id=postgres;Password=pg_password;Database=SurveySolutions’
You need to change it to
HQ_ConnectionStrings__DefaultConnection: ‘Server=RDS_server_IP_address;Port=5432;User Id=postgres;Password=pg_password;Database=SurveySolutions’
Silly question for newbies like me: the DB specified in the DB connection needs to exist already–right? Put in other terms, docker-compose simply points to/mounts the external volume, but does not create it–right?
Recall the server installation instructions (Server Installation), where the parameters of the connection to RDS are acquired interactively. You don’t create the DB manually when you launch Survey Solutions, and a few instances later it gets created all by itself. So if the DB doesn’t exist, it will be the same situation as with a fresh install.
(Note the database name is not asked in the screenshot of the installation wizard at this step).
Unhandled exception. System.ArgumentException: Host can’t be null
at Npgsql.NpgsqlConnectionStringBuilder.Validate()
at Npgsql.NpgsqlConnection.GetPoolAndSettings()
at Npgsql.NpgsqlConnection.set_ConnectionString(String value)
at Npgsql.NpgsqlConnection…ctor(String connectionString)
at WB.Infrastructure.Native.Storage.Postgre.MigrationLock…ctor(String connectionString, Int64 id) in /src/Infrastructure/WB.Infrastructure.Native/Storage/Postgre/MigrationLock.cs:line 15
at WB.Infrastructure.Native.Storage.Postgre.Implementation.DatabaseManagement.CreateDatabase(String connectionString) in /src/Infrastructure/WB.Infrastructure.Native/Storage/Postgre/Implementation/DatabaseManagement.cs:line 29
at WB.Infrastructure.Native.Storage.Postgre.Implementation.DatabaseManagement.InitDatabase(String connectionString, String schemaName) in /src/Infrastructure/WB.Infrastructure.Native/Storage/Postgre/Implementation/DatabaseManagement.cs:line 19
at WB.UI.Headquarters.Services.Quartz.QuartzIntegrationExtensions.RunQuartzMigrations(IServiceProvider services, DbUpgradeSettings dbUpgradeSettings) in /src/UI/WB.UI.Headquarters.Core/Services/Quartz/QuartzIntegrationExtensions.cs:line 96
at WB.UI.Headquarters.Services.Quartz.QuartzIntegrationExtensions.QuartzMigrator.StartAsync(CancellationToken cancellationToken) in /src/UI/WB.UI.Headquarters.Core/Services/Quartz/QuartzIntegrationExtensions.cs:line 142
at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
at WB.UI.Headquarters.Program.Main(String[] args) in /src/UI/WB.UI.Headquarters.Core/Program.cs:line 32
at WB.UI.Headquarters.Program.(String[] args)
[03:08:13 ERR] Headquarters BackgroundService failed
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.ManualResetEventSlim.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at WB.UI.Headquarters.Metrics.DashboardStatisticsService.<>c__DisplayClass7_0.<b__0>d.MoveNext() in /src/UI/WB.UI.Headquarters.Core/Metrics/DashboardStatisticsService.cs:line 45
— End of stack trace from previous location —
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)
[03:08:13 FTL] Headquarters The HostOptions.BackgroundServiceExceptionBehavior is configured to StopHost. A BackgroundService has thrown an unhandled exception, and the IHost instance is stopping. To avoid this behavior, configure this to Ignore; however the BackgroundService will not be restarted.
System.OperationCanceledException: The operation was canceled.
at System.Threading.CancellationToken.ThrowOperationCanceledException()
at System.Threading.ManualResetEventSlim.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at WB.UI.Headquarters.Metrics.DashboardStatisticsService.<>c__DisplayClass7_0.<b__0>d.MoveNext() in /src/UI/WB.UI.Headquarters.Core/Metrics/DashboardStatisticsService.cs:line 45
— End of stack trace from previous location —
at Microsoft.Extensions.Hosting.Internal.Host.TryExecuteBackgroundServiceAsync(BackgroundService backgroundService)