mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-08-26 11:55:50 -05:00
[GH-ISSUE #4112] [WARN] tls handshake with 127.0.0.1:XXXXX failed: received corrupt message of type InvalidContentType #39029
Reference in New Issue
Block a user
Originally created by @rwjack on GitHub (Nov 28, 2023).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/4112
Subject of the issue
Container shows as unhealthy on portainer, even though everything is working. Unsure why I'm getting these WARN logs, the curl healthcheck works within the container.
Deployment environment
1.30.1
Install method:
Docker
Clients used:
Irellevant
Reverse proxy and version:
Irellevant
Other relevant details:
Relevant .env changes:
Steps to reproduce
Expected behaviour
Container to show as healthy
Actual behaviour
Container shows as unhealthy, even though everything is working.
Troubleshooting data
@BlackDex commented on GitHub (Dec 1, 2023):
It seems to work fine for me.
Try setting the
LOG_LEVELto debug and see if you get some more information.I tested it with curl versions,
7.68.0,7.81.0,7.88.1and8.4.0, they all worked fine.Tested both the FQDN and
localhostnothing breaks.It could be your host platform which causes some (Open)SSL client settings to be different host-wide, and causes this to happen.
The certs might be unsupported in some way, or not have a full chain available?
Also, i see you use port
80, while it looks like you do a port-proxy via Docker. Not sure if you use a reverse proxy in-front of Vaultwarden, if so, it could also be your reverse proxy which is causes an issue.I'm not able to reproduce this on my side.
@rwjack commented on GitHub (Dec 1, 2023):
Let me give it a shot.
Debian 11 with the latest version of Docker, I doubt that's the issue.
I don't think they do have a full chain, it's just a regular certificate generated by mkcert
Port 80 is the default for the container. I expose another port on the Debian host, which is open only to the reverse proxy, but I don't see how that's related, as the healthcheck should curl "localhost", since
ROCKET_ADDRESS(by default I hope) is configured to0.0.0.0.@rwjack commented on GitHub (Dec 1, 2023):
@BlackDex Though I didn't just try to run the healthcheck manually.
This is the error:
And the timestamp matches a corresponding error in the container logs:
Relevant issue: https://github.com/curl/curl/issues/12183
@BlackDex commented on GitHub (Dec 1, 2023):
Ah! Looks like
ROCKET_TLSis not seen as a env variable to the healthcheck.sh script.Probably because you are using a
.envfile there which isn't seen by the script.That scenario isn't covered it looks like.
@rwjack commented on GitHub (Dec 1, 2023):
Okay, definitely a minor bug, I fixed it by adding this in my docker-compose:
Not sure why I didn't set it like that in the first place, that's how I do it everywhere. Anyways, all good now.
This is probably the reason:
@BlackDex commented on GitHub (Dec 1, 2023):
That is if not running via Docker. But that could be cleared up. Since there also is a ENV variable which can relocate the
.envfile location ;). Which doesn't make it more clear haha.@rwjack commented on GitHub (Dec 1, 2023):
Gotcha, thanks for the help!
Even though my issue is resolved, do you still want to keep this open as a reminder?
@BlackDex commented on GitHub (Dec 1, 2023):
Yes please, this is something we need to fix i think.