mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-04-25 17:25:57 +03:00
[GH-ISSUE #399] Bitwarden_rs Docker on LCOW: Database errors #229
Labels
No labels
SSO
Third party
better for forum
bug
bug
documentation
duplicate
enhancement
future Vault
future Vault
future Vault
good first issue
help wanted
low priority
notes
pull-request
question
troubleshooting
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vaultwarden#229
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @djpbessems on GitHub (Feb 15, 2019).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/399
I'm trying to run the bitwarden_rs dockerimage on Windows Server 2019 with Linux Containers On Windows (LCOW).
I'm using the command
docker run -d --name bitwarden -v C:/path/to/bitwarden/conf:/data -p 80:80 -e "RUST_BACKTRACE=1" mprasil/bitwarden:latestwhich results in the error
thread 'main' panicked at 'Failed to turn on WAL: DatabaseError(__Unknown, "disk I/O error")'(it creates several files in C:\path\to\bitwarden\conf)and subsequent runs change the error to
thread 'main' panicked at 'Can't run migrations: QueryError(DatabaseError(__Unknown, "disk I/O error"))'Permissions for the path C:\path\to\bitwarden\conf are set to FullControl for Users (temporarily for testing purposes); but the errors remain.
What possible troubleshooting steps could I still follow?
@BlackDex commented on GitHub (Feb 16, 2019):
What i can find quickly on the internet is that this is an LCOW issue.
I read stuff about disable the shared drive, reboot, re-enable the shared drive again. Or try the reset credentials link at that same menu. It seems to have something to do with the credentials not being set right for the LCOW usage.
This issue has nothing to do with bitwarden_rs it self, since it only uses normal filesystem operations and is restricted by what the docker environment allows.
Hope the credentials part in the LCOW settings will help you.
Please let us know if that solves your issue.
@mprasil commented on GitHub (Feb 16, 2019):
Yeah, we're enabling
WALhere for performance reasons and it sounds like your filesystem (or whatever windows emulates) doesn't support that in current configuration. Try to follow @BlackDex's advice to see if you can enable it.Alternatively we might look into optionally not enabling
WAL. I think it would be a useful feature for cases like this, but in the past we had someSQLITE_BUSYrelated issues where some operations (especially "heavy ones") sometimes (rarely, but still) failed. We've since added some code handling these problems, but disablingWALwould have to go with the understanding, that it's somewhat non-standard configuration that might sometimes cause issues.@dani-garcia commented on GitHub (Feb 16, 2019):
Yeah, WAL on LCOW seems to be a problem (https://github.com/docker/for-win/issues/1385#issuecomment-385177466, https://github.com/Sonarr/Sonarr/issues/1886).
As a possible alternative, you could install Rust and compile the project yourself. It should work fine in that case.
@djpbessems commented on GitHub (Feb 17, 2019):
@BlackDex I'm using Docker for Windows Enterprise Edition; it does not have the weird requirement of sharing your entire volumes.
Probably I'll have to bite the bullet and dive in this matter: I'll try and create a new dockerimage based on Windows Nanoserver so LCOW is not involved. Mind if I ask for pointers now and then? Once I get it working you can offer it as a semi-official alternative :)
@dani-garcia commented on GitHub (Feb 17, 2019):
Sure thing, we can help you here, or on the matrix chat room. The link is on the Readme.
@mprasil commented on GitHub (Feb 18, 2019):
I've created a PR #404 that will allow you to not use WAL by setting the
ENABLE_DB_WALvariable tofalse.@djpbessems commented on GitHub (Feb 18, 2019):
Oh, awesome; are you going to merge and build that into mprasil/bitwarden dockerimage? Or should I build it myself and try?
@mprasil commented on GitHub (Feb 18, 2019):
The idea is that this will be added to the official image soon if @dani-garcia is okay with the changes. So you can wait, but can also build your own image in the meantime if you're super eager to try it now. 😄
@mprasil commented on GitHub (Feb 18, 2019):
Changes are now merged, you can see the documentation here
Note that the build was just scheduled and will take about an hour. If you want to test it now, you can use our dev image that was built just now:
bitwardenrs/dev:master, otherwise wait about two hours and usemprasil/bitwardenas usual.Let us know if it runs fine with WAL disabled.
@djpbessems commented on GitHub (Feb 19, 2019):
Thanks for this; it seems to run quite stable regardless :)
@mprasil commented on GitHub (Feb 19, 2019):
Yeah I wouldn't be that much worried about stability. We had some rare cases where some calls would fail (just report
500, not crash or anything like that) due to some concurrency issues on sqlite. (sharing passwords with attachments was one of these) But normal usage wasn't affected by this at all. We've also added couple retries where we would previously fail at first try and recently I couldn't reproduce the issue even with really heavy requests. So I think you should be good.Going to close this as I think it's resolved. If you have some time, maybe do a wiki on the WSL installation, I'm sure some people would be interested. Feel free to reopen or open new issue if you spot some other problems.