mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-03-02 22:57:18 -05:00
OpenSSL-related crashes on Docker Alpine image #1244
Labels
No labels
SSO
Third party
better for forum
bug
bug
documentation
duplicate
enhancement
future Vault
future Vault
future Vault
good first issue
help wanted
low priority
notes
question
troubleshooting
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vaultwarden#1244
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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 @jeda on GitHub (Mar 21, 2022).
Subject of the issue
Looking at my vaultwarden logs, I noticed something peculiar in them. Apparently, vaultwarden has had occasional crashes due to OpenSSL errors, which seem pretty random.
I have not noticed any disruption while using it, but it raises an eye.
Deployment environment
vaultwarden/server:testing-alpine,amd64)Steps to reproduce
Unsure. I have pretty much a "regular" setup, with
WEBSOCKET_ENABLEDand that's it.It seems to have happened
duringa while after regular sync intervals, no entries added or anything.@BlackDex commented on GitHub (Mar 21, 2022):
It almost looks like you also have Vaultwarden configured to serve HTTPS to Caddy.
The SSL implementation for the Rocket version used is a bit unstable sometimes. That is why we suggest to use a reverse proxy and let it offload the SSL also.
I'm not sure if you have it configured like that, but if that is the case i would suggest two things to try
testing-alpineversion and see if that helps. That version has a newer library.@jeda commented on GitHub (Mar 21, 2022):
I don't have TLS enabled on Vaultwarden. It's served via HTTP to Caddy.
I am using
testing-alpinealready, as pointed out in the original issue. I don't recall seeing this issue in the latest stable version, but I can't give out any confirmations right now.@BlackDex commented on GitHub (Mar 21, 2022):
Ah indeed. Sorry late here already hehe.
Is the postgresql connection secured with ssl?
That would be the only item left which i can think of.
@jeda commented on GitHub (Mar 21, 2022):
Actually, good point. Isn't PostgreSQL secured with TLS by default?
That could possibly be it. Would also explain why it's not exactly when a HTTP request is received.
@jeda commented on GitHub (Mar 21, 2022):
Yep.
@BlackDex commented on GitHub (Mar 21, 2022):
Its either that, or there is a weird issue with the client which is still using a PostgreSQL v11 library.
The library does indeed first tries ssl, if that fails it tries without.
@jeda commented on GitHub (Mar 21, 2022):
I'm gonna try adding
?sslmode=disableto the PostgreSQL URI and see if it still crashes. Shouldn't matter that much since they're in the same server.Will report back with results.
@BlackDex commented on GitHub (Mar 21, 2022):
When a newer version of the testing will be released it will be using a newer version of OpenSSL. Maybe that helps, but i doubt it actually. But who knows.
But please keep us posted.
Edit:
If needed, i could build a version which uses PostgreSQL v14 btw instead of PQ11
@jeda commented on GitHub (Mar 21, 2022):
Let's see if it crashes again, and if so, I'll ask for it. You can build it anyway if it's no issue.
Looking good so far, though.
@BlackDex commented on GitHub (Mar 22, 2022):
I tried this my self using a postgre docker container with a self-signed ssl-cert.
I'm not seeing any issues so far.
I created a personal vault with 9000+ items in it and a org vault with 2200+ items.
It seems to keep working.
Looking the the version string of your PostgreSQL Instance, you are probably using the exact same container.
I'm not sure which parameters you used to start it, but i used the following:
And i started the Vaultwarden container like this:
I then used the Bitwarden Desktop, CLI and Browser extension to login to the instance and add/sync items.
I left it running for a long time and did some more testing and no issues as of yet.
Not sure what could be the issue on your side then though.
Have you tried to restart the PostgreSQL instance/server?
@jeda commented on GitHub (Mar 22, 2022):
I restarted it before creating this issue.
So far, it has still been working fine. No crashes or any odd errors. I'll try switching back to TLS.
@jeda commented on GitHub (Mar 23, 2022):
...And nothing.
It's just.. working.
Software.
@BlackDex commented on GitHub (Mar 23, 2022):
Still strange.
I can understand that you would prefer a secure db connection.
I dived a bit into the specific errors, the only thing i can see is that it could be some weird OpenSSL version difference somewhere. The Alpine image has a statically linked OpenSSL which could differ a bit from the OpenSSL installed by Alpine, but i'm not seeing how those two would even interact, since the vaultwarden application shouldn't be using the OS libraries at all.
Maybe a newer build of the Alpine image would solve this, since they then probably both use OpenSSL v1.1.1n on all levels.
@jeda commented on GitHub (Mar 23, 2022):
I have no idea what's happening in here either, but yeah, it's functional..
Probably a newer build would be fine. The crashes are indeed strange.