Thread 'main' panicked at 'Error running migrations' #1674

Closed
opened 2026-04-06 02:10:58 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @kenlasko on 3/29/2023

Subject of the issue

Upgrading from 1.27 to 1.28, the container keeps crashing and restarting.

Deployment environment

K3S version v1.25.7+k3s1

  • vaultwarden version: 1.28.0

  • Install method:
    Kubernetes install

  • MySQL/MariaDB or PostgreSQL version: MariaDB 10.6.12-debian-11-r6

  • Other relevant details:
    The error points to a duplicate column name 'reset_password_key'. I can see there is a reset_password_key column in users_organizations table. It is currently NULL for all rows.

Steps to reproduce

  • Deleted existing VaultWarden pod, which prompted creating new pod with latest version

Expected behaviour

Expect it to start up without getting into a crashloop :)

Actual behaviour

Endless crashloop

Troubleshooting data

[2023-03-29 14:19:07.551][panic][ERROR] thread 'main' panicked at 'Error running migrations: QueryError(DieselMigrationName { name: "2023-01-06-151600_add_reset_password_support", version: MigrationVersion("20230106151600") }, DatabaseError(Unknown, "Duplicate column name 'reset_password_key'"))': src/db/mod.rs:471
   0: vaultwarden::init_logging::{{closure}}
   1: std::panicking::rust_panic_with_hook
   2: std::panicking::begin_panic_handler::{{closure}}
   3: std::sys_common::backtrace::__rust_end_short_backtrace
   4: rust_begin_unwind
   5: core::panicking::panic_fmt
   6: core::result::unwrap_failed
   7: vaultwarden::db::mysql_migrations::run_migrations
   8: vaultwarden::main::{{closure}}
   9: tokio::runtime::park::CachedParkThread::block_on
  10: tokio::runtime::scheduler::multi_thread::MultiThread::block_on
  11: tokio::runtime::runtime::Runtime::block_on
  12: rocket::async_main
  13: vaultwarden::main
  14: std::sys_common::backtrace::__rust_begin_short_backtrace
  15: std::rt::lang_start::{{closure}}
  16: std::rt::lang_start_internal
  17: main
  18: __libc_start_main
  19: _start
*Originally created by @kenlasko on 3/29/2023* ### Subject of the issue Upgrading from 1.27 to 1.28, the container keeps crashing and restarting. ### Deployment environment K3S version v1.25.7+k3s1 * vaultwarden version: 1.28.0 * Install method: Kubernetes install * MySQL/MariaDB or PostgreSQL version: MariaDB 10.6.12-debian-11-r6 * Other relevant details: The error points to a duplicate column name 'reset_password_key'. I can see there is a reset_password_key column in users_organizations table. It is currently NULL for all rows. ### Steps to reproduce - Deleted existing VaultWarden pod, which prompted creating new pod with latest version ### Expected behaviour Expect it to start up without getting into a crashloop :) ### Actual behaviour Endless crashloop ### Troubleshooting data ``` [2023-03-29 14:19:07.551][panic][ERROR] thread 'main' panicked at 'Error running migrations: QueryError(DieselMigrationName { name: "2023-01-06-151600_add_reset_password_support", version: MigrationVersion("20230106151600") }, DatabaseError(Unknown, "Duplicate column name 'reset_password_key'"))': src/db/mod.rs:471 0: vaultwarden::init_logging::{{closure}} 1: std::panicking::rust_panic_with_hook 2: std::panicking::begin_panic_handler::{{closure}} 3: std::sys_common::backtrace::__rust_end_short_backtrace 4: rust_begin_unwind 5: core::panicking::panic_fmt 6: core::result::unwrap_failed 7: vaultwarden::db::mysql_migrations::run_migrations 8: vaultwarden::main::{{closure}} 9: tokio::runtime::park::CachedParkThread::block_on 10: tokio::runtime::scheduler::multi_thread::MultiThread::block_on 11: tokio::runtime::runtime::Runtime::block_on 12: rocket::async_main 13: vaultwarden::main 14: std::sys_common::backtrace::__rust_begin_short_backtrace 15: std::rt::lang_start::{{closure}} 16: std::rt::lang_start_internal 17: main 18: __libc_start_main 19: _start ```
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/vaultwarden#1674