<!-- gh-comment-id:1364635622 -->
@BlackDex commented on GitHub (Dec 25, 2022):
You probably have a charset and/or collation error.
See: https://github.com/dani-garcia/vaultwarden/wiki/Using-the-MariaDB-%28MySQL%29-Backend#foreign-key-errors-collation-and-charset
And Merry X-Mass indeed.
You're completely right. I migrated the server a few weeks ago and completely forgot setting the charset correctly when re-creating the DB.
Thanks for the quick help and have a nice day!
<!-- gh-comment-id:1364660036 -->
@Sommerwiesel commented on GitHub (Dec 25, 2022):
You're completely right. I migrated the server a few weeks ago and completely forgot setting the charset correctly when re-creating the DB.
Thanks for the quick help and have a nice day!
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @Sommerwiesel on GitHub (Dec 25, 2022).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/3038
Subject of the issue
The database migration for group fails after the update to 1.27.0
Your environment (Generated via diagnostics page)
This environment is taken from 1.26.0 because 1.27.0 won't start correctly.
Config (Generated via diagnostics page)
Show Running Config
Environment settings which are overridden:
vaultwarden version: 1.26.0 -> 1.27.0
Install method: Docker image
Clients used: All of them
Reverse proxy and version: NGINX 1.18
MySQL/MariaDB or PostgreSQL version: MariaDB 10.5.18
Docker-Compose.yml
Steps to reproduce
Expected behaviour
Vaultwarden performs DB migration and works as expected
Actual behaviour
Vaultwarden fails to do DB migrations and exits
Troubleshooting data
[2022-12-25 00:41:38.018][panic][ERROR] thread 'main' panicked at 'Error running migrations: QueryError(DieselMigrationName { name: "2022-07-27-110000_add_group_support", version: MigrationVersion("20220727110000") }, DatabaseError(Unknown, "Can't create table
passwdvault.groups(errno: 150 "Foreign key constraint is incorrectly formed")"))': src/db/mod.rs:4740: 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::db::DbPool::from_config
9: vaultwarden::main::{{closure}}
10: tokio::runtime::park::CachedParkThread::block_on
11: tokio::runtime::scheduler::multi_thread::MultiThread::block_on
12: tokio::runtime::runtime::Runtime::block_on
13: rocket::async_main
14: vaultwarden::main
15: std::sys_common::backtrace::__rust_begin_short_backtrace
16: std::rt::lang_start::{{closure}}
17: std::rt::lang_start_internal
18: main
19: __libc_start_main
20: _start
@Sommerwiesel commented on GitHub (Dec 25, 2022):
Oh, and happy christmas everyone :)
@BlackDex commented on GitHub (Dec 25, 2022):
You probably have a charset and/or collation error.
See: https://github.com/dani-garcia/vaultwarden/wiki/Using-the-MariaDB-%28MySQL%29-Backend#foreign-key-errors-collation-and-charset
And Merry X-Mass indeed.
@Sommerwiesel commented on GitHub (Dec 25, 2022):
You're completely right. I migrated the server a few weeks ago and completely forgot setting the charset correctly when re-creating the DB.
Thanks for the quick help and have a nice day!