Malformed database, now can't start server #990

Closed
opened 2026-02-04 23:33:13 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @mhaimes on GitHub (Mar 24, 2021).

Subject of the issue

[2021-03-24 17:29:30.983][panic][ERROR] thread 'main' panicked at 'Failed to turn on WAL: DatabaseError(__Unknown, "f
ile is not a database")': src/db/mod.rs:275

Deployment environment

running on a google f1-micro instance in a docker container with all the recommended settings. Suddenly, sometime over the last day or two I'm not sure, it looks like it decided my database is corrupted.. now I can't even start the server or get my information out of it.

  • bitwarden_rs version:
  • Install method:
    docker image
  • Clients used:
    web vault, desktop, browser extensions, android, etc.
  • Reverse proxy and version:
    latest version as of 3/24/2021
  • MySQL/MariaDB or PostgreSQL version:
    it uses sqlite
  • Other relevant details:

Steps to reproduce

It happens when I try to start the bitwarden docker image, I assume the server tries to start and dies because it can't parse the daatabase.

Expected behaviour

I expected, like normally, when i do a restart, I stop the docker image, grab the newest version, and start it again

Actual behaviour

I am now in a state where I am completely unable to start the server

Troubleshooting data

[2021-03-24 17:29:30.983][panic][ERROR] thread 'main' panicked at 'Failed to turn on WAL: DatabaseError(__Unknown, "f
ile is not a database")': src/db/mod.rs:275
0: bitwarden_rs::init_logging::{{closure}}
1: std::panicking::rust_panic_with_hook
at rustc/1d0d76f8dd4f5f6ecbeab575b87edaf1c9f56bb8/library/std/src/panicking.rs:595:17
2: std::panicking::begin_panic_handler::{{closure}}
at rustc/1d0d76f8dd4f5f6ecbeab575b87edaf1c9f56bb8/library/std/src/panicking.rs:497:13
3: std::sys_common::backtrace::__rust_end_short_backtrace
at rustc/1d0d76f8dd4f5f6ecbeab575b87edaf1c9f56bb8/library/std/src/sys_common/backtrace.rs:141:18
4: rust_begin_unwind
at rustc/1d0d76f8dd4f5f6ecbeab575b87edaf1c9f56bb8/library/std/src/panicking.rs:493:5
5: core::panicking::panic_fmt
at rustc/1d0d76f8dd4f5f6ecbeab575b87edaf1c9f56bb8/library/core/src/panicking.rs:92:14
6: core::option::expect_none_failed
at rustc/1d0d76f8dd4f5f6ecbeab575b87edaf1c9f56bb8/library/core/src/option.rs:1266:5
7: bitwarden_rs::db::DbPool::from_config
8: bitwarden_rs::util::retry_db
9: bitwarden_rs::main
10: std::sys_common::backtrace::__rust_begin_short_backtrace
11: std::rt::lang_start::{{closure}}
12: core::ops::function::impls::<impl core::ops::function::FnOnce for &F>::call_once
at rustc/1d0d76f8dd4f5f6ecbeab575b87edaf1c9f56bb8/library/core/src/ops/function.rs:259:13
std::panicking::try::do_call
at rustc/1d0d76f8dd4f5f6ecbeab575b87edaf1c9f56bb8/library/std/src/panicking.rs:379:40
std::panicking::try
at rustc/1d0d76f8dd4f5f6ecbeab575b87edaf1c9f56bb8/library/std/src/panicking.rs:343:19
std::panic::catch_unwind
at rustc/1d0d76f8dd4f5f6ecbeab575b87edaf1c9f56bb8/library/std/src/panic.rs:396:14
std::rt::lang_start_internal
at rustc/1d0d76f8dd4f5f6ecbeab575b87edaf1c9f56bb8/library/std/src/rt.rs:51:25
13: main
14: __libc_start_main
15: _start

