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

Postgres Error: column o.SecretsManagerBeta does not exist #3809

Open
1 task done
NHMPB opened this issue Feb 15, 2024 · 0 comments
Open
1 task done

Postgres Error: column o.SecretsManagerBeta does not exist #3809

NHMPB opened this issue Feb 15, 2024 · 0 comments
Labels
bug bw-unified-deploy An Issue related to Bitwarden unified deployment

Comments

@NHMPB
Copy link

NHMPB commented Feb 15, 2024

Steps To Reproduce

  1. Run a Bitwarden self-hosted instance with unified deployment
  2. Create a new entry or collection in an organization in Bitwarden

Expected Result

The new entry gets created

Actual Result

Error message: An error has occurred. An unhandled server error has occurred.

In the api.log file, there is the following error:

2024-02-15 13:39:27.518 +00:00 [ERR] 42703: column o.SecretsManagerBeta does not exist

POSITION: 679
Npgsql.PostgresException (0x80004005): 42703: column o.SecretsManagerBeta does not exist

POSITION: 679
   at Npgsql.Internal.NpgsqlConnector.<ReadMessage>g__ReadMessageLong|233_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
   at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
   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.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.AsyncEnumerator.InitializeReaderAsync(AsyncEnumerator enumerator, CancellationToken cancellationToken)
   at Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()
   at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)
   at Bit.Infrastructure.EntityFramework.Repositories.Repository`3.GetByIdAsync(TId id) in /source/src/Infrastructure.EntityFramework/Repositories/Repository.cs:line 28
   at Bit.Core.Services.CollectionService.SaveAsync(Collection collection, IEnumerable`1 groups, IEnumerable`1 users) in /source/src/Core/Services/Implementations/CollectionService.cs:line 49
   at Bit.Api.Controllers.CollectionsController.Post(Guid orgId, CollectionRequestModel model) in /source/src/Api/Controllers/CollectionsController.cs:line 253
   at lambda_method811(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__Logged|12_1(ControllerActionInvoker invoker)
   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.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
  Exception data:
    Severity: ERROR
    SqlState: 42703
    MessageText: column o.SecretsManagerBeta does not exist
    Position: 679
    File: parse_relation.c
    Line: 3698
    Routine: errorMissingColumn

Screenshots or Videos

No response

Additional Context

We were successfully running on version 2024.1.1-beta in the past and didn't notice this issue. We are running it in AWS ECS (Fargate). From time to time, the service restarts and pulls the latest image (image tag beta). We noticed today, when we were analyzing this issue, that the latest version does not start to to another bug (#3755). We are not sure if this is related, maybe there was a DB migration already applied during the failed startup of the new version, which is incompatible with the version 2024.1.1-beta. Maybe ECS cancelled the task during a migration because of the failed health check. Or maybe it's totally unrelated. As of now, we have image tag 2024.1.2-beta deployed, as we tried to rollback from the failing beta tag.

Githash Version

dca8d00-dirty

Environment Details

AWS ECS Fargate

Database Image

AWS RDS Aurora Postgres 15.2

Issue-Link

#2480

Issue Tracking Info

  • I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.
@NHMPB NHMPB added bug bw-unified-deploy An Issue related to Bitwarden unified deployment labels Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bw-unified-deploy An Issue related to Bitwarden unified deployment
Projects
None yet
Development

No branches or pull requests

1 participant