[GH-ISSUE #1248] "Field \'user_uuid\' doesn\'t have a default value" when creating an item in an organization on a replicating database. #878

Closed
opened 2026-03-03 02:04:17 +03:00 by kerem · 2 comments
Owner

Originally created by @x86-39 on GitHub (Dec 1, 2020).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/1248

Hello, we are trying to set up bitwarden with high availability, this is done by configuring the MySQL server to replicate between the two hosts. We had one other error which was resolved by creating a column in the attachments.akey table. Currently, sync functions between the two hosts, and everything appears to work well so far. However when creating an item in an organization, it fails and this error is visible in the logs

[2020-11-30 10:28:09.210][error][ERROR] Error saving cipher.
[CAUSE] DatabaseError(
    __Unknown,
    "Field \'user_uuid\' doesn\'t have a default value",
)
[2020-11-30 10:28:09.210][response][INFO] POST /api/ciphers/create (post_ciphers_create) => 400 Bad Request

This happens on both hosts. Any ideas on how to fix this issue?

Originally created by @x86-39 on GitHub (Dec 1, 2020). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/1248 Hello, we are trying to set up bitwarden with high availability, this is done by configuring the MySQL server to replicate between the two hosts. We had one other error which was resolved by creating a column in the attachments.akey table. Currently, sync functions between the two hosts, and everything appears to work well so far. However when creating an item in an organization, it fails and this error is visible in the logs ```[2020-11-30 10:28:09.197][request][INFO] POST /api/ciphers/create [2020-11-30 10:28:09.210][error][ERROR] Error saving cipher. [CAUSE] DatabaseError( __Unknown, "Field \'user_uuid\' doesn\'t have a default value", ) [2020-11-30 10:28:09.210][response][INFO] POST /api/ciphers/create (post_ciphers_create) => 400 Bad Request ``` This happens on both hosts. Any ideas on how to fix this issue?
kerem 2026-03-03 02:04:17 +03:00
Author
Owner

@BlackDex commented on GitHub (Dec 11, 2020):

It seems like something went wrong with the replication or the creation of the database.

Not something we can fix i think.

<!-- gh-comment-id:743479193 --> @BlackDex commented on GitHub (Dec 11, 2020): It seems like something went wrong with the replication or the creation of the database. Not something we can fix i think.
Author
Owner

@BlackDex commented on GitHub (Jan 31, 2021):

Converting this issue to a discussion.

<!-- gh-comment-id:770414055 --> @BlackDex commented on GitHub (Jan 31, 2021): Converting this issue to a discussion.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vaultwarden#878
No description provided.