-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Self-Hosted with External MSSQL: Procedure or function CipherDetails_Create has too many arguments specified. #3397
Comments
Hi @HeyITGuyFixIt , I am unable to reproduce this issue (as I do not have access to SQL Server), so it has been escalated for further investigation. If you have more information that can help us, please add it below. Thanks! |
Based on my findings, the stored procedure CipherDetails_Create has been updated recently, in the last update 2021-05-04_00_CipherPasswordPromptFixed.sql, it accepts only 17 parameters whereas in a more recent update, 2023-09-27_00_CipherKeyUpdate.sql there's now 18 parameters, which is same as total count of properties for Bit.Core.Vault.Models.Data.CipherDetails class. Based on the above, I would assume the database for some reason, might not have applied the latest migration properly, while the software is already up to date which are supplying 18 parameters when calling the stored procedure, and it can only accept 17. I'm not sure exactly how the migration gets triggered to start and include the appropriate files yet, but hopefully that provides a direction for debugging. If I'm not mistaken, there should be a log too for the migration, so maybe we can find some useful information over there. |
@ruizhii Based on your response, I tried to run
Not sure yet why it can't connect, but if it couldn't connect when I had tried to update everything earlier then that would explain this issue. |
Looks like I can't connect to anything from the bitwarden-mssql container. I tried to wget https://1.1.1.1, and that times out. I tried to connect to the sql server using the mssqlcmd command and it times out as well. Looks like a network issue with this container. |
Honestly, not sure which container is responsible for running the updatedb command. |
@HeyITGuyFixIt may I know if the bitwarden.sh script you mentioned is the one from bitwarden/self-host repo? I saw that in this repo the script contains an instruction pointing to that one. |
@ruizhii it should be. It's version 2023.9.1. I'm trying the new update to see if that fixes things. |
Still not working after the update. Using the server's FQDN I get the "Resource temporarily unavailable" error, but switching to its IP I get this:
|
I can confirm that the bitwarden-admin container can get to the server by both FQDN and IP. I can't find a way to try connecting to the sql server from that container. |
I changed the config to use a different Catalog. It recreated that database and was able to resolve the initial issue. I retried |
I'm glad it works the other way @HeyITGuyFixIt, but I really have no idea from here on. Let's see if someone else will respond to this issue, hopefully we'll get some good help. |
Steps To Reproduce
Expected Result
Editing and creating records should save without error.
Actual Result
Client throws error saying an unhandled server error has occurred, and the bitwarden-api container throws this error:
Screenshots or Videos
No response
Additional Context
No response
Build Version
2023.9.1
Environment
Self-Hosted
Environment Details
Issue Tracking Info
The text was updated successfully, but these errors were encountered: