Cannot decrypt password due to mismatched keys in Posit Workbench

Follow

Problem

When using Workbench with a Postgres database, there may be occurrences when you see the error below:

[rserver] ERROR encryption error 1 (Cannot decrypt password due to mismatched keys, encryption key hash (00000000), decryption key hash (00000000)); 

 

Solution

This occurs when there is a key mismatch, typically, when the decryption key doesn't match the encryption key. The solution for this is to re-encrypt the password as below:

1.  Run the command sudo rstudio-server encrypt-password and enter the PostgreSQL password.
2.  Copy the resulting encrypted password printed in the terminal.
3.  Add or replace the password option in the database.conf file using the encrypted password copied above.
4.  Restart Workbench with rstudio-server restart.

 

Support Ticket

If you still have issues after completing the above, you can always lodge a support ticket, where our group of friendly, and incredibly knowledgeable staff can assist with any issues that you may be having. You can submit a ticket here:

https://support.posit.co/hc/en-us/requests/new

Comments