Closed yangboz closed 2 months ago
Have you checked the FAQ document?
Have you checked the FAQ document?
where is it ? in README.MD. thanks.
Make sure the code you pull and docker image you pull are on the same version. Do not use main branch code to run 0.7.0 version of docker image.
Make sure the code you pull and docker image you pull are on the same version. Do not use main branch code to run 0.7.0 version of docker image.
did you mean change the version from of Elastic products STACK_VERSION=8.11.3 to 0.7.0 in .env file?
Make sure the code you pull and docker image you pull are on the same version. Do not use main branch code to run 0.7.0 version of docker image.
even though after running ```docker-compose up -d , and verified rag flow-es01 is healthy, because of /ragflow/api/ragflow_server.py", line 26, in
Make sure the code you pull and docker image you pull are on the same version. Do not use main branch code to run 0.7.0 version of docker image.
did you mean change the version from of Elastic products STACK_VERSION=8.11.3 to 0.7.0 in .env file?
No. It refers to the version of RAGFlow docker image. I suggest you to use dev version of docker image and pull the latest code.
Again, after git reset --hard HEAD, docker-compose -f docker-compose-base.yml, move out ragflow_erver.py out of the api file folder, then direct run python ragflow_erver.py
, errors thrown as following :
Connection error caused by: ProtocolError(('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')))
[WARNING] [2024-06-14 17:14:56,205] [_node_pool.mark_dead] [line:249]: Node <Urllib3HttpNode(http://es01:9200)> has failed for 8 times in a row, putting on 30 second timeout
Traceback (most recent call last):
File "/Users/yangboz/git/ragflow/ragflow_server.py", line 26, in <module>
from api.apps import app
File "/Users/yangboz/git/ragflow/api/apps/__init__.py", line 26, in <module>
from api.db.db_models import close_connection
File "/Users/yangboz/git/ragflow/api/db/db_models.py", line 32, in <module>
from api.settings import DATABASE, stat_logger, SECRET_KEY
File "/Users/yangboz/git/ragflow/api/settings.py", line 35, in <module>
from rag.utils.es_conn import ELASTICSEARCH
File "/Users/yangboz/git/ragflow/rag/utils/es_conn.py", line 462, in <module>
ELASTICSEARCH = ESConnection()
^^^^^^^^^^^^^^
any idea? or any documents with this debug way. thanks.
maybe is "" http://es01:9200)" in codebase debug level , the domain of http://es01 is not working , should be replaced with localhost or 0.0.0.0?
@yangboz , I posted the exact same issue in response to https://github.com/infiniflow/ragflow/issues/231?notification_referrer_id=NT_kwDOAANVr7IxMDEyNDA5ODExNjoyMTg1NDM#issuecomment-2153495658. The issue was closed with no explanation. This was (is) a legitimate problem.
We followed, exactly, the instructions at https://ragflow.io/docs/dev/#start-up-the-server. Twice, actually. And we were stuck with the error.
Today, we pulled the latest from the repo (again), and then ran docker compose up -d
and it came to life. Try these steps. And note you may still get an error, but it's likely an error saying you haven't supplied keys for AI integration.
ragflow
, cd to ragflow/docker
.chmod ugo+x ./entrypoint.sh
.docker compose up -d
It should come up. At the time of this posting, HEAD
points to #957cd55
verified it only works with 0.7.0 version on ubuntu22.04, except on macOS M1 with any version of it . : -(
I turned off the authentication for elasticsearch and skipped this error 😅
environment:
- node.name=es01
# - ELASTIC_PASSWORD=${ELASTIC_PASSWORD}
- bootstrap.memory_lock=false
- discovery.type=single-node
- xpack.security.enabled=false
- xpack.security.http.ssl.enabled=false
- xpack.security.transport.ssl.enabled=false
- TZ=${TIMEZONE}
I turned off the authentication for elasticsearch and skipped this error 😅
environment: - node.name=es01 # - ELASTIC_PASSWORD=${ELASTIC_PASSWORD} - bootstrap.memory_lock=false - discovery.type=single-node - xpack.security.enabled=false - xpack.security.http.ssl.enabled=false - xpack.security.transport.ssl.enabled=false - TZ=${TIMEZONE}
worth have a try.
a working around is modify the ES configuration of local running local dev version of service_conf.yaml in respect of 0.0.0.0:12000->9200/tcp, :::12000->9200/tcp
a working around is modify the ES configuration of local running local dev version of service_conf.yaml in respect of 0.0.0.0:12000->9200/tcp, :::12000->9200/tcp
Can you provide a specific solution on how and where this setting should be changed? Thank you very much! @yangboz
a working around is modify the ES configuration of local running local dev version of service_conf.yaml in respect of 0.0.0.0:12000->9200/tcp, :::12000->9200/tcp
Can you provide a specific solution on how and where this setting should be changed? Thank you very much! @yangboz
then change the host and port in conf/service_conf.yaml to overwrite the default .env in docker system.
我用中文回答吧,我也碰到了这个问题,我是win11 docker桌面版,用的是DEV分支。 进入elasticsearch docker执行设置用户名和密码的命令,重置所有密码为:infini_rag_flow
1.docker exec -it ragflow-es-01 /bin/bash 2.bin/elasticsearch-setup-passwords interactive
密码重置完成后,等待1分钟左右就可以正常使用了
In my case it resolved when I update the es hosts to below on service_conf.yaml, it it helps anyone.
es:
hosts: 'http://ragflow-es-01:9200'
This could be an overly excessive solution, but you can just edit /etc/hosts
or alternatively, configure the DNS to point the resolution of es01
to 127.0.0.1
.
Also notice that for some reason the es01 is running at port 1200 rather than 9200 on the host. You can find it out by docker ps
.
In my case it resolved when I update the es hosts to below on service_conf.yaml, it it helps anyone.
es: hosts: 'http://ragflow-es-01:9200'
I use docker compose to run it, I check the hosts of redis,mysql,es01,minio in the ragflow container, it's all working. So this isn't my case.
I also tried to bin/elasticsearch-setup-passwords interactive
to reset all the passwords to infini_rag_flow
, but it's the same error.
If you use docker and default configuration, hosts: http://es01:9200
Yes, I tested using curl -v -u elastic:infini_rag_flow xxx
, the es should running ok. But the ragflow-server seems didn't pass the authentication info.
I found the issue is the auth of es is not used, strange?
That because it's a little complicated for most of user to configure. Even though, a lot of people fail on ES installation.
I tried to update es_conn.py
in the ragflow container according to https://github.com/infiniflow/ragflow/commit/195498daaabaa4e5b1356d96ea66307ee7af89fb via adding this two lines of code.
basic_auth=(settings.ES["username"], settings.ES["password"]) if "username" in settings.ES and "password" in settings.ES else None,
verify_certs=False,
Then the original errors changed to Fail to connect to es: Connection error caused by: ConnectionError(Connection error caused by: NewConnectionError(<urllib3.connection.HTTPConnection object at 0x7f0e44f71050>: Failed to establish a new connection: [Errno 111] Connection refused))
.
Maybe the image edwardelric233/ragflow:oc9
is too old, so I changed edwardelric233/ragflow:oc9
to registry.cn-hangzhou.aliyuncs.com/infiniflow/ragflow:dev-slim
. And now it seems working now. But I see some other warnings.
ragflow-server | /ragflow/.venv/lib/python3.12/site-packages/scholarly/_scholarly.py:312: SyntaxWarning: invalid escape sequence '\d'
ragflow-server | m = re.search("cites=[\d+,]*", object["citedby_url"])
ragflow-server | /ragflow/.venv/lib/python3.12/site-packages/bibtexparser/latexenc.py:93: SyntaxWarning: invalid escape sequence '\g'
ragflow-server | string = re.sub('([^{]|^)([A-Z])([^}]|$)', '\g<1>{\g<2>}\g<3>', string)
ragflow-server | /ragflow/.venv/lib/python3.12/site-packages/graspologic/align/seedless_procrustes.py:18: SyntaxWarning: invalid escape sequence '\i'
ragflow-server | """
ragflow-server | /ragflow/.venv/lib/python3.12/site-packages/ot/gromov/_quantized.py:233: SyntaxWarning: invalid escape sequence '\m'
ragflow-server | """
ragflow-server | /ragflow/.venv/lib/python3.12/site-packages/ot/gromov/_quantized.py:338: SyntaxWarning: invalid escape sequence '\m'
ragflow-server | """
ragflow-server | /ragflow/.venv/lib/python3.12/site-packages/ot/gromov/_quantized.py:411: SyntaxWarning: invalid escape sequence '\m'
ragflow-server | """
ragflow-server | /ragflow/.venv/lib/python3.12/site-packages/ot/gromov/_quantized.py:764: SyntaxWarning: invalid escape sequence '\m'
ragflow-server | """
ragflow-server | /ragflow/.venv/lib/python3.12/site-packages/ot/gromov/_quantized.py:857: SyntaxWarning: invalid escape sequence '\m'
ragflow-server | """
ragflow-server | [WARNING] Load term.freq FAIL!
ragflow-server | [WARNING] Load term.freq FAIL!
ragflow-server |
ragflow-server | ____ ___ ______ ______ __
ragflow-server | / __ \ / | / ____// ____// /____ _ __
ragflow-server | / /_/ // /| | / / __ / /_ / // __ \| | /| / /
ragflow-server | / _, _// ___ |/ /_/ // __/ / // /_/ /| |/ |/ /
ragflow-server | /_/ |_|/_/ |_|\____//_/ /_/ \____/ |__/|__/
ragflow-server |
ragflow-server |
ragflow-server | /ragflow/.venv/lib/python3.12/site-packages/hyppo/kgof/kernel.py:93: SyntaxWarning: invalid escape sequence '\s'
ragflow-server | """
ragflow-server | /ragflow/.venv/lib/python3.12/site-packages/hyppo/kgof/kernel.py:132: SyntaxWarning: invalid escape sequence '\s'
ragflow-server | """
ragflow-server | /ragflow/.venv/lib/python3.12/site-packages/hyppo/kgof/kernel.py:234: SyntaxWarning: invalid escape sequence '\s'
ragflow-server | """
ragflow-server | /ragflow/.venv/lib/python3.12/site-packages/graspologic/match/wrappers.py:74: SyntaxWarning: invalid escape sequence '\s'
ragflow-server | """
ragflow-server | /ragflow/.venv/lib/python3.12/site-packages/graspologic/pipeline/embed/adjacency_spectral_embedding.py:37: SyntaxWarning: invalid escape sequence '\S'
ragflow-server | """
ragflow-server | /ragflow/.venv/lib/python3.12/site-packages/graspologic/pipeline/embed/laplacian_spectral_embedding.py:38: SyntaxWarning: invalid escape sequence '\S'
ragflow-server | """
ragflow-server | /ragflow/graphrag/entity_resolution.py:189: SyntaxWarning: invalid escape sequence '\d'
ragflow-server | pattern_int = f"{re.escape(entity_index_delimiter)}(\d+){re.escape(entity_index_delimiter)}"
ragflow-server | [INFO] [2024-10-02 23:05:49,029] [_internal._log] [line:97]: WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
ragflow-server | * Running on all addresses (0.0.0.0)
ragflow-server | * Running on http://127.0.0.1:9380
ragflow-server | * Running on http://172.26.0.6:9380
ragflow-server | [INFO] [2024-10-02 23:05:49,030] [_internal._log] [line:97]: Press CTRL+C to quit
I found these warnings are coming from the docstring, for example /ragflow/.venv/lib/python3.12/site-packages/ot/gromov/_quantized.py:233. For these warnings, see also Python3.12 SyntaxWarning on triplequoted string \d
must be \\d
, How to fix "SyntaxWarning: invalid escape sequence" in Python?
I see.
Describe your problem
ping triggled exception for ever requesting from frontend.
File "/ragflow/rag/utils/es_conn.py", line 24, in init raise Exception("Can't connect to ES cluster") Exception: Can't connect to ES cluster Traceback (most recent call last): File "/ragflow/rag/svr/task_executor.py", line 28, in
Traceback (most recent call last):
File "/ragflow/api/ragflow_server.py", line 26, in
from api.db.services.file2document_service import File2DocumentService
File "/ragflow/api/db/services/init.py", line 18, in
from api.apps import app
File "/ragflow/api/apps/init.py", line 26, in
from .user_service import UserService
File "/ragflow/api/db/services/user_service.py", line 22, in
from api.db.db_models import close_connection
File "/ragflow/api/db/db_models.py", line 32, in
from api.db.db_models import DB, UserTenant
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 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/es_conn.py", line 460, in
from rag.utils.es_conn import ELASTICSEARCH
File "/ragflow/rag/utils/es_conn.py", line 460, in
ELASTICSEARCH = ESConnection()
File "/ragflow/rag/utils/init.py", line 12, in _singleton
ELASTICSEARCH = ESConnection()
File "/ragflow/rag/utils/init.py", line 12, in _singleton
instances[key] = cls(*args, *kw)
File "/ragflow/rag/utils/es_conn.py", line 24, in init
instances[key] = cls(args, **kw)
File "/ragflow/rag/utils/es_conn.py", line 24, in init
raise Exception("Can't connect to ES cluster")
any idea?
thanks.
maybe it is ES docker image related M1 issue only?