Dear all:
Again I am seeking your support because we are unable to use the data export functionality within the web server. When we ran the diagnostic, we got:
Also, I am sharing an excerpt of the log of the export service where the table interview__references is referenced. Any suggestions are welcome.
2023-01-09 13:05:19.314 +01:00 [INF] Application is shutting down...
2023-01-09 13:05:24.324 +01:00 [INF] [1] Cancellation requested. Stopping JobWorker
2023-01-09 13:05:24.326 +01:00 [INF] CancellationToken cancel request received.
2023-01-09 13:05:24.328 +01:00 [INF] Stopped background service: CleanupService
2023-01-09 13:05:24.328 +01:00 [INF] Stopped background service: WorkCancellationTrackService
2023-01-09 13:05:24.328 +01:00 [INF] Stopped background service: JobWorkersManageService
2023-01-09 13:12:56.017 +01:00 [INF] Job scheduler schema migration completed
2023-01-09 13:12:56.027 +01:00 [INF] Started background service: CleanupService
2023-01-09 13:12:56.027 +01:00 [INF] Started background service: WorkCancellationTrackService
2023-01-09 13:12:56.037 +01:00 [INF] [1] Start new worker
2023-01-09 13:12:56.092 +01:00 [INF] Started background service: JobWorkersManageService
2023-01-09 13:12:56.093 +01:00 [INF] Export service starting. version 22.12.1 (build 33634)
2023-01-09 13:12:56.099 +01:00 [INF] JobProgressReporterBackgroundService started
2023-01-09 13:12:56.105 +01:00 [INF] Now listening on: http://127.0.0.1:54251
2023-01-09 13:12:56.105 +01:00 [INF] Application started. Press Ctrl+C to shut down.
2023-01-09 13:12:56.105 +01:00 [INF] Hosting environment: Production
2023-01-09 13:12:56.105 +01:00 [INF] Content root path: e:\Survey Solutions\Site
2023-01-09 16:52:26.122 +01:00 [ERR] Failed executing DbCommand (0ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
CREATE TABLE interview__references (
interview_id uuid NOT NULL,
questionnaire_id text NULL,
CONSTRAINT "PK_interview__references" PRIMARY KEY (interview_id)
);
2023-01-09 16:52:26.150 +01:00 [ERR] Connection id "0HMNI7BBAFE5J", Request id "0HMNI7BBAFE5J:00000002": An unhandled exception was thrown by the application.
Npgsql.PostgresException (0x80004005): 42P07: relation "interview__references" already exists
at Npgsql.Internal.NpgsqlConnector.<ReadMessage>g__ReadMessageLong|211_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken)
at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken)
at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable`1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable`1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable`1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable`1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.MigrateAsync(String targetMigration, CancellationToken cancellationToken)
at WB.Services.Export.Infrastructure.TenantDbContext.CheckSchemaVersionAndMigrate(CancellationToken cancellationToken)
at WB.Services.Export.Infrastructure.TenantDbContext.EnsureMigrated(CancellationToken cancellationToken)
at WB.Services.Export.Host.Jobs.PostgresDataExportProcessesService.GetAllProcessesAsync(Boolean runningOnly, CancellationToken token)
at WB.Services.Export.Host.Controllers.JobController.GetAllJobsList(CancellationToken token)
at lambda_method36074(Closure , Object )
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
Exception data:
Severity: ERROR
SqlState: 42P07
MessageText: relation "interview__references" already exists
File: d:\pginstaller_13.auto\postgres.windows-x64\src\backend\catalog\heap.c
Line: 1164
Routine: heap_create_with_catalog
2023-01-09 16:52:28.483 +01:00 [ERR] Failed executing DbCommand (0ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
CREATE TABLE interview__references (
interview_id uuid NOT NULL,
questionnaire_id text NULL,
CONSTRAINT "PK_interview__references" PRIMARY KEY (interview_id)
);
2023-01-09 16:52:28.485 +01:00 [ERR] Connection id "0HMNI7BBAFE5K", Request id "0HMNI7BBAFE5K:00000002": An unhandled exception was thrown by the application.
Npgsql.PostgresException (0x80004005): 42P07: relation "interview__references" already exists
at Npgsql.Internal.NpgsqlConnector.<ReadMessage>g__ReadMessageLong|211_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken)
at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken)
at Npgsql.NpgsqlCommand.ExecuteNonQuery(Boolean async, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable`1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable`1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable`1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable`1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.MigrateAsync(String targetMigration, CancellationToken cancellationToken)
at WB.Services.Export.Infrastructure.TenantDbContext.CheckSchemaVersionAndMigrate(CancellationToken cancellationToken)
at WB.Services.Export.Infrastructure.TenantDbContext.EnsureMigrated(CancellationToken cancellationToken)
at WB.Services.Export.Host.Jobs.PostgresDataExportProcessesService.GetAllProcessesAsync(Boolean runningOnly, CancellationToken token)
at WB.Services.Export.Host.Controllers.JobController.GetAllJobsList(CancellationToken token)
at lambda_method36074(Closure , Object )
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
Exception data:
Severity: ERROR
SqlState: 42P07
MessageText: relation "interview__references" already exists
File: d:\pginstaller_13.auto\postgres.windows-x64\src\backend\catalog\heap.c
Line: 1164
Routine: heap_create_with_catalog
2023-01-09 16:52:30.742 +01:00 [ERR] Failed executing DbCommand (0ms) [Parameters=[], CommandType='"Text"', CommandTimeout='30']
CREATE TABLE interview__references (
interview_id uuid NOT NULL,
questionnaire_id text NULL,
CONSTRAINT "PK_interview__references" PRIMARY KEY (interview_id)
);