caddy: ERR_SSL_PROTOCOL_ERROR after few days of running smoothly
We have a configuration which consists of
- Hardcoded SSL certificates for *.example.com
- OnDemand TLS for all other sites
{
email support@example.com
on_demand_tls {
ask https://api.example.com/domain-allowed
}
}
https://*.example.com {
tls /etc/caddy-ssl/tls.crt /etc/caddy-ssl/tls.key
rewrite * {path}?{query}
reverse_proxy https://page.example.com
}
https://example.com {
tls /etc/caddy-ssl/tls.crt /etc/caddy-ssl/tls.key
rewrite * {path}?{query}
reverse_proxy https://page.example.com
}
https:// {
tls {
on_demand
}
rewrite * {path}?{query}
reverse_proxy https://page.example.com
log {
level WARN
}
}
We run it on 2 servers accessing a shared network volume via NFS. Everything runs smoothly but after a few days (lasted for 4 days now) we encounter a very weird behaviour.
Chrome then only responds with ERR_SSL_PROTOCOL_ERROR after accessing the site with the hardcoded SSL certificate. The OnDemand TLS sites continue working without issues.
cURL verbose log:
% curl -H "Host: example.com" https://example.com -v
* Trying 116.203.253.235...
* TCP_NODELAY set
* Connected to example.com (116.203.253.200) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS alert, internal error (592):
* error:14004438:SSL routines:CONNECT_CR_SRVR_HELLO:tlsv1 alert internal error
* Closing connection 0
curl: (35) error:14004438:SSL routines:CONNECT_CR_SRVR_HELLO:tlsv1 alert internal error
When I restart caddy afterwards, everything is back normal again.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 24 (14 by maintainers)
Hi @mholt just got some logs for you:
They look same to me like the ones from the forum. So probably resolved by your new fix 👍
@gbhrdt Thanks for the update. I’m pretty sure this is finally patched here: https://github.com/caddyserver/certmagic/commit/88b8609b4d8fb8c7b1865322602606b85240c80d
I might still refine this but it should be workable now. (For example, this won’t help the case of manually-managed certificates, only automatic, managed certs.)
I have an updated working theory as to what’s happening: https://caddy.community/t/error-tls-alert-internal-error-592-again/13272/29?u=matt
Your full logs can confirm this. But I probably won’t wait too long for them before patching. (Hopefully I’m right!)
@mholt Alright, global debug logs are enabled now. Let’s wait for some interesting logs 👍
That’s not the same error @iandk.
Please open a topic on the forums, and please fill out the help topic template. https://caddy.community
@mholt Alright, thanks for your very quick replies, I’ll build the image myself, upgrade and keep you updated on the debug logs!