Error saving device on postgresql #1273

Closed
opened 2026-02-05 00:28:22 +03:00 by OVERLORD · 7 comments
Owner

Originally created by @jz8132543 on GitHub (May 24, 2022).

I failed to login on all clients(web, Android, ios and etc). I'm running version 2.25.1 of Vaultwarden/server in docker, using postgresql14. I accidentally restarted postgresql and then can't log into my account. The log is as follows.

vaultwarden  | [2022-05-24 06:48:37.570][error][ERROR] Error saving device.
vaultwarden  | [CAUSE] DatabaseError(
vaultwarden  |     __Unknown,
vaultwarden  |     "there is no unique or exclusion constraint matching the ON CONFLICT specification",
vaultwarden  | )

The devices table in postgresql has been emptied, but such an error still occurs. How to fix or how to migrate data to other database types like SQLite or MySQL?

Originally created by @jz8132543 on GitHub (May 24, 2022). I failed to login on all clients(web, Android, ios and etc). I'm running version 2.25.1 of Vaultwarden/server in docker, using postgresql14. I accidentally restarted postgresql and then can't log into my account. The log is as follows. ``` vaultwarden | [2022-05-24 06:48:37.570][error][ERROR] Error saving device. vaultwarden | [CAUSE] DatabaseError( vaultwarden | __Unknown, vaultwarden | "there is no unique or exclusion constraint matching the ON CONFLICT specification", vaultwarden | ) ``` The devices table in postgresql has been emptied, but such an error still occurs. How to fix or how to migrate data to other database types like SQLite or MySQL?
OVERLORD added the questiontroubleshooting labels 2026-02-05 00:28:22 +03:00
Author
Owner

@BlackDex commented on GitHub (May 24, 2022):

Could you post the generated support string please. That would be really helpful.

@BlackDex commented on GitHub (May 24, 2022): Could you post the generated support string please. That would be really helpful.
Author
Owner

@BlackDex commented on GitHub (May 24, 2022):

Also, if you still see v2.25.1 as your web-vault version, you are not on the latest version.
I would make sure you are using the latest version. Since it seems to work for me just fine using Postgresql.

So, posting the Support String would be helpful.

@BlackDex commented on GitHub (May 24, 2022): Also, if you still see v2.25.1 as your web-vault version, you are not on the latest version. I would make sure you are using the latest version. Since it seems to work for me just fine using Postgresql. So, posting the Support String would be helpful.
Author
Owner

@jz8132543 commented on GitHub (May 27, 2022):

Thanks for your reply! It works after I update my docker container. It is a weird issue but I'm so glad it was solved after update.

@jz8132543 commented on GitHub (May 27, 2022): Thanks for your reply! It works after I update my docker container. It is a weird issue but I'm so glad it was solved after update.
Author
Owner

@Bluscream commented on GitHub (Mar 28, 2024):

I have a similar error:

[2024-03-28 02:40:31.430][response][INFO] (login) POST /identity/connect/token => 400 Bad Request
[2024-03-28 02:40:48.802][request][INFO] POST /identity/connect/token
[2024-03-28 02:40:50.430][request][INFO] POST /identity/connect/token
[2024-03-28 02:40:53.454][error][ERROR] Error saving device.
[CAUSE] DatabaseError(

    Unknown,
    "disk I/O error",
)
@Bluscream commented on GitHub (Mar 28, 2024): I have a similar error: ``` [2024-03-28 02:40:31.430][response][INFO] (login) POST /identity/connect/token => 400 Bad Request [2024-03-28 02:40:48.802][request][INFO] POST /identity/connect/token [2024-03-28 02:40:50.430][request][INFO] POST /identity/connect/token [2024-03-28 02:40:53.454][error][ERROR] Error saving device. [CAUSE] DatabaseError(  Unknown, "disk I/O error", ) ```
Author
Owner

@BlackDex commented on GitHub (Mar 28, 2024):

@Bluscream that looks more like a PostgreSQL issue that it isn't able to store data. Check the storage or logs of the database.

@BlackDex commented on GitHub (Mar 28, 2024): @Bluscream that looks more like a PostgreSQL issue that it isn't able to store data. Check the storage or logs of the database.
Author
Owner

@Bluscream commented on GitHub (Mar 28, 2024):

@Bluscream that looks more like a PostgreSQL issue that it isn't able to store data. Check the storage or logs of the database.

i am using the rpi portainer install with no special database (https://github.com/pi-hosted/pi-hosted/blob/master/template/apps/vaultwarden.json)

disk space seems not critical to me:

image

container stats also look fine to me
image

@Bluscream commented on GitHub (Mar 28, 2024): > @Bluscream that looks more like a PostgreSQL issue that it isn't able to store data. Check the storage or logs of the database. i am using the rpi portainer install with no special database (https://github.com/pi-hosted/pi-hosted/blob/master/template/apps/vaultwarden.json) disk space seems not critical to me: ![image](https://github.com/dani-garcia/vaultwarden/assets/3318223/312d9373-6f58-4878-810b-35404f8b4099) container stats also look fine to me ![image](https://github.com/dani-garcia/vaultwarden/assets/3318223/07e196b0-e944-4016-8af1-c24d03912497)
Author
Owner

@BlackDex commented on GitHub (Mar 28, 2024):

Then your issues is misplaced in this topic.

  1. It was closed already for a long time.
  2. You are using a totally different setup.

Still remains a database storage issue.
I suggest to open a topic in the Q&A discussion and post your support string which you can generate via the admin diagnostics page.

@BlackDex commented on GitHub (Mar 28, 2024): Then your issues is misplaced in this topic. 1. It was closed already for a long time. 2. You are using a totally different setup. Still remains a database storage issue. I suggest to open a topic in the Q&A discussion and post your support string which you can generate via the admin diagnostics page.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/vaultwarden#1273