infiniflow / ragflow

RAGFlow is an open-source RAG (Retrieval-Augmented Generation) engine based on deep document understanding.
https://ragflow.io
Apache License 2.0
10.07k stars 974 forks source link

[Bug]: Unable to connect to elastic search using default docker compose file since feat: Support Password Access for ElasticSearch (#1072) #1158

Closed commandblock2 closed 1 week ago

commandblock2 commented 1 week ago

Is there an existing issue for the same bug?

Branch name

main

Commit ID

195498daaabaa4e5b1356d96ea66307ee7af89fb

Other environment information

OS: Ubuntu 18.04
That's ancient and I know, I dont want to use this version too. But I dont thing that's relevant.

Actual behavior

...
ragflow-server  |   File "/ragflow/rag/svr/task_executor.py", line 28, in <module>
ragflow-server  |     from api.db.services.file2document_service import File2DocumentService
ragflow-server  |   File "/ragflow/api/db/services/__init__.py", line 18, in <module>
ragflow-server  |     from .user_service import UserService
ragflow-server  |   File "/ragflow/api/db/services/user_service.py", line 22, in <module>
ragflow-server  |     from api.db.db_models import DB, UserTenant
ragflow-server  |   File "/ragflow/api/db/db_models.py", line 32, in <module>
ragflow-server  |     from api.settings import DATABASE, stat_logger, SECRET_KEY
ragflow-server  |   File "/ragflow/api/settings.py", line 35, in <module>
ragflow-server  |     from rag.utils.es_conn import ELASTICSEARCH
ragflow-server  |   File "/ragflow/rag/utils/es_conn.py", line 460, in <module>
ragflow-server  |     ELASTICSEARCH = ESConnection()
ragflow-server  |   File "/ragflow/rag/utils/__init__.py", line 12, in _singleton
ragflow-server  |     instances[key] = cls(*args, **kw)
ragflow-server  |   File "/ragflow/rag/utils/es_conn.py", line 24, in __init__
ragflow-server  |     raise Exception("Can't connect to ES cluster")
ragflow-server  | Exception: Can't connect to ES cluster
ragflow-server  | Traceback (most recent call last):
ragflow-server  |   File "/ragflow/rag/svr/task_executor.py", line 28, in <module>
ragflow-server  |     from api.db.services.file2document_service import File2DocumentService
ragflow-server  |   File "/ragflow/api/db/services/__init__.py", line 18, in <module>
ragflow-server  |     from .user_service import UserService
ragflow-server  |   File "/ragflow/api/db/services/user_service.py", line 22, in <module>
ragflow-server  |     from api.db.db_models import DB, UserTenant
ragflow-server  |   File "/ragflow/api/db/db_models.py", line 32, in <module>
ragflow-server  |     from api.settings import DATABASE, stat_logger, SECRET_KEY
ragflow-server  |   File "/ragflow/api/settings.py", line 35, in <module>
ragflow-server  | Traceback (most recent call last):
ragflow-server  |   File "/ragflow/api/ragflow_server.py", line 26, in <module>
ragflow-server  |     from rag.utils.es_conn import ELASTICSEARCH
ragflow-server  |   File "/ragflow/rag/utils/es_conn.py", line 460, in <module>
ragflow-server  |     from api.apps import app
ragflow-server  |   File "/ragflow/api/apps/__init__.py", line 26, in <module>
ragflow-server  |     ELASTICSEARCH = ESConnection()
ragflow-server  |   File "/ragflow/rag/utils/__init__.py", line 12, in _singleton
ragflow-server  |     from api.db.db_models import close_connection
ragflow-server  |     instances[key] = cls(*args, **kw)
ragflow-server  |   File "/ragflow/rag/utils/es_conn.py", line 24, in __init__
ragflow-server  |   File "/ragflow/api/db/db_models.py", line 32, in <module>
ragflow-server  |     raise Exception("Can't connect to ES cluster")
ragflow-server  | Exception: Can't connect to ES cluster
ragflow-server  |     from api.settings import DATABASE, stat_logger, SECRET_KEY
ragflow-server  |   File "/ragflow/api/settings.py", line 35, in <module>
ragflow-server  |     from rag.utils.es_conn import ELASTICSEARCH
ragflow-server  |   File "/ragflow/rag/utils/es_conn.py", line 460, in <module>
ragflow-server  |     ELASTICSEARCH = ESConnection()
ragflow-server  |   File "/ragflow/rag/utils/__init__.py", line 12, in _singleton
ragflow-server  |     instances[key] = cls(*args, **kw)
ragflow-server  |   File "/ragflow/rag/utils/es_conn.py", line 24, in __init__
ragflow-server  |     raise Exception("Can't connect to ES cluster")
ragflow-server  | Exception: Can't connect to ES cluster
...

Expected behavior

ragflow-server boot without spitting errors

Steps to reproduce

- check out the commit mentioned previously
- remove all docker volume created by ragflow
- `docker-compose down` and `docker-compose rm` if nessary
- `cd docker`
- use `docker-compose up`

Additional information

ehh probably some misconfigured login setting idk

commandblock2 commented 1 week ago

sorry just found this https://github.com/infiniflow/ragflow/issues/1135 I will close this one.

yangboz commented 1 week ago

sorry just found this #1135 I will close this one.

1135 still on going, should not mark it completed , please.