HTTP NODE:certificate verify failed: unable to get local issuer certificate (_ssl.c:1010) #13903

Closed
opened 2026-02-21 19:14:26 -05:00 by yindo · 4 comments
Owner

Originally created by @TranscendSky on GitHub (May 15, 2025).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.3.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

i want to send a https request to my k8s cluster.
i am sure that curl can work normally

learned from other issue,i modified some configs like

Image Image

but all of above doesn't work,

Image

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @TranscendSky on GitHub (May 15, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.3.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce i want to send a https request to my k8s cluster. i am sure that curl can work normally learned from other issue,i modified some configs like <img width="589" alt="Image" src="https://github.com/user-attachments/assets/f57aa41f-6684-4854-bbfb-a084ad5e9f06" /> <img width="1108" alt="Image" src="https://github.com/user-attachments/assets/2dded5e5-8305-48b5-886a-cb6ed3febf28" /> but all of above doesn't work, <img width="391" alt="Image" src="https://github.com/user-attachments/assets/5b8305e3-3584-4837-8f75-a0be78df80f1" /> ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 19:14:26 -05:00
yindo closed this issue 2026-02-21 19:14:26 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (May 15, 2025):

To resolve the SSL certificate verification error "certificate verify failed: unable to get local issuer certificate (_ssl.c:1010)" in your self-hosted Dify version 1.3.1 with Docker, you can follow these steps:

  1. Modify the api/core/helper/ssrf_proxy.py file to explicitly set the verify parameter in the HTTPTransport configuration. Here is the code snippet to make the necessary changes:

    proxy_mounts = {
        "http://": httpx.HTTPTransport(proxy=dify_config.SSRF_PROXY_HTTP_URL, verify=HTTP_REQUEST_NODE_SSL_VERIFY),
        "https://": httpx.HTTPTransport(proxy=dify_config.SSRF_PROXY_HTTPS_URL, verify=HTTP_REQUEST_NODE_SSL_VERIFY)
    }
    
  2. Ensure that the HTTP_REQUEST_NODE_SSL_VERIFY configuration is set to False in the dify_config. This setting allows Dify to handle self-signed certificates by bypassing SSL certificate verification.

  3. After making these changes, restart the API container using the following command:

    docker restart docker-api-1
    

These steps should help you handle self-signed certificates and resolve the SSL verification error [1].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (May 15, 2025): <!-- Answer --> To resolve the SSL certificate verification error "certificate verify failed: unable to get local issuer certificate (_ssl.c:1010)" in your self-hosted Dify version 1.3.1 with Docker, you can follow these steps: 1. Modify the `api/core/helper/ssrf_proxy.py` file to explicitly set the `verify` parameter in the HTTPTransport configuration. Here is the code snippet to make the necessary changes: ```python proxy_mounts = { "http://": httpx.HTTPTransport(proxy=dify_config.SSRF_PROXY_HTTP_URL, verify=HTTP_REQUEST_NODE_SSL_VERIFY), "https://": httpx.HTTPTransport(proxy=dify_config.SSRF_PROXY_HTTPS_URL, verify=HTTP_REQUEST_NODE_SSL_VERIFY) } ``` 2. Ensure that the `HTTP_REQUEST_NODE_SSL_VERIFY` configuration is set to `False` in the `dify_config`. This setting allows Dify to handle self-signed certificates by bypassing SSL certificate verification. 3. After making these changes, restart the API container using the following command: ```bash docker restart docker-api-1 ``` These steps should help you handle self-signed certificates and resolve the SSL verification error <sup>[[1]](https://github.com/langgenius/dify/issues/16268)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/c51108ef-9855-4cb8-aa20-cf2033f53b2f?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/c51108ef-9855-4cb8-aa20-cf2033f53b2f?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/c51108ef-9855-4cb8-aa20-cf2033f53b2f?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/c51108ef-9855-4cb8-aa20-cf2033f53b2f?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/c51108ef-9855-4cb8-aa20-cf2033f53b2f?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/c51108ef-9855-4cb8-aa20-cf2033f53b2f?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/c51108ef-9855-4cb8-aa20-cf2033f53b2f?feedback_type=other)</sup>
Author
Owner

@crazywoola commented on GitHub (May 15, 2025):

Might duplicated with https://github.com/langgenius/dify/issues/19365

@crazywoola commented on GitHub (May 15, 2025): Might duplicated with https://github.com/langgenius/dify/issues/19365
Author
Owner

@TranscendSky commented on GitHub (May 15, 2025):

maybe i know the reason。i found even i changed the source code,force "verify" false。

Image when error happened,the api's log show that the error stack is Image

i deployed with docker,it always use the image [langgenius/dify-api:1.3.1]
i will build a new image and try a new round

@TranscendSky commented on GitHub (May 15, 2025): maybe i know the reason。i found even i changed the source code,force "verify" false。 <img width="1102" alt="Image" src="https://github.com/user-attachments/assets/3d6404b4-5b9b-42fa-aa38-c00e92208a89" /> when error happened,the api's log show that the error stack is <img width="1587" alt="Image" src="https://github.com/user-attachments/assets/aafde444-eda1-4d81-bffa-060f75573998" /> i deployed with docker,it always use the image [langgenius/dify-api:1.3.1] i will build a new image and try a new round
Author
Owner

@TranscendSky commented on GitHub (May 16, 2025):

it works,so this code modify can work,but need build a new image

proxy_mounts = {
"http://": httpx.HTTPTransport(proxy=dify_config.SSRF_PROXY_HTTP_URL, verify=HTTP_REQUEST_NODE_SSL_VERIFY),
"https://": httpx.HTTPTransport(proxy=dify_config.SSRF_PROXY_HTTPS_URL, verify=HTTP_REQUEST_NODE_SSL_VERIFY)
}

@TranscendSky commented on GitHub (May 16, 2025): it works,so this code modify can work,but need build a new image ----- proxy_mounts = { "http://": httpx.HTTPTransport(proxy=dify_config.SSRF_PROXY_HTTP_URL, verify=HTTP_REQUEST_NODE_SSL_VERIFY), "https://": httpx.HTTPTransport(proxy=dify_config.SSRF_PROXY_HTTPS_URL, verify=HTTP_REQUEST_NODE_SSL_VERIFY) }
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#13903