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

Unexpected error when logging into server #206

Open
RonV42 opened this issue Jan 31, 2024 · 7 comments
Open

Unexpected error when logging into server #206

RonV42 opened this issue Jan 31, 2024 · 7 comments
Labels
question Further information is requested

Comments

@RonV42
Copy link

RonV42 commented Jan 31, 2024

Running on Proxmox and did the latest pull from Docker and every client receives "unepxected error" when logging though web. Clients fail on error when logging in from mobile device and the chrome plugin. I started the docker container to view the output and there is a repeating aborted connection message which I was also seeing in the December builds but no additional items that lead to why the error is happening. I rolled back to December and client login is working again. Let me know what addition info you need.

The old version I migrated from was: Version 2023.12.0
The version from docker hub latest "beta" tag

bitwarden-bitwarden-1  | 2024-01-31 15:58:12,690 INFO success: admin entered RUNNING state, process has stayed up for > than 15 seconds (startsecs)
bitwarden-db-1         | 2024-01-31 15:58:20 64 [Warning] Aborted connection 64 to db: 'unconnected' user: 'bitwarden' host: '172.18.0.3' (Got an error reading communication packets)
bitwarden-db-1         | 2024-01-31 15:58:20 66 [Warning] Aborted connection 66 to db: 'bitwarden_vault' user: 'bitwarden' host: '172.18.0.3' (Got an error reading communication packets)
bitwarden-bitwarden-1  | 2024-01-31 15:58:21,408 INFO exited: admin (terminated by SIGABRT (core dumped); not expected)
bitwarden-bitwarden-1  | 2024-01-31 15:58:22,410 INFO spawned: 'admin' with pid 572
bitwarden-bitwarden-1  | 2024-01-31 15:58:37,429 INFO success: admin entered RUNNING state, process has stayed up for > than 15 seconds (startsecs)
bitwarden-db-1         | 2024-01-31 15:58:45 70 [Warning] Aborted connection 70 to db: 'bitwarden_vault' user: 'bitwarden' host: '172.18.0.3' (Got an error reading communication packets)
bitwarden-db-1         | 2024-01-31 15:58:45 68 [Warning] Aborted connection 68 to db: 'unconnected' user: 'bitwarden' host: '172.18.0.3' (Got an error reading communication packets)
bitwarden-bitwarden-1  | 2024-01-31 15:58:46,312 INFO exited: admin (terminated by SIGABRT (core dumped); not expected)
bitwarden-bitwarden-1  | 2024-01-31 15:58:47,315 INFO spawned: 'admin' with pid 594
bitwarden-bitwarden-1  | 2024-01-31 15:59:02,333 INFO success: admin entered RUNNING state, process has stayed up for > than 15 seconds (startsecs)
bitwarden-db-1         | 2024-01-31 15:59:10 72 [Warning] Aborted connection 72 to db: 'unconnected' user: 'bitwarden' host: '172.18.0.3' (Got an error reading communication packets)
bitwarden-db-1         | 2024-01-31 15:59:10 74 [Warning] Aborted connection 74 to db: 'bitwarden_vault' user: 'bitwarden' host: '172.18.0.3' (Got an error reading communication packets
@Greenderella
Copy link
Member

Hi there,

I assume you are running a unified server. By any chance are you seeing this error in your admin logs? bitwarden/server#3651 (comment)

@Greenderella Greenderella added the question Further information is requested label Feb 1, 2024
@RonV42
Copy link
Author

RonV42 commented Feb 1, 2024

Yes I just shelled into the docker container and dumped the admin log and getting the same type of errors.

fail: Microsoft.EntityFrameworkCore.Database.Command[20102]
      Failed executing DbCommand (2ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
      CALL POMELO_BEFORE_DROP_PRIMARY_KEY(NULL, 'Grant');
      ALTER TABLE `Grant` DROP PRIMARY KEY;
Unhandled exception. MySqlConnector.MySqlException (0x80004005): Can't DROP INDEX `PRIMARY`; check that it exists
   at MySqlConnector.Core.ResultSet.ReadResultSetHeaderAsync(IOBehavior ioBehavior) in /_/src/MySqlConnector/Core/ResultSet.cs:line 43
   at MySqlConnector.MySqlDataReader.ActivateResultSet(CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlDataReader.cs:line 130
   at MySqlConnector.MySqlDataReader.CreateAsync(CommandListPosition commandListPosition, ICommandPayloadCreator payloadCreator, IDictionary`2 cachedProcedures, IMySqlCommand command, CommandBehavior behavior, Activity activity, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlDataReader.cs:line 468
   at MySqlConnector.Core.CommandExecutor.ExecuteReaderAsync(IReadOnlyList`1 commands, ICommandPayloadCreator payloadCreator, CommandBehavior behavior, Activity activity, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/CommandExecutor.cs:line 56
   at MySqlConnector.MySqlCommand.ExecuteNonQueryAsync(IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlCommand.cs:line 296
   at MySqlConnector.MySqlCommand.ExecuteNonQuery() in /_/src/MySqlConnector/MySqlCommand.cs:line 107
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQuery(RelationalCommandParameterObject parameterObject)
   at Microsoft.EntityFrameworkCore.Migrations.MigrationCommand.ExecuteNonQuery(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)
   at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQuery(IEnumerable`1 migrationCommands, IRelationalConnection connection)
   at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.Migrate(String targetMigration)
   at Microsoft.EntityFrameworkCore.RelationalDatabaseFacadeExtensions.Migrate(DatabaseFacade databaseFacade)
   at Bit.MySqlMigrations.MySqlDbMigrator.MigrateDatabase(Boolean enableLogging, CancellationToken cancellationToken) in /source/util/MySqlMigrations/MySqlDbMigrator.cs:line 30
   at Bit.Admin.HostedServices.DatabaseMigrationHostedService.StartAsync(CancellationToken cancellationToken) in /source/src/Admin/HostedServices/DatabaseMigrationHostedService.cs:line 29
   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 Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
   at Bit.Admin.Program.Main(String[] args) in /source/src/Admin/Program.cs:line 9

@RonV42
Copy link
Author

RonV42 commented Feb 2, 2024

After reading thought that topic the question I have is what is the correct procedure to resolve?

Shutdown December version of Bitwarden, Pull lastest beta, Start the containers and then run the SQL

or

Shutdown only the Bitwarden container in the December build, run the SQL, pull the latest beta, start containers

The SQL I assume to be run in the MariaDB container is:

mysql -h localhost -P 3306 --protocol=tcp -u bitwarden -p bitwarden_vault
ALTER TABLE `Grant` DROP COLUMN `Id`;
ALTER TABLE `Grant` ADD PRIMARY KEY `PK_Grant` (`Key`); 

@Greenderella
Copy link
Member

If you are running the December release, you can just do a standard upgrade, and you shouldn't see an issue.

@RonV42
Copy link
Author

RonV42 commented Feb 6, 2024

Just pulled and started containers. Still seeing the SQL Errors:

fail: Microsoft.EntityFrameworkCore.Database.Command[20102]
      Failed executing DbCommand (3ms) [Parameters=[], CommandType='Text', CommandTimeout='30']
      CALL POMELO_BEFORE_DROP_PRIMARY_KEY(NULL, 'Grant');
      ALTER TABLE `Grant` DROP PRIMARY KEY;
Unhandled exception. MySqlConnector.MySqlException (0x80004005): Can't DROP INDEX `PRIMARY`; check that it exists
   at MySqlConnector.Core.ResultSet.ReadResultSetHeaderAsync(IOBehavior ioBehavior) in /_/src/MySqlConnector/Core/ResultSet.cs:line 43
   at MySqlConnector.MySqlDataReader.ActivateResultSet(CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlDataReader.cs:line 130
   at MySqlConnector.MySqlDataReader.CreateAsync(CommandListPosition commandListPosition, ICommandPayloadCreator payloadCreator, IDictionary`2 cachedProcedures, IMySqlCommand command, CommandBehavior behavior, Activity activity, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlDataReader.cs:line 468
   at MySqlConnector.Core.CommandExecutor.ExecuteReaderAsync(IReadOnlyList`1 commands, ICommandPayloadCreator payloadCreator, CommandBehavior behavior, Activity activity, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/CommandExecutor.cs:line 56
   at MySqlConnector.MySqlCommand.ExecuteNonQueryAsync(IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlCommand.cs:line 296
   at MySqlConnector.MySqlCommand.ExecuteNonQuery() in /_/src/MySqlConnector/MySqlCommand.cs:line 107
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQuery(RelationalCommandParameterObject parameterObject)
   at Microsoft.EntityFrameworkCore.Migrations.MigrationCommand.ExecuteNonQuery(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)
   at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQuery(IEnumerable`1 migrationCommands, IRelationalConnection connection)
   at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.Migrate(String targetMigration)
   at Microsoft.EntityFrameworkCore.RelationalDatabaseFacadeExtensions.Migrate(DatabaseFacade databaseFacade)
   at Bit.MySqlMigrations.MySqlDbMigrator.MigrateDatabase(Boolean enableLogging, CancellationToken cancellationToken) in /source/util/MySqlMigrations/MySqlDbMigrator.cs:line 30
   at Bit.Admin.HostedServices.DatabaseMigrationHostedService.StartAsync(CancellationToken cancellationToken) in /source/src/Admin/HostedServices/DatabaseMigrationHostedService.cs:line 29
   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 Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
   at Bit.Admin.Program.Main(String[] args) in /source/src/Admin/Program.cs:line 9

@wardragon
Copy link

wardragon commented Feb 7, 2024

I opened thicket #197, like this. Still have log errors on mysldb. But the mysql upgrade is done even if only upgrade bitwarden container, and not mysql?

@cvondraoti
Copy link

Seeing the exact same issue. Need help ASAP as this is my only vault.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants