Access to url ‘/console/api/datasets/indexing-estimate’ results in a 500 error #835

Closed
opened 2026-02-21 17:28:39 -05:00 by yindo · 2 comments
Owner

Originally created by @andylzming on GitHub (Dec 25, 2023).

Self Checks

Dify version

0.3.34

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  • Page error
    12

  • Error log as follows:

ERROR:app:Exception on /console/api/datasets/indexing-estimate [POST]
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn
    conn = connection.create_connection(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/connection.py", line 72, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/local/lib/python3.10/site-packages/gevent/_socketcommon.py", line 247, in getaddrinfo
    addrlist = get_hub().resolver.getaddrinfo(host, port, family, type, proto, flags)
  File "/usr/local/lib/python3.10/site-packages/gevent/resolver/thread.py", line 63, in getaddrinfo
    return self.pool.apply(_socket.getaddrinfo, args, kwargs)
  File "/usr/local/lib/python3.10/site-packages/gevent/pool.py", line 161, in apply
    return self.spawn(func, *args, **kwds).get()
  File "src/gevent/event.py", line 329, in gevent._gevent_cevent.AsyncResult.get
  File "src/gevent/event.py", line 359, in gevent._gevent_cevent.AsyncResult.get
  File "src/gevent/event.py", line 347, in gevent._gevent_cevent.AsyncResult.get
  File "src/gevent/event.py", line 327, in gevent._gevent_cevent.AsyncResult._raise_exception
  File "/usr/local/lib/python3.10/site-packages/gevent/_compat.py", line 66, in reraise
    raise value.with_traceback(tb)
  File "/usr/local/lib/python3.10/site-packages/gevent/threadpool.py", line 173, in __run_task
    thread_result.set(func(*args, **kwargs))
socket.gaierror: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 715, in urlopen
    httplib_response = self._make_request(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 404, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1058, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 363, in connect
    self.sock = conn = self._new_conn()
  File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 186, in _new_conn
    raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f83ba040ac0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 486, in send
    resp = conn.urlopen(
  File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 799, in urlopen
    retries = retries.increment(
  File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
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 0x7f83ba040ac0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1484, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1469, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/usr/local/lib/python3.10/site-packages/flask_restful/__init__.py", line 467, in wrapper
    resp = resource(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/flask/views.py", line 109, in view
    return current_app.ensure_sync(self.dispatch_request)(**kwargs)
  File "/usr/local/lib/python3.10/site-packages/flask_restful/__init__.py", line 582, in dispatch_request
    resp = meth(*args, **kwargs)
  File "/app/api/controllers/console/setup.py", line 79, in decorated
    return view(*args, **kwargs)
  File "/app/api/libs/login.py", line 94, in decorated_view
    return current_app.ensure_sync(func)(*args, **kwargs)
  File "/app/api/controllers/console/wraps.py", line 20, in decorated
    return view(*args, **kwargs)
  File "/app/api/controllers/console/datasets/datasets.py", line 269, in post
    response = indexing_runner.file_indexing_estimate(current_user.current_tenant_id, file_details,
  File "/app/api/core/indexing_runner.py", line 244, in file_indexing_estimate
    splitter = self._get_splitter(processing_rule)
  File "/app/api/core/indexing_runner.py", line 454, in _get_splitter
    character_splitter = RecursiveCharacterTextSplitter.from_tiktoken_encoder(
  File "/usr/local/lib/python3.10/site-packages/langchain/text_splitter.py", line 246, in from_tiktoken_encoder
    enc = tiktoken.get_encoding(encoding_name)
  File "/usr/local/lib/python3.10/site-packages/tiktoken/registry.py", line 63, in get_encoding
    enc = Encoding(**constructor())
  File "/usr/local/lib/python3.10/site-packages/tiktoken_ext/openai_public.py", line 11, in gpt2
    mergeable_ranks = data_gym_to_mergeable_bpe_ranks(
  File "/usr/local/lib/python3.10/site-packages/tiktoken/load.py", line 73, in data_gym_to_mergeable_bpe_ranks
    vocab_bpe_contents = read_file_cached(vocab_bpe_file).decode()
  File "/usr/local/lib/python3.10/site-packages/tiktoken/load.py", line 46, in read_file_cached
    contents = read_file(blobpath)
  File "/usr/local/lib/python3.10/site-packages/tiktoken/load.py", line 24, in read_file
    return requests.get(blobpath).content
  File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 73, in get
    return request("get", url, params=params, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 589, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 703, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 519, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: 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 0x7f83ba040ac0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))
WARNING:root:Check update version error: HTTPSConnectionPool(host='updates.dify.ai', port=443): Max retries exceeded with url: /?current_version=0.3.34 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f83ba1e7ca0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')).
WARNING:root:Check update version error: HTTPSConnectionPool(host='updates.dify.ai', port=443): Max retries exceeded with url: /?current_version=0.3.34 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f83ba1e6650>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')).
WARNING:root:Check update version error: HTTPSConnectionPool(host='updates.dify.ai', port=443): Max retries exceeded with url: /?current_version=0.3.34 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f83ba1e73a0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')).
[root@gpu-server docker]#

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @andylzming on GitHub (Dec 25, 2023). ### Self Checks - [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 file this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). ### Dify version 0.3.34 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce - Page error ![12](https://github.com/langgenius/dify/assets/21255047/e944d891-7aea-4999-a5f5-44386c55cb01) - Error log as follows: ``` ERROR:app:Exception on /console/api/datasets/indexing-estimate [POST] Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 174, in _new_conn conn = connection.create_connection( File "/usr/local/lib/python3.10/site-packages/urllib3/util/connection.py", line 72, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): File "/usr/local/lib/python3.10/site-packages/gevent/_socketcommon.py", line 247, in getaddrinfo addrlist = get_hub().resolver.getaddrinfo(host, port, family, type, proto, flags) File "/usr/local/lib/python3.10/site-packages/gevent/resolver/thread.py", line 63, in getaddrinfo return self.pool.apply(_socket.getaddrinfo, args, kwargs) File "/usr/local/lib/python3.10/site-packages/gevent/pool.py", line 161, in apply return self.spawn(func, *args, **kwds).get() File "src/gevent/event.py", line 329, in gevent._gevent_cevent.AsyncResult.get File "src/gevent/event.py", line 359, in gevent._gevent_cevent.AsyncResult.get File "src/gevent/event.py", line 347, in gevent._gevent_cevent.AsyncResult.get File "src/gevent/event.py", line 327, in gevent._gevent_cevent.AsyncResult._raise_exception File "/usr/local/lib/python3.10/site-packages/gevent/_compat.py", line 66, in reraise raise value.with_traceback(tb) File "/usr/local/lib/python3.10/site-packages/gevent/threadpool.py", line 173, in __run_task thread_result.set(func(*args, **kwargs)) socket.gaierror: [Errno -3] Temporary failure in name resolution During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 715, in urlopen httplib_response = self._make_request( File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 404, in _make_request self._validate_conn(conn) File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1058, in _validate_conn conn.connect() File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 363, in connect self.sock = conn = self._new_conn() File "/usr/local/lib/python3.10/site-packages/urllib3/connection.py", line 186, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7f83ba040ac0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 486, in send resp = conn.urlopen( File "/usr/local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 799, in urlopen retries = retries.increment( File "/usr/local/lib/python3.10/site-packages/urllib3/util/retry.py", line 592, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) 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 0x7f83ba040ac0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1484, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python3.10/site-packages/flask/app.py", line 1469, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) File "/usr/local/lib/python3.10/site-packages/flask_restful/__init__.py", line 467, in wrapper resp = resource(*args, **kwargs) File "/usr/local/lib/python3.10/site-packages/flask/views.py", line 109, in view return current_app.ensure_sync(self.dispatch_request)(**kwargs) File "/usr/local/lib/python3.10/site-packages/flask_restful/__init__.py", line 582, in dispatch_request resp = meth(*args, **kwargs) File "/app/api/controllers/console/setup.py", line 79, in decorated return view(*args, **kwargs) File "/app/api/libs/login.py", line 94, in decorated_view return current_app.ensure_sync(func)(*args, **kwargs) File "/app/api/controllers/console/wraps.py", line 20, in decorated return view(*args, **kwargs) File "/app/api/controllers/console/datasets/datasets.py", line 269, in post response = indexing_runner.file_indexing_estimate(current_user.current_tenant_id, file_details, File "/app/api/core/indexing_runner.py", line 244, in file_indexing_estimate splitter = self._get_splitter(processing_rule) File "/app/api/core/indexing_runner.py", line 454, in _get_splitter character_splitter = RecursiveCharacterTextSplitter.from_tiktoken_encoder( File "/usr/local/lib/python3.10/site-packages/langchain/text_splitter.py", line 246, in from_tiktoken_encoder enc = tiktoken.get_encoding(encoding_name) File "/usr/local/lib/python3.10/site-packages/tiktoken/registry.py", line 63, in get_encoding enc = Encoding(**constructor()) File "/usr/local/lib/python3.10/site-packages/tiktoken_ext/openai_public.py", line 11, in gpt2 mergeable_ranks = data_gym_to_mergeable_bpe_ranks( File "/usr/local/lib/python3.10/site-packages/tiktoken/load.py", line 73, in data_gym_to_mergeable_bpe_ranks vocab_bpe_contents = read_file_cached(vocab_bpe_file).decode() File "/usr/local/lib/python3.10/site-packages/tiktoken/load.py", line 46, in read_file_cached contents = read_file(blobpath) File "/usr/local/lib/python3.10/site-packages/tiktoken/load.py", line 24, in read_file return requests.get(blobpath).content File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 73, in get return request("get", url, params=params, **kwargs) File "/usr/local/lib/python3.10/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, **kwargs) File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) File "/usr/local/lib/python3.10/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python3.10/site-packages/requests/adapters.py", line 519, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: 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 0x7f83ba040ac0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')) WARNING:root:Check update version error: HTTPSConnectionPool(host='updates.dify.ai', port=443): Max retries exceeded with url: /?current_version=0.3.34 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f83ba1e7ca0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')). WARNING:root:Check update version error: HTTPSConnectionPool(host='updates.dify.ai', port=443): Max retries exceeded with url: /?current_version=0.3.34 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f83ba1e6650>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')). WARNING:root:Check update version error: HTTPSConnectionPool(host='updates.dify.ai', port=443): Max retries exceeded with url: /?current_version=0.3.34 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f83ba1e73a0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')). [root@gpu-server docker]# ``` ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 17:28:39 -05:00
yindo closed this issue 2026-02-21 17:28:39 -05:00
Author
Owner

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

Seems a network issue to me, you need to make sure you can access openaipublic.blob.core.windows.net.

@crazywoola commented on GitHub (Dec 25, 2023): Seems a network issue to me, you need to make sure you can access `openaipublic.blob.core.windows.net`.
Author
Owner

@andylzming commented on GitHub (Dec 25, 2023):

Seems a network issue to me, you need to make sure you can access openaipublic.blob.core.windows.net.

My network environment is on an intranet and cannot access the internet. The used LLM and embedding models are all deployed offline using xinference.

@andylzming commented on GitHub (Dec 25, 2023): > Seems a network issue to me, you need to make sure you can access `openaipublic.blob.core.windows.net`. My network environment is on an intranet and cannot access the internet. The used LLM and embedding models are all deployed offline using xinference.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#835