局域网如何连接openaipublic.blob.core.windows.net? #436

Closed
opened 2026-02-21 17:27:10 -05:00 by yindo · 4 comments
Owner

Originally created by @lifeofbow on GitHub (Aug 25, 2023).

部署在开发环境的时候是正常的,部署在局域网不通外网的情况下,token校验已通过,但是提问没有反应,看日志去连openaipublic.blob.core.windows.net,是什么原因呢

dify-api-1 | During handling of the above exception, another exception occurred:
dify-api-1 |
dify-api-1 | Traceback (most recent call last):
dify-api-1 | File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send
dify-api-1 | resp = conn.urlopen(
dify-api-1 | File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 798, in urlopen
dify-api-1 | retries = retries.increment(
dify-api-1 | File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment
dify-api-1 | raise MaxRetryError(_pool, url, error or ResponseError(cause))
dify-api-1 | urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /gpt-2/encodings/main/vocab.bpe (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f6c2485b8e0>: Failed to establish a new connection: [Errno 111] Connection refused'))

Originally created by @lifeofbow on GitHub (Aug 25, 2023). 部署在开发环境的时候是正常的,部署在局域网不通外网的情况下,token校验已通过,但是提问没有反应,看日志去连openaipublic.blob.core.windows.net,是什么原因呢 dify-api-1 | During handling of the above exception, another exception occurred: dify-api-1 | dify-api-1 | Traceback (most recent call last): dify-api-1 | File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 489, in send dify-api-1 | resp = conn.urlopen( dify-api-1 | File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 798, in urlopen dify-api-1 | retries = retries.increment( dify-api-1 | File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment dify-api-1 | raise MaxRetryError(_pool, url, error or ResponseError(cause)) dify-api-1 | urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /gpt-2/encodings/main/vocab.bpe (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f6c2485b8e0>: Failed to establish a new connection: [Errno 111] Connection refused'))
yindo closed this issue 2026-02-21 17:27:10 -05:00
Author
Owner

@crazywoola commented on GitHub (Aug 25, 2023):

Because if you are using OpenAI as a provider it needs to have the access to the openaipublic.blob.core.windows.net.

@crazywoola commented on GitHub (Aug 25, 2023): Because if you are using OpenAI as a provider it needs to have the access to the `openaipublic.blob.core.windows.net`.
Author
Owner

@MichaelPorter0 commented on GitHub (Sep 25, 2023):

解决了吗

@MichaelPorter0 commented on GitHub (Sep 25, 2023): 解决了吗
Author
Owner

@Niraya666 commented on GitHub (Jan 1, 2024):

Reason: In an offline environment, TikToken and Jieba need internet access to obtain the segmentation files, leading to connection failure.

Solution: In an environment with internet access, successfully execute the knowledge base indexing once. This will generate data-gym-cache and jieba.cache in the /tmp directory of the worker_1 docker container. Copy the /tmp folder to the offline docker containers (docker_worker_1 and docker_api_1) to resolve the issue.

@Niraya666 commented on GitHub (Jan 1, 2024): Reason: In an offline environment, TikToken and Jieba need internet access to obtain the segmentation files, leading to connection failure. Solution: In an environment with internet access, successfully execute the knowledge base indexing once. This will generate data-gym-cache and jieba.cache in the /tmp directory of the worker_1 docker container. Copy the /tmp folder to the offline docker containers (docker_worker_1 and docker_api_1) to resolve the issue.
Author
Owner

@liqilong2017 commented on GitHub (Feb 21, 2025):

docker-worker-1 /tmp/ only jieba.cache,don't have the data-gym-cache dir

like this~
Image

@liqilong2017 commented on GitHub (Feb 21, 2025): docker-worker-1 /tmp/ only jieba.cache,don't have the data-gym-cache dir like this~ ![Image](https://github.com/user-attachments/assets/7a42744a-63fc-4e71-9f1d-5aff39e65754)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#436