ragflow icon indicating copy to clipboard operation
ragflow copied to clipboard

When the "docker logs -f ragflow-server" command is run in offline deployment, the request address times out

Open liukx362330 opened this issue 1 year ago • 5 comments

Is there an existing issue for the same bug?

  • [X] I have checked the existing issues.

Branch name

main

Commit ID

081f922

Other environment information

No response

Actual behavior

pull down the image from the Internet, and report this connection to a website timeout when migrating to the Intranet for installation

Expected behavior

I'd like to deploy it on the Intranet

Steps to reproduce

load the related image and copy the source code, the first step: cd ragflow/docker, the second step: chmod +x./entrypoint. docker compose- f docker-compose-CN.yml up -d, Step 4: docker logs -f ragflow-server

Additional information

Traceback (most recent call last): File "/ragflow/api/ragflow_server.py", line 26, in from api.apps import app File "/ragflow/api/apps/init.py", line 26, in from api.db.db_models import close_connection File "/ragflow/api/db/db_models.py", line 32, in from api.settings import DATABASE, stat_logger, SECRET_KEY File "/ragflow/api/settings.py", line 35, in from rag.utils.es_conn import ELASTICSEARCH File "/ragflow/rag/utils/init.py", line 59, in encoder = tiktoken.encoding_for_model("gpt-3.5-turbo") File "/usr/local/lib/python3.10/dist-packages/tiktoken/model.py", line 101, in encoding_for_model return get_encoding(encoding_name_for_model(model_name)) File "/usr/local/lib/python3.10/dist-packages/tiktoken/registry.py", line 73, in get_encoding enc = Encoding(**constructor()) File "/usr/local/lib/python3.10/dist-packages/tiktoken_ext/openai_public.py", line 72, in cl100k_base mergeable_ranks = load_tiktoken_bpe( File "/usr/local/lib/python3.10/dist-packages/tiktoken/load.py", line 147, in load_tiktoken_bpe contents = read_file_cached(tiktoken_bpe_file, expected_hash) File "/usr/local/lib/python3.10/dist-packages/tiktoken/load.py", line 64, in read_file_cached contents = read_file(blobpath) File "/usr/local/lib/python3.10/dist-packages/tiktoken/load.py", line 25, in read_file resp = requests.get(blobpath) File "/usr/local/lib/python3.10/dist-packages/requests/api.py", line 73, in get return request("get", url, params=params, **kwargs) File "/usr/local/lib/python3.10/dist-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, **kwargs) File "/usr/local/lib/python3.10/dist-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) File "/usr/local/lib/python3.10/dist-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python3.10/dist-packages/requests/adapters.py", line 507, in send raise ConnectTimeout(e, request=request) requests.exceptions.ConnectTimeout: HTTPSConnectionPool(host='openaipublic.blob.core.windows.net', port=443): Max retries exceeded with url: /encodings/cl100k_base.tiktoken (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x7f4dd75afac0>, 'Connection to openaipublic.blob.core.windows.net timed out. (connect timeout=None)'))

liukx362330 avatar May 19 '24 02:05 liukx362330

Tokenizer model should not be hardcoded in line: tiktoken.encoding_for_model("gpt-3.5-turbo")

dingsa0210 avatar May 22 '24 01:05 dingsa0210

have you solved it? I also encountered this problem

ye-jeck avatar May 22 '24 08:05 ye-jeck

may be you can try to add proxy to the docker yml file. environment:

  • TZ=${TIMEZONE}
  • HF_ENDPOINT=https://hf-mirror.com/
  • HTTP_PROXY=
  • HTTPS_PROXY=
  • NO_PROXY=

liwan14x avatar May 23 '24 08:05 liwan14x

may be you can try to add proxy to the docker yml file. environment:

  • TZ=${TIMEZONE}
  • HF_ENDPOINT=https://hf-mirror.com/
  • HTTP_PROXY=
  • HTTPS_PROXY=
  • NO_PROXY=

The Internet environment is fine, no network agent can not work.

wuangqshd avatar Jun 27 '24 14:06 wuangqshd

This happening to me as well, are you able to register your account with this error ? in login screen ? I get 502 gateway error

raymond-infinitecode avatar Oct 01 '24 12:10 raymond-infinitecode

docker/.env says

# The RAGFlow Docker image to download.
# Defaults to the dev-slim edition, which is the RAGFlow Docker image without embedding models.
RAGFLOW_IMAGE=infiniflow/ragflow:dev-slim
#
# To download the RAGFlow Docker image with embedding models, uncomment the following line instead:
# RAGFLOW_IMAGE=infiniflow/ragflow:dev
# 
# The Docker image of the dev edition includes:
# - Built-in embedding models:
#   - BAAI/bge-large-zh-v1.5
#   - BAAI/bge-reranker-v2-m3
#   - maidalun1020/bce-embedding-base_v1
#   - maidalun1020/bce-reranker-base_v1
# - Embedding models that will be downloaded once you select them in the RAGFlow UI:
#   - BAAI/bge-base-en-v1.5
#   - BAAI/bge-large-en-v1.5
#   - BAAI/bge-small-en-v1.5
#   - BAAI/bge-small-zh-v1.5
#   - jinaai/jina-embeddings-v2-base-en
#   - jinaai/jina-embeddings-v2-small-en
#   - nomic-ai/nomic-embed-text-v1.5
#   - sentence-transformers/all-MiniLM-L6-v2

yuzhichang avatar Nov 26 '24 07:11 yuzhichang