Cloudflare R2 error
See original GitHub issueDescribe the bug
I’m getting the following errors when using Cloudflare R2;
2022/12/11 16:15:46 [error] 64#64: *1 SSL_do_handshake() failed (SSL: error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure:SSL alert number 40) while SSL handshaking to upstream
2022/12/11 16:15:46 [warn] 64#64: *1 upstream server temporarily disabled while SSL handshaking to upstream
I can fix the errors and it works fine if I add the following line to default.conf
(inside location @s3
):
proxy_ssl_server_name on;
and “hardcoding” my R2 domain in proxy pass:
proxy_pass https://abcdefghijklmnopqrstuvwxz1234567.r2.cloudflarestorage.com$s3uri;
but having to do that everytime I restart the container is a PITA.
Posting this issue so maybe a kind sould can fix it or post a better solution.
Your environment
-
Version of the repo - a specific commit or tag latest-20221104
-
Version of the container used (if downloaded from Docker Hub or Github) ghcr.io/nginxinc/nginx-s3-gateway/nginx-oss-s3-gateway:latest
-
S3 backend implementation you are using (AWS, Ceph, NetApp StorageGrid, etc) Cloudflare R2
-
How you are deploying Docker/Stand-alone, etc Docker
-
NGINX type (OSS/Plus) OSS
-
Authentication method (IAM, IAM with Fargate, IAM with K8S, AWS Credentials, etc) Secret and access keys
Issue Analytics
- State:
- Created 9 months ago
- Comments:12
I got an account on backblaze and debugged the issue. It appears that we need to set
proxy_ssl_name
in addition toproxy_ssl_server_name
. Please try the latest image without any modifications.Fixed by: 8366ab87ff92ca3aa013b018f3445294e2e30a53 c4212dfe772f3bab5e9677d48c30e7efcdad9b0a