Private deployment creates dialogue application with no return message #11808

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

Originally created by @yoyomqs on GitHub (Mar 19, 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

V1.0.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

2025-03-19 09:47:48.881 ERROR [Dummy-5] [base_app_generate_response_converter.py:123] - {"args":{},"error_type":"ConnectionError","message":"HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /gpt-2/encodings/main/vocab.bpe (Caused by NameResolutionError(\"\u003curllib3.connection.HTTPSConnection object at 0x7275a46a5910\u003e: Failed to resolve 'openaipublic.blob.core.windows.net' ([Errno -3] Temporary failure in name resolution)\"))"}
2025-03-19 09:48:03.967 ERROR [Thread-6 (_generate_worker)] [app_generator.py:243] - Unknown Error when generating
Traceback (most recent call last):
  File "/app/api/core/app/apps/chat/app_generator.py", line 223, in _generate_worker
    runner.run(
  File "/app/api/core/app/apps/chat/app_runner.py", line 58, in run
    self.get_pre_calculate_rest_tokens(
  File "/app/api/core/app/apps/base_app_runner.py", line 86, in get_pre_calculate_rest_tokens
    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":"ConnectionError","message":"HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /gpt-2/encodings/main/vocab.bpe (Caused by NameResolutionError(\"\u003curllib3.connection.HTTPSConnection object at 0x7275a46a5640\u003e: Failed to resolve 'openaipublic.blob.core.windows.net' ([Errno -3] Temporary failure in name resolution)\"))"}
2025-03-19 09:48:03.985 ERROR [Dummy-7] [base_app_generate_response_converter.py:123] - {"args":{},"error_type":"ConnectionError","message":"HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /gpt-2/encodings/main/vocab.bpe (Caused by NameResolutionError(\"\u003curllib3.connection.HTTPSConnection object at 0x7275a46a5640\u003e: Failed to resolve 'openaipublic.blob.core.windows.net' ([Errno -3] Temporary failure in name resolution)\"))"}
root@ubunut-WS-C621E-SAGE-Series:/mnt/dify/docker# 

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @yoyomqs on GitHub (Mar 19, 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 V1.0.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ``` 2025-03-19 09:47:48.881 ERROR [Dummy-5] [base_app_generate_response_converter.py:123] - {"args":{},"error_type":"ConnectionError","message":"HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /gpt-2/encodings/main/vocab.bpe (Caused by NameResolutionError(\"\u003curllib3.connection.HTTPSConnection object at 0x7275a46a5910\u003e: Failed to resolve 'openaipublic.blob.core.windows.net' ([Errno -3] Temporary failure in name resolution)\"))"} 2025-03-19 09:48:03.967 ERROR [Thread-6 (_generate_worker)] [app_generator.py:243] - Unknown Error when generating Traceback (most recent call last): File "/app/api/core/app/apps/chat/app_generator.py", line 223, in _generate_worker runner.run( File "/app/api/core/app/apps/chat/app_runner.py", line 58, in run self.get_pre_calculate_rest_tokens( File "/app/api/core/app/apps/base_app_runner.py", line 86, in get_pre_calculate_rest_tokens 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":"ConnectionError","message":"HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /gpt-2/encodings/main/vocab.bpe (Caused by NameResolutionError(\"\u003curllib3.connection.HTTPSConnection object at 0x7275a46a5640\u003e: Failed to resolve 'openaipublic.blob.core.windows.net' ([Errno -3] Temporary failure in name resolution)\"))"} 2025-03-19 09:48:03.985 ERROR [Dummy-7] [base_app_generate_response_converter.py:123] - {"args":{},"error_type":"ConnectionError","message":"HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /gpt-2/encodings/main/vocab.bpe (Caused by NameResolutionError(\"\u003curllib3.connection.HTTPSConnection object at 0x7275a46a5640\u003e: Failed to resolve 'openaipublic.blob.core.windows.net' ([Errno -3] Temporary failure in name resolution)\"))"} root@ubunut-WS-C621E-SAGE-Series:/mnt/dify/docker# ``` ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 19:04:10 -05:00
yindo closed this issue 2026-02-21 19:04:10 -05:00
Author
Owner

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

@yoyomqs Hello there! I'm here to help you with any bugs, questions, or contributions while waiting for a human maintainer.

A similar issue was previously reported and closed. The problem was related to network connectivity, specifically a timeout when trying to connect to openaipublic.blob.core.windows.net. It was suggested to check for network restrictions or proxy settings that might be blocking the connection and ensure the necessary network configurations are in place to allow access to the required URLs [1].

To resolve the ConnectionError in your private deployment, you can create and populate a local tiktoken cache directory and configure your Docker API service to use this local cache. Here are the steps:

  1. Create and populate a local tiktoken cache directory:

    mkdir tiktoken
    cd tiktoken
    wget https://openaipublic.blob.core.windows.net/gpt-2/encodings/main/vocab.bpe
    cp vocab.bpe 6d1cbeee0f20b3d9449abfede4726ed8212e3aee
    wget https://openaipublic.blob.core.windows.net/gpt-2/encodings/main/encoder.json
    cp encoder.json 6c7ea1a7e38e3a7f062df639a5b80947f075ffe6
    
  2. Add the following configuration to your Docker API service:

    environment:
      TIKTOKEN_CACHE_DIR: /app/api/.tiktoken/
    volumes:
      - ./volumes/plugin_daemon:/app/storage
      - ./tiktoken:/app/api/.tiktoken
    

These steps should help resolve the connection issue by using local files instead of attempting to access the external URL, allowing tiktoken to use locally cached tokenizer files and preventing the ConnectionError in offline or restricted network environments [2].

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 19, 2025): <!-- Greeting --> @yoyomqs Hello there! I'm here to help you with any bugs, questions, or contributions while waiting for a human maintainer. <!-- Answer --> A similar issue was previously reported and closed. The problem was related to network connectivity, specifically a timeout when trying to connect to `openaipublic.blob.core.windows.net`. It was suggested to check for network restrictions or proxy settings that might be blocking the connection and ensure the necessary network configurations are in place to allow access to the required URLs <sup>[[1]](https://github.com/langgenius/dify/issues/694)</sup>. To resolve the ConnectionError in your private deployment, you can create and populate a local tiktoken cache directory and configure your Docker API service to use this local cache. Here are the steps: 1. Create and populate a local tiktoken cache directory: ```bash mkdir tiktoken cd tiktoken wget https://openaipublic.blob.core.windows.net/gpt-2/encodings/main/vocab.bpe cp vocab.bpe 6d1cbeee0f20b3d9449abfede4726ed8212e3aee wget https://openaipublic.blob.core.windows.net/gpt-2/encodings/main/encoder.json cp encoder.json 6c7ea1a7e38e3a7f062df639a5b80947f075ffe6 ``` 2. Add the following configuration to your Docker API service: ```yaml environment: TIKTOKEN_CACHE_DIR: /app/api/.tiktoken/ volumes: - ./volumes/plugin_daemon:/app/storage - ./tiktoken:/app/api/.tiktoken ``` These steps should help resolve the connection issue by using local files instead of attempting to access the external URL, allowing tiktoken to use locally cached tokenizer files and preventing the ConnectionError in offline or restricted network environments <sup>[[2]](https://github.com/langgenius/dify/issues/15849)</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/6449b0ca-9fbd-4445-8e6b-32444950bee9?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/6449b0ca-9fbd-4445-8e6b-32444950bee9?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/6449b0ca-9fbd-4445-8e6b-32444950bee9?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/6449b0ca-9fbd-4445-8e6b-32444950bee9?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/6449b0ca-9fbd-4445-8e6b-32444950bee9?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/6449b0ca-9fbd-4445-8e6b-32444950bee9?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/6449b0ca-9fbd-4445-8e6b-32444950bee9?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#11808