SSLError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded #12056

Closed
opened 2026-02-21 19:05:32 -05:00 by yindo · 1 comment
Owner

Originally created by @huwei on GitHub (Mar 24, 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.0.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

After I deploy according to the document, the following error occurs.
After installing the DeepSeek plugin, create an application and initiate a conversation with DeepSeek within the app.

✔️ Expected Behavior

Normal reply

Actual Behavior

exception stack:

prompt_tokens = model_instance.get_llm_num_tokens(prompt_messages)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/core/model_manager.py", line 195, in get_llm_num_tokens
self._round_robin_invoke(
File "/app/api/core/model_manager.py", line 370, in _round_robin_invoke
return function(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/core/model_runtime/model_providers/__base/large_language_model.py", line 299, in get_num_tokens
return plugin_model_manager.get_llm_num_tokens(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/core/plugin/manager/model.py", line 231, in get_llm_num_tokens
for resp in response:
^^^^^^^^
File "/app/api/core/plugin/manager/base.py", line 189, in _request_with_plugin_daemon_response_stream
self._handle_plugin_daemon_error(error.error_type, error.message)
File "/app/api/core/plugin/manager/base.py", line 221, in _handle_plugin_daemon_error
raise PluginInvokeError(description=message)
core.plugin.manager.exc.PluginInvokeError: PluginInvokeError: {"args":{},"error_type":"SSLError","message":"HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /gpt-2/encodings/main/vocab.bpe (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1000)')))"}
2025-03-24 23:30:33.101 ERROR [Dummy-10] [base_app_generate_response_converter.py:123] - {"args":{},"error_type":"SSLError","message":"HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /gpt-2/encodings/main/vocab.bpe (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1000)')))"}

Originally created by @huwei on GitHub (Mar 24, 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.0.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce After I deploy according to the document, the following error occurs. After installing the DeepSeek plugin, create an application and initiate a conversation with DeepSeek within the app. ### ✔️ Expected Behavior Normal reply ### ❌ Actual Behavior exception stack: prompt_tokens = model_instance.get_llm_num_tokens(prompt_messages) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/model_manager.py", line 195, in get_llm_num_tokens self._round_robin_invoke( File "/app/api/core/model_manager.py", line 370, in _round_robin_invoke return function(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/model_runtime/model_providers/__base/large_language_model.py", line 299, in get_num_tokens return plugin_model_manager.get_llm_num_tokens( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/plugin/manager/model.py", line 231, in get_llm_num_tokens for resp in response: ^^^^^^^^ File "/app/api/core/plugin/manager/base.py", line 189, in _request_with_plugin_daemon_response_stream self._handle_plugin_daemon_error(error.error_type, error.message) File "/app/api/core/plugin/manager/base.py", line 221, in _handle_plugin_daemon_error raise PluginInvokeError(description=message) core.plugin.manager.exc.PluginInvokeError: PluginInvokeError: {"args":{},"error_type":"SSLError","message":"HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /gpt-2/encodings/main/vocab.bpe (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1000)')))"} 2025-03-24 23:30:33.101 ERROR [Dummy-10] [base_app_generate_response_converter.py:123] - {"args":{},"error_type":"SSLError","message":"HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /gpt-2/encodings/main/vocab.bpe (Caused by SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1000)')))"}
yindo added the 🐞 bug label 2026-02-21 19:05:32 -05:00
yindo closed this issue 2026-02-21 19:05:32 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Mar 24, 2025):

Hey @huwei! 👋 I'm here to help you with any bugs, questions, or contributions you have for the project. I'll do my best to assist you while you wait for a human maintainer.

I found a similar closed issue related to SSL errors in a self-hosted Dify setup without a proxy. The suggested solution involves checking and modifying the following settings in your Docker environment:

  1. Enable HTTPS: Ensure that NGINX_HTTPS_ENABLED is set to true in your Docker environment configuration to enable HTTPS and allow SSL connections.

  2. SSL Certificates: Verify that the SSL certificate and key files (dify.crt and dify.key) are correctly configured and accessible by the Docker container. These files should be placed in the appropriate directory and referenced correctly in your configuration.

  3. SSL Protocols: Ensure that the SSL protocols are correctly set. The default protocols are TLSv1.1, TLSv1.2, and TLSv1.3. You might want to adjust these if your environment requires different protocols.

  4. Network Configuration: Double-check your network settings to ensure there are no firewall rules or network policies blocking SSL traffic.

These steps should help resolve the SSL errors you're experiencing [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 (Mar 24, 2025): <!-- Greeting --> Hey @huwei! 👋 I'm here to help you with any bugs, questions, or contributions you have for the project. I'll do my best to assist you while you wait for a human maintainer. <!-- Answer --> I found a similar closed issue related to SSL errors in a self-hosted Dify setup without a proxy. The suggested solution involves checking and modifying the following settings in your Docker environment: 1. **Enable HTTPS**: Ensure that `NGINX_HTTPS_ENABLED` is set to `true` in your Docker environment configuration to enable HTTPS and allow SSL connections. 2. **SSL Certificates**: Verify that the SSL certificate and key files (`dify.crt` and `dify.key`) are correctly configured and accessible by the Docker container. These files should be placed in the appropriate directory and referenced correctly in your configuration. 3. **SSL Protocols**: Ensure that the SSL protocols are correctly set. The default protocols are `TLSv1.1`, `TLSv1.2`, and `TLSv1.3`. You might want to adjust these if your environment requires different protocols. 4. **Network Configuration**: Double-check your network settings to ensure there are no firewall rules or network policies blocking SSL traffic. These steps should help resolve the SSL errors you're experiencing <sup>[[1]](https://github.com/langgenius/dify/issues/11963)</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/098731ad-a1f9-4579-8bf0-5d0efdfd7b85?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/098731ad-a1f9-4579-8bf0-5d0efdfd7b85?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/098731ad-a1f9-4579-8bf0-5d0efdfd7b85?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/098731ad-a1f9-4579-8bf0-5d0efdfd7b85?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/098731ad-a1f9-4579-8bf0-5d0efdfd7b85?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/098731ad-a1f9-4579-8bf0-5d0efdfd7b85?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/098731ad-a1f9-4579-8bf0-5d0efdfd7b85?feedback_type=other)</sup>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#12056