Skip to content

branch-4.0: [feat](be) Enhance CA cert troubleshooting in Azure object storage client #61102 - #61214

Merged
yiguolei merged 1 commit into
branch-4.0from
auto-pick-61102-branch-4.0
Mar 12, 2026
Merged

branch-4.0: [feat](be) Enhance CA cert troubleshooting in Azure object storage client #61102#61214
yiguolei merged 1 commit into
branch-4.0from
auto-pick-61102-branch-4.0

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Cherry-picked from #61102

…ient (#61102)
### Problem Summary:
1. Azure Blob requests can fail with TLS/CA verification errors, but
current error messages do not provide enough CA-related debug context.
2. Azure client creation does not explicitly bind Doris-selected CA file
to curl transport, which can make CA source ambiguous across
environments.
### What is changed
1. In Azure client factory, resolve CA file from
`config::ca_cert_file_paths` and set `CurlTransportOptions::CAInfo`.
2. Build a `tls_debug(...)` context at client creation time, including:
- configured CA paths,
- selected CA file, - whether selected CA exists/readable, - SSL-related
env vars (`SSL_CERT_FILE`, `CURL_CA_BUNDLE`, `SSL_CERT_DIR`).
3. Pass TLS debug context into `AzureObjStorageClient`.
4. Append TLS debug suffix only when error message matches TLS CA
failure patterns.
5. Add unit tests for helper logic in
`azure_obj_storage_client_test.cpp`:
- `detects_tls_ca_error`
- `appends_debug_suffix_only_for_tls_ca_error`
``` W20260306 16:38:44.997861 86429 file_reader.cpp:36] [INTERNAL_ERROR]Azure request failed because Fail to get a new connection for:
https://<azure-storage-endpoint>.blob.core.windows.net. Problem with the SSL CA cert (path? access rights?), error msg , http code 0, path msg bucket <conta
iner-name>, key <object-key>, prefix , path , tls_debug(ca_cert_file_paths='<ca-cert-path>', selected_ca_file='<ca-cert-path>', selected_ca_exists=true, sel
ected_ca_readable=true, SSL_CERT_FILE='', CURL_CA_BUNDLE='', SSL_CERT_DIR='')failed to read
W20260306 16:38:44.997881 86429 internal_service.cpp:888] failed to init reader, errmsg=```
[INTERNAL_ERROR]Azure request failed because Fail to get a new conne
ction for: https://<azure-storage-endpoint>.blob.core.windows.net. Problem with the SSL CA cert (path? access rights?), error msg , http code 0, path msg bu
cket <container-name>, key <object-key>, prefix , path , tls_debug(ca_cert_file_paths='<ca-cert-path>', selected_ca_file='<ca-cert-path>', selected_ca_exist
s=true, selected_ca_readable=true, SSL_CERT_FILE='', CURL_CA_BUNDLE='', SSL_CERT_DIR='')failed to read
W20260306 16:38:51.028247 85476 pipeline_fragment_context.cpp:1813] Failed to send report for query <query-id>, fragment 0: [E-241]
ERROR 1105 (HY000): errCode = 2, detailMessage = Can not build FunctionGenTable 's3'. error: errCode = 2, detailMessage = (<backend-ip>)[INTERNAL_ERROR]Azure
request failed because Fail to get a new connection for: https://<azure-storage-endpoint>.blob.core.windows.net. Problem with the SSL CA cert (path? access
rights?), error msg , http code 0, path msg bucket <container-name>, key <object-key>, prefix , path , tls_debug(ca_cert_file_paths='<ca-cert-path>', select
ed_ca_file='<ca-cert-path>', selected_ca_exists=true, selected_ca_readable=true, SSL_CERT_FILE='', CURL_CA_BUNDLE='', SSL_CERT_DIR='')failed to read
`
@Thearas

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@Thearas

Copy link
Copy Markdown
Contributor

run buildall

@doris-robot

Copy link
Copy Markdown

BE UT Coverage Report

Increment line coverage 22.89% (19/83) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage52.99% (19157/36149)
Line Coverage36.19% (178423/493040)
Region Coverage32.80% (138357/421784)
Branch Coverage33.80% (60069/177739)

@yiguolei
yiguolei merged commit 2e02eff into branch-4.0Mar 12, 2026
25 of 27 checks passed
@github-actions
github-actionsBot deleted the auto-pick-61102-branch-4.0 branch March 12, 2026 01:47
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@Thearas@doris-robot@yiguolei@dataroaring@CalvinKirs