-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
bug: failed to find any SSL certificate by SNI: #8663
Comments
I noticed in the Helm config, these options, Have assume they are not required ot be set, as nothing documented
|
I also faced the same issue. failed to find any SSL certificate. |
@MarkCupitt How did you send a request? The certificate matching depends on the TLS SNI sent from the Client Hello packet. So please check out if your clients send the correct TLS SNI. |
the client is latest chrome and firefox, both tested, the route is for a
html page
…On Thu, 12 Jan 2023, 5:05 pm Alex Zhang, ***@***.***> wrote:
@MarkCupitt <https://github.com/MarkCupitt> How did you send a request?
The certificate matching depends on the TLS SNI sent from the Client Hello
packet. So please check out if your clients send the correct TLS SNI.
—
Reply to this email directly, view it on GitHub
<#8663 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABJ7RUCEJRKHPYMPF7P6VL3WR7COVANCNFSM6AAAAAATY3TZKM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Whether a route is for a HTML page doesn't matter. How did you send a request? What does the URL look like? |
sorry on brevity on phone right now https://e3.engineering.billrush.work/toptog in the browser both chrome and Firefox .. latest updates applied |
the sni and cert are issued to e3.engineering.billrush.work the dashboard gets the correct SNI from the cert |
@MarkCupitt Are you using APISIX 3.0? If so, this may due to the incompatibility between APISIX 3.x and APISIX Dashboard 2.x. |
@tokers yes, we are using v3.x (latest helm version actually) .. but we have an issue logged using the api upload as well .. #8665 which we could not get to work, it would accept the cert, and return 200, but dashboard failed to get the expiry date out of the cert, the dashboard DID extract the SNI correctly. Problem is that the cert displayed in the dashboard but was not able to be deleted Again, apisix logged the Same error as per above on both upload methods. (api and dashboard UI) I also tried downgrading the cert from 4096 to 2048, just in case, no difference |
@MarkCupitt I mean, the certificate path prefix for APISIX fetching from the ETCD doesn't match the one Dashboard uses to write the certificate. i.e.g, APISIX fetches from the key space |
how to solve the issue ? To get the correct SSL cert |
Yes. |
Certs loaded by the dashboard V2 will NOT be seen in the routing, until the dashboard is made compatible, you MUST use the API's to load and manage certs Additionally, if you use a Wildcard Cert ["*.example.com"] the route MUST use if you use @tokers Might save a lot of grief for people if this could be added to the documentation in the following locations: https://apisix.apache.org/docs/apisix/admin-api/#request-body-parameters Documenting in case anyone else has this issue |
apisix 3.9 [error] 50#50: *181148 [lua] init.lua:212: http_ssl_client_hello_phase(): failed to match any SSL certificate by SNI: https://apisix.apache.org/docs/apisix/certificate/ |
Current Behavior
This Error occurs:
Certificate craeted with this certbot command
Certificate Uploaded to apisix via dashboard. Certificate accepted and sni and expiry is displayed
Routes on that SNI host cause the error to issue
Tried with Latest Chrome and Firefiox, same issue
Ssl Config
System is Ubuntu 22.04LTS which should have the
DST Root CA X3
availableExpected Behavior
Routes shoudl work, no error should be logged
Error Logs
2023/01/12 06:09:20 [error] 64#64: 426241 [lua] radixtree_sni.lua:170: match_and_set(): failed to find any SSL certificate by SNI: e3.engineering.billrush.work, context: ssl_certificate_by_lua, client: 192.168.50.80, server: 0.0.0.0:9443
Steps to Reproduce
Install via helm
enable ssl in config
load cert via dashboard
create route using same host as SNI in cert
Environment
apisix version
):uname -a
):openresty -V
ornginx -V
):curl http://127.0.0.1:9090/v1/server_info
):luarocks --version
):The text was updated successfully, but these errors were encountered: