mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-03-12 01:45:56 -05:00
Can't connect to database after update docker image to 1.25.0 #1282
Reference in New Issue
Block a user
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 @Hobbabobba on GitHub (May 26, 2022).
Subject of the issue
Updated docker image to vaultwarden/server:1.25.0
After that container can´t start
Deployment environment
web vault
Desktop
Android
iOS
Steps to reproduce
Expected behaviour
Actual behaviour
Troubleshooting data
@BlackDex commented on GitHub (May 26, 2022):
Please check https://github.com/dani-garcia/vaultwarden/wiki/Using-the-MariaDB-%28MySQL%29-Backend#foreign-key-errors-collation-and-charset and follow the steps there. It probably has some wrong configuration on the database or tables.
@Hobbabobba commented on GitHub (May 26, 2022):
how can I do any of the steps in https://github.com/dani-garcia/vaultwarden/wiki/Using-the-MariaDB-%28MySQL%29-Backend#foreign-key-errors-collation-and-charset ? Using the commands inside the docker cli does not work.
@BlackDex commented on GitHub (May 26, 2022):
Hmm, it's a sqlite db it looks like.
Strange, the migration should just run.
@Hobbabobba commented on GitHub (May 26, 2022):
if i don´t mount the data-volume the migration works and the container is running fine. After mount the volume again, the problem still occurs. Image 1.24.0 works without any problem.
@berotrip commented on GitHub (May 27, 2022):
Can't contribute anything but say that I am having the exact same problem since 1.25.0 and had to revert back to version 1.24.0 where it still works.
No external DB configured, just the integrated sqlite inside the container.
I wonder what is the reason a migration script starts up?
@BlackDex commented on GitHub (May 27, 2022):
The reason is because there are some changes to the database.
I didn't had time yet to do some testing regarding this issue.
@walmer26 commented on GitHub (May 28, 2022):
Same issue here.
@BlackDex commented on GitHub (May 28, 2022):
Ok, i have tried several stuff to try and reproduce this but were not able to.
What could be the case here is that there is something wrong with the database it self. It might not be a big issue, but still.
Could someone try to do the following:
So, just copy over the
db.sqlite3file and rename it to something likebackup_db.sqlite3or what ever.a. Either login into the admin interface, scroll all the way down there is a backup option there, run that, and there should be a new backup file generated next to the default database file.
b. Run sqlite command your self. I suggest to shutdown Vaultwarden first when you do this your self.
Go to the data folder where the
db.sqlite3file is located and rundb.sqlite3filedb.sqlite3@Hobbabobba commented on GitHub (May 28, 2022):
I tried the fix with a vacumed db, still the same problem after an update to 1.25.0
@BlackDex commented on GitHub (May 28, 2022):
Could you post a
sqlite3 db.sqlite3 '.schema;'here?Need to see what is wrong here.
@berotrip commented on GitHub (May 28, 2022):
Here's the schema (no success with VACUUM):
Could the last line be relevant: device_uuid instead of the quoted devices_uuid from the error messages?
@BlackDex commented on GitHub (May 28, 2022):
Seems to look fine. And those two items are totally different.
The only step left i can think of is that you need to clear the
devicestable.You can do that by going to the admin interface
/admin/users/overviewand click onDeauthorize sessionsfor every user you have. That will force all clients to logout and they need to login again though.But after you clicked on
Deauthorize sessionsfor every user, try to upgrade again, and see if that helps?@berotrip commented on GitHub (May 28, 2022):
That worked, thanks!
@Hobbabobba commented on GitHub (May 28, 2022):
Fixed it!