Originally created by @mhaimes on GitHub (Mar 24, 2021). <!-- # ### NOTE: Please update to the latest version of bitwarden_rs before reporting an issue! This saves you and us a lot of time and troubleshooting. See: * https://github.com/dani-garcia/bitwarden_rs/issues/1180 * https://github.com/dani-garcia/bitwarden_rs/wiki/Updating-the-bitwarden-image # ### --> <!-- Please fill out the following template to make solving your problem easier and faster for us. This is only a guideline. If you think that parts are unnecessary for your issue, feel free to remove them. Remember to hide/redact personal or confidential information, such as passwords, IP addresses, and DNS names as appropriate. --> ### Subject of the issue <!-- Describe your issue here. --> [2021-03-24 17:29:30.983][panic][ERROR] thread 'main' panicked at 'Failed to turn on WAL: DatabaseError(__Unknown, "f ile is not a database")': src/db/mod.rs:275 ### Deployment environment running on a google f1-micro instance in a docker container with all the recommended settings. Suddenly, sometime over the last day or two I'm not sure, it looks like it decided my database is corrupted.. now I can't even start the server or get my information out of it. <!-- ========================================================================================= Preferably, use the `Generate Support String` button on the admin page's Diagnostics tab. That will auto-generate most of the info requested in this section. ========================================================================================= --> <!-- The version number, obtained from the logs (at startup) or the admin diagnostics page --> <!-- This is NOT the version number shown on the web vault, which is versioned separately from bitwarden_rs --> <!-- Remember to check if your issue exists on the latest version first! --> * bitwarden_rs version: <!-- How the server was installed: Docker image, OS package, built from source, etc. --> * Install method: docker image * Clients used: <!-- web vault, desktop, Android, iOS, etc. (if applicable) --> web vault, desktop, browser extensions, android, etc. * Reverse proxy and version: <!-- if applicable --> latest version as of 3/24/2021 * MySQL/MariaDB or PostgreSQL version: <!-- if applicable --> it uses sqlite * Other relevant details: ### Steps to reproduce <!-- Tell us how to reproduce this issue. What parameters did you set (differently from the defaults) and how did you start bitwarden_rs? --> It happens when I try to start the bitwarden docker image, I assume the server tries to start and dies because it can't parse the daatabase. ### Expected behaviour <!-- Tell us what you expected to happen --> I expected, like normally, when i do a restart, I stop the docker image, grab the newest version, and start it again ### Actual behaviour <!-- Tell us what actually happened --> I am now in a state where I am completely unable to start the server ### Troubleshooting data <!-- Share any log files, screenshots, or other relevant troubleshooting data --> [2021-03-24 17:29:30.983][panic][ERROR] thread 'main' panicked at 'Failed to turn on WAL: DatabaseError(__Unknown, "f ile is not a database")': src/db/mod.rs:275 0: bitwarden_rs::init_logging::{{closure}} 1: std::panicking::rust_panic_with_hook at rustc/1d0d76f8dd4f5f6ecbeab575b87edaf1c9f56bb8/library/std/src/panicking.rs:595:17 2: std::panicking::begin_panic_handler::{{closure}} at rustc/1d0d76f8dd4f5f6ecbeab575b87edaf1c9f56bb8/library/std/src/panicking.rs:497:13 3: std::sys_common::backtrace::__rust_end_short_backtrace at rustc/1d0d76f8dd4f5f6ecbeab575b87edaf1c9f56bb8/library/std/src/sys_common/backtrace.rs:141:18 4: rust_begin_unwind at rustc/1d0d76f8dd4f5f6ecbeab575b87edaf1c9f56bb8/library/std/src/panicking.rs:493:5 5: core::panicking::panic_fmt at rustc/1d0d76f8dd4f5f6ecbeab575b87edaf1c9f56bb8/library/core/src/panicking.rs:92:14 6: core::option::expect_none_failed at rustc/1d0d76f8dd4f5f6ecbeab575b87edaf1c9f56bb8/library/core/src/option.rs:1266:5 7: bitwarden_rs::db::DbPool::from_config 8: bitwarden_rs::util::retry_db 9: bitwarden_rs::main 10: std::sys_common::backtrace::__rust_begin_short_backtrace 11: std::rt::lang_start::{{closure}} 12: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once at rustc/1d0d76f8dd4f5f6ecbeab575b87edaf1c9f56bb8/library/core/src/ops/function.rs:259:13 std::panicking::try::do_call at rustc/1d0d76f8dd4f5f6ecbeab575b87edaf1c9f56bb8/library/std/src/panicking.rs:379:40 std::panicking::try at rustc/1d0d76f8dd4f5f6ecbeab575b87edaf1c9f56bb8/library/std/src/panicking.rs:343:19 std::panic::catch_unwind at rustc/1d0d76f8dd4f5f6ecbeab575b87edaf1c9f56bb8/library/std/src/panic.rs:396:14 std::rt::lang_start_internal at rustc/1d0d76f8dd4f5f6ecbeab575b87edaf1c9f56bb8/library/std/src/rt.rs:51:25 13: main 14: __libc_start_main 15: _start
Author
Owner

@BlackDex commented on GitHub (Mar 24, 2021):

Seems like the storage you use is either full, or doesn't support Locking which is needed for WAL.

@BlackDex commented on GitHub (Mar 24, 2021): Seems like the storage you use is either full, or doesn't support Locking which is needed for WAL.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#990