[Bug]: Exception: Can't connect to ES cluster
Is there an existing issue for the same bug?
- [x] I have checked the existing issues.
RAGFlow workspace code commit ID
无
RAGFlow image version
0.16.0
Other environment information
windows11
4070 8G
32G
Actual behavior
(base) PS F:\ragflow\docker> docker compose -f .\docker-compose-gpu-CN-oc9.yml -p ragflow up -d time="2025-02-27T23:02:07+08:00" level=warning msg="The "HF_ENDPOINT" variable is not set. Defaulting to a blank string." time="2025-02-27T23:02:07+08:00" level=warning msg="The "MACOS" variable is not set. Defaulting to a blank string." [+] Running 5/5 ✔ Container ragflow-redis Started 0.5s ✔ Container ragflow-es-01 Started 0.8s ✔ Container ragflow-mysql Healthy 11.3s ✔ Container ragflow-minio Started 0.8s ✔ Container ragflow-server Started
Expected behavior
ragflow-server
Traceback (most recent call last):
2025-02-27 23:17:47 File "/ragflow/rag/svr/task_executor.py", line 27, in
Steps to reproduce
docker compose -f .\docker-compose-gpu-CN-oc9.yml -p ragflow up -d
Additional information
service_conf.yaml
ragflow: host: 0.0.0.0 http_port: 9380 mysql: name: 'rag_flow' user: 'root' password: 'infini_rag_flow' host: 'mysql' port: 5455 max_connections: 100 stale_timeout: 30 minio: user: 'rag_flow' password: 'infini_rag_flow' host: 'minio:9000' es: hosts: 'http://es01:9200' username: 'elastic' password: 'infini_rag_flow' infinity: uri: 'infinity:23817' db_name: 'default_db' redis: db: 1 password: 'infini_rag_flow' host: 'redis:6379'
env
The type of doc engine to use.
Available options:
- elasticsearch (default)
- infinity (https://github.com/infiniflow/infinity)
DOC_ENGINE=${DOC_ENGINE:-elasticsearch}
------------------------------
docker env var for specifying vector db type at startup
(based on the vector db type, the corresponding docker
compose profile will be used)
------------------------------
COMPOSE_PROFILES=${DOC_ENGINE}
The version of Elasticsearch.
STACK_VERSION=8.11.3
The hostname where the Elasticsearch service is exposed
ES_HOST=es01
The port used to expose the Elasticsearch service to the host machine,
allowing EXTERNAL access to the service running inside the Docker container.
ES_PORT=9200 ELASTIC_USER=elastic
The password for Elasticsearch.
ELASTIC_PASSWORD=infini_rag_flow
The port used to expose the Kibana service to the host machine,
allowing EXTERNAL access to the service running inside the Docker container.
KIBANA_PORT=6601 KIBANA_USER=rag_flow KIBANA_PASSWORD=infini_rag_flow
The maximum amount of the memory, in bytes, that a specific Docker container can use while running.
Update it according to the available memory in the host machine.
MEM_LIMIT=8073741824
The hostname where the Infinity service is exposed
INFINITY_HOST=infinity
Port to expose Infinity API to the host
INFINITY_THRIFT_PORT=23817 INFINITY_HTTP_PORT=23820 INFINITY_PSQL_PORT=5432
The password for MySQL.
MYSQL_PASSWORD=infini_rag_flow
The hostname where the MySQL service is exposed
MYSQL_HOST=mysql
The database of the MySQL service to use
MYSQL_DBNAME=rag_flow
The port used to expose the MySQL service to the host machine,
allowing EXTERNAL access to the MySQL database running inside the Docker container.
MYSQL_PORT=5455
The hostname where the MinIO service is exposed
MINIO_HOST=minio
The port used to expose the MinIO console interface to the host machine,
allowing EXTERNAL access to the web-based console running inside the Docker container.
MINIO_CONSOLE_PORT=9001
The port used to expose the MinIO API service to the host machine,
allowing EXTERNAL access to the MinIO object storage service running inside the Docker container.
MINIO_PORT=9000
The username for MinIO.
When updated, you must revise the minio.user entry in service_conf.yaml accordingly.
MINIO_USER=rag_flow
The password for MinIO.
When updated, you must revise the minio.password entry in service_conf.yaml accordingly.
MINIO_PASSWORD=infini_rag_flow
The hostname where the Redis service is exposed
REDIS_HOST=redis
The port used to expose the Redis service to the host machine,
allowing EXTERNAL access to the Redis service running inside the Docker container.
REDIS_PORT=6379
The password for Redis.
REDIS_PASSWORD=infini_rag_flow
The port used to expose RAGFlow's HTTP API service to the host machine,
allowing EXTERNAL access to the service running inside the Docker container.
SVR_HTTP_PORT=9380
The RAGFlow Docker image to download.
Defaults to the v0.16.0-slim edition, which is the RAGFlow Docker image without embedding models.
RAGFLOW_IMAGE=infiniflow/ragflow:v0.16.0-slim
To download the RAGFlow Docker image with embedding models, uncomment the following line instead:
RAGFLOW_IMAGE=infiniflow/ragflow:v0.16.0
The Docker image of the v0.16.0 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
If you cannot download the RAGFlow Docker image:
- For the nightly-slim edition, uncomment either of the following:
RAGFLOW_IMAGE=swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:nightly-slim
RAGFLOW_IMAGE=registry.cn-hangzhou.aliyuncs.com/infiniflow/ragflow:nightly-slim
- For the nightly edition, uncomment either of the following:
RAGFLOW_IMAGE=swr.cn-north-4.myhuaweicloud.com/infiniflow/ragflow:nightly
RAGFLOW_IMAGE=registry.cn-hangzhou.aliyuncs.com/infiniflow/ragflow:nightly
The local time zone.
TIMEZONE='Asia/Shanghai'
Uncomment the following line if you have limited access to huggingface.co:
HF_ENDPOINT=https://hf-mirror.com
Optimizations for MacOS
Uncomment the following line if your OS is MacOS:
MACOS=1
The maximum file size for each uploaded file, in bytes.
You can uncomment this line and update the value if you wish to change the 128M file size limit
MAX_CONTENT_LENGTH=134217728
After making the change, ensure you update client_max_body_size in nginx/nginx.conf correspondingly.
The log level for the RAGFlow's owned packages and imported packages.
Available level:
- DEBUG
- INFO (default)
- WARNING
- ERROR
For example, following line changes the log level of ragflow.es_conn to DEBUG:
LOG_LEVELS=ragflow.es_conn=DEBUG
aliyun OSS configuration
STORAGE_IMPL=OSS
ACCESS_KEY=xxx
SECRET_KEY=eee
ENDPOINT=http://oss-cn-hangzhou.aliyuncs.com
REGION=cn-hangzhou
BUCKET=ragflow65536
之前运行docker-compose.yml是ok的 运行docker-compose-gpu-CN-oc9 ragflow-server 就 Exception: Can't connect to ES cluster
http://localhost:9200
{ "name" : "es01", "cluster_name" : "docker-cluster", "cluster_uuid" : "JMVD_sjNQyK2ogsknj725g", "version" : { "number" : "8.11.3", "build_flavor" : "default", "build_type" : "docker", "build_hash" : "64cf052f3b56b1fd4449f5454cb88aca7e739d9a", "build_date" : "2023-12-08T11:33:53.634979452Z", "build_snapshot" : false, "lucene_version" : "9.8.0", "minimum_wire_compatibility_version" : "7.17.0", "minimum_index_compatibility_version" : "7.0.0" }, "tagline" : "You Know, for Search" }
docker-compose-gpu-CN-oc9 is not maintained any more.
docker-compose-gpu-CN-oc9is not maintained any more.
How do I enable the GPU?
Why not remove CN-oc9 related yml if it's not maintained any more(and not work anymore), I downloaded the image and face the same error and then searched out here. It's not only waste on downloading containers but I have to remove them all. (Alright, just have to learn how to remove docker contains from cli)