[Bug]: Login RAGFlow with error code 502
Is there an existing issue for the same bug?
- [x] I have checked the existing issues.
RAGFlow workspace code commit ID
20250209
RAGFlow image version
v0.16.0
Other environment information
OS type:centos7.9
Hardware parameters: 处理器8 内存16
Actual behavior
centos7.9根据https://ragflow.io/docs/dev/ 描述部署安装后,修改了docker/.env 中相应地更新变量 RAGFLOW_IMAGE=infiniflow/ragflow:v0.16.0 ;登录页面输入邮箱密码,点击登录没有反应,f12查看后502错误,
Expected behavior
No response
Steps to reproduce
根据以下官网连接步骤执行:https://ragflow.io/docs/dev/
Additional information
以下是具体的命令调试: [root@localhost ragflow]# docker compose -f docker/docker-compose.yml up -d WARN[0000] The "HF_ENDPOINT" variable is not set. Defaulting to a blank string. WARN[0000] The "MACOS" variable is not set. Defaulting to a blank string. [+] Running 4/4 ✔ Container ragflow-minio Running 0.0s ✔ Container ragflow-mysql Healthy 0.5s ✔ Container ragflow-redis Running 0.0s ✔ Container ragflow-server Running 0.0s [root@localhost ragflow]# docker compose ps no configuration file provided: not found [root@localhost ragflow]# cd .. [root@localhost tianfy]# docker compose ps no configuration file provided: not found [root@localhost tianfy]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 90d53f253bf1 infiniflow/ragflow:v0.16.0 "./entrypoint.sh" 52 minutes ago Up 41 minutes 0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, :::443->443/tcp, 0.0.0.0:9380->9380/tcp, :::9380->9380/tcp ragflow-server ff0640fc359e quay.io/minio/minio:RELEASE.2023-12-20T01-00-02Z "/usr/bin/docker-ent…" 52 minutes ago Up 30 minutes 0.0.0.0:9000-9001->9000-9001/tcp, :::9000-9001->9000-9001/tcp ragflow-minio f1861338dad1 mysql:8.0.39 "docker-entrypoint.s…" 52 minutes ago Up 30 minutes (healthy) 33060/tcp, 0.0.0.0:5455->3306/tcp, :::5455->3306/tcp ragflow-mysql 45d3e0172772 valkey/valkey:8 "docker-entrypoint.s…" 52 minutes ago Up 30 minutes 0.0.0.0:6379->6379/tcp, :::6379->6379/tcp ragflow-redis [root@localhost tianfy]# docker restart 90d 90d [root@localhost tianfy]# docker -v Docker version 26.1.4, build 5650f9b [root@localhost tianfy]# docker-compose --version bash: docker-compose: command not found... [root@localhost tianfy]# cd ragflow [root@localhost ragflow]# ls agent conf deepdoc Dockerfile Dockerfile.scratch.oc9 download_deps.py graphrag intergrations pyproject.toml README_id.md README_ko.md README_pt_br.md README_zh.md SECURITY.md uv.lock api CONTRIBUTING.md docker Dockerfile.deps docs example helm LICENSE rag README_ja.md README.md README_tzh.md sdk show_env.sh web [root@localhost ragflow]# cd docker [root@localhost docker]# ls docker-compose-base.yml docker-compose-gpu-CN-oc9.yml docker-compose-macos.yml entrypoint-parser.sh infinity_conf.toml launch_backend_service.sh ragflow-logs service_conf.yaml.template docker-compose-CN-oc9.yml docker-compose-gpu.yml docker-compose.yml entrypoint.sh init.sql nginx README.md [root@localhost docker]# cat nginx cat: nginx: Is a directory [root@localhost docker]# cd nginx [root@localhost nginx]# ls nginx.conf proxy.conf ragflow.conf [root@localhost nginx]# cat nginx.conf user root; worker_processes auto;
error_log /var/log/nginx/error.log notice; pid /var/run/nginx.pid;
events { worker_connections 1024; }
http { include /etc/nginx/mime.types; default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
client_max_body_size 128M;
include /etc/nginx/conf.d/ragflow.conf;
}
[root@localhost nginx]# cd.. bash: cd..: command not found... [root@localhost nginx]# cd .. [root@localhost docker]# cd .. [root@localhost ragflow]# docker compose -f docker/docker-compose.yml up -d WARN[0000] The "HF_ENDPOINT" variable is not set. Defaulting to a blank string. WARN[0000] The "MACOS" variable is not set. Defaulting to a blank string. [+] Running 4/4 ✔ Container ragflow-redis Running 0.0s ✔ Container ragflow-mysql Healthy 0.5s ✔ Container ragflow-minio Running 0.0s ✔ Container ragflow-server Running
这是啥问题导致的,我也有这个问题
We intend to create an international community, so we encourage using English for communication.
We intend to create an international community, so we encourage using English for communication.
ok, This is an error log:
2025-02-10 09:11:57,292 INFO 310
____ ___ ______ ______ __
/ __ \ / | / // // / _ __
/ // // /| | / / __ / / / // __ | | /| / /
/ , // ___ |/ // // __/ / // // /| |/ |/ /
// ||// ||_/// // _/ |/|__/
2025-02-10 09:11:57,293 INFO 310 RAGFlow version: v0.16.0 full
2025-02-10 09:11:57,293 INFO 310 project base: /ragflow
2025-02-10 09:11:57,294 INFO 310 Current configs, from /ragflow/conf/service_conf.yaml:
ragflow: {'host': '0.0.0.0', 'http_port': 9380}
mysql: {'name': 'rag_flow', 'user': 'root', 'password': '', 'host': 'mysql', 'port': 3306, 'max_connections': 100, 'stale_timeout': 30}
minio: {'user': 'rag_flow', 'password': '', 'host': 'minio:9000'}
es: {'hosts': 'http://es01:9200', 'username': 'elastic', 'password': ''}
infinity: {'uri': 'infinity:23817', 'db_name': 'default_db'}
redis: {'db': 1, 'password': '', 'host': 'redis:6379'}
2025-02-10 09:11:57,295 INFO 310 Use Elasticsearch http://es01:9200 as the doc engine.
2025-02-10 09:11:57,553 INFO 288 HEAD http://es01:9200/ [status:N/A duration:4.024s]
2025-02-10 09:11:57,554 WARNING 288 Node <Urllib3HttpNode(http://es01:9200)> has failed for 8 times in a row, putting on 30 second timeout
2025-02-10 09:11:57,555 ERROR 288 Elasticsearch http://es01:9200 is unhealthy in 120s.
Traceback (most recent call last):
File "/ragflow/rag/svr/task_executor.py", line 737, in
docker-compose up -d es01
@.*** tianfy]# cd ragflow @.*** ragflow]# docker-compose up -d es01 bash: docker-compose: command not found... @.*** ragflow]# ls agent deepdoc Dockerfile.scratch.oc9 graphrag pyproject.toml README_ko.md README_zh.md uv.lock api docker docs helm rag README.md sdk web conf Dockerfile download_deps.py intergrations README_id.md README_pt_br.md SECURITY.md CONTRIBUTING.md Dockerfile.deps example LICENSE README_ja.md README_tzh.md show_env.sh @.*** ragflow]# cd docker @.*** docker]# ls docker-compose-base.yml docker-compose-gpu.yml entrypoint-parser.sh init.sql ragflow-logs docker-compose-CN-oc9.yml docker-compose-macos.yml entrypoint.sh launch_backend_service.sh README.md docker-compose-gpu-CN-oc9.yml docker-compose.yml infinity_conf.toml nginx service_conf.yaml.template @.*** docker]# docker-compose up -d es01 bash: docker-compose: command not found... @.*** docker]#
田凤叶 @.***
------------------ 原始邮件 ------------------ 发件人: "infiniflow/ragflow" @.>; 发送时间: 2025年2月10日(星期一) 上午9:47 @.>; @.@.>; 主题: Re: [infiniflow/ragflow] [Bug]: Login RAGFlow with error code 502 (Issue #4815)
docker-compose up -d es01
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>
看看docker ps -a有没有elasticsearch的容器,没有试试下面的命令,应该会创建的
docker compose -f docker-compose-base.yml up -d
我的是这样解决的
我试试
田凤叶 @.***
------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2025年2月10日(星期一) 下午5:29 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [infiniflow/ragflow] [Bug]: Login RAGFlow with error code 502 (Issue #4815)
看看docker ps -a有没有elasticsearch的容器,没有试试下面的命令,应该会创建的 docker compose -f docker-compose-base.yml up -d 我的是这样解决的
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>
我也是注册显示502,有什么好的解决方案吗
看看docker ps -a有没有elasticsearch的容器,没有试试下面的命令,应该会创建的 docker compose -f docker-compose-base.yml up -d 我的是这样解决的
田凤叶 @.***
------------------ 原始邮件 ------------------ 发件人: "infiniflow/ragflow" @.>; 发送时间: 2025年2月13日(星期四) 上午9:55 @.>; @.@.>; 主题: Re: [infiniflow/ragflow] [Bug]: Login RAGFlow with error code 502 (Issue #4815)
我也是注册显示502,有什么好的解决方案吗
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>
有人解决这个问题了嘛?咋解决的?
解决方案:docker compose -f docker-compose-base.yml up -d
docker compose -f docker-compose-base.yml up -d
田凤叶 @.***
------------------ 原始邮件 ------------------ 发件人: "infiniflow/ragflow" @.>; 发送时间: 2025年2月13日(星期四) 中午1:57 @.>; @.@.>; 主题: Re: [infiniflow/ragflow] [Bug]: Login RAGFlow with error code 502 (Issue #4815)
有人解决这个问题了嘛?咋解决的?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>
解决方案:docker compose -f docker-compose-base.yml up -d
这个方法很有用
I used Windows Docker desktop.The problem wasn't solved after using docker compose -f docker-compose-base.yml up -d.My question is register and login 502 Bad Gateway. register-server.ts:24 POST http://localhost/v1/user/register 502 (Bad Gateway) Failed: TypeError: Cannot read properties of null (reading 'data') at login-hooks.ts:68:15
所有容器都运行成功,也是登录报错502,然后我关闭了代理,就不报502错误了,但是报hint 109错误
这个不是BUG,是使用问题,如果你是如下和我一样的报错,可以参考我的解决步骤 是使用问题,我这边完美解决了这个问题,解决步骤如下: 问题: docker logs -f 917c48df8473(infiniflow/ragflow:v0.16.0的容器日志) peewee.OperationalError: (1045, "Access denied for user 'root'@'172.24.0.6' (using password: YES)")
问题原因,这个镜像的mysql密码一致是默认密码,只要配置没改全就会报错
解决办法:
-
停止并移除现有容器 cd ./docker docker compose -f docker-compose.yml down
-
删除或备份数据卷 备份命令: cp -r /home/data/docker/volumes/docker_esdata01 /backup/docker_esdata01_backup cp -r /home/data/docker/volumes/docker_minio_data /backup/docker_minio_data_backup cp -r /home/data/docker/volumes/docker_mysql_data /backup/docker_mysql_data_backup cp -r /home/data/docker/volumes/docker_redis_data /backup/docker_redis_data_backup 删除命令: docker volume rm docker_esdata01 docker volume rm docker_minio_data docker volume rm docker_mysql_data docker volume rm docker_redis_data
-
删除未使用的网络配置 docker network prune
-
修改docker/.env 、 docker/service_conf.yaml.template和conf/service_conf.yaml 这三个文件 中所有的密码,设置成自己的,务必这三处都保持一致(重要)
-
重新启动服务 cd ./docker [root@localhost docker]# docker compose -f docker-compose.yml up -d WARN[0000] The "HF_ENDPOINT" variable is not set. Defaulting to a blank string. WARN[0000] The "MACOS" variable is not set. Defaulting to a blank string. [+] Running 10/10 ✔ Network docker_ragflow Created 0.0s ✔ Volume "docker_esdata01" Created 0.0s ✔ Volume "docker_mysql_data" Created 0.0s ✔ Volume "docker_minio_data" Created 0.0s ✔ Volume "docker_redis_data" Created 0.0s ✔ Container ragflow-minio Started 0.4s ✔ Container ragflow-es-01 Started 0.4s ✔ Container ragflow-redis Started 0.4s ✔ Container ragflow-mysql Healthy 10.9s ✔ Container ragflow-server Started 11.1s
6查看日志看看,没有如下报错了:
/_ /_ / / / / _____ _______ / / _____
/ / / __ `/ / /// / __/ | |// _ / / / / / __/ __ / /
/ / / // ( ) ,< / /> </ / // // / // // / /
// _,///|| /_____//||_/_/_,/_/___//
2025-02-26 10:51:53,554 INFO 20 TaskExecutor: RAGFlow version: v0.16.0 full 2025-02-26 10:51:53,554 INFO 20 Use Elasticsearch http://es01:9200 as the doc engine. 2025-02-26 10:51:53,563 INFO 20 GET http://es01:9200/ [status:200 duration:0.007s] 2025-02-26 10:51:53,566 INFO 20 HEAD http://es01:9200/ [status:200 duration:0.003s] 2025-02-26 10:51:53,566 INFO 20 Elasticsearch http://es01:9200 is healthy. 2025-02-26 10:51:53,572 WARNING 20 Load term.freq FAIL! 2025-02-26 10:51:53,577 WARNING 20 Realtime synonym is disabled, since no redis connection. 2025-02-26 10:51:53,583 WARNING 20 Load term.freq FAIL! 2025-02-26 10:51:53,588 WARNING 20 Realtime synonym is disabled, since no redis connection. 2025-02-26 10:51:53,588 INFO 20 MAX_CONTENT_LENGTH: 134217728 2025-02-26 10:51:53,588 INFO 20 SERVER_QUEUE_MAX_LEN: 1024 2025-02-26 10:51:53,588 INFO 20 SERVER_QUEUE_RETENTION: 3600 2025-02-26 10:51:53,588 INFO 20 MAX_FILE_COUNT_PER_USER: 0 2025-02-26 10:51:53,591 WARNING 20 RedisDB.queue_info rag_flow_svr_queue got exception: no such key 2025-02-26 10:51:53,592 INFO 20 task_consumer_0 reported heartbeat: {"name": "task_consumer_0", "now": "2025-02-26T10:51:53.591+08:00", "boot_at": "2025-02-26T10:51:53.554+08:00", "pending": 0, "lag": 0, "done": 0, "failed": 0, "current": null}
7.注册登录注册测试:OK
我使用了 Windows Docker 桌面。使用 docker compose -f docker-compose-base.yml up -d.My 后问题没有解决,问题是注册并登录 502 Bad Gateway。register-server.ts:24POST http://localhost/v1/user/register 502(网关错误)失败:TypeError:无法读取 null 的属性(读取“data”)在 login-hooks.ts:68:15
我也是,你最后解决了吗?
是需要吧service_conf.yaml.template里面的端口改成5455
看看docker ps -a有没有elasticsearch的容器,没有试试下面的命令,应该会创建的 docker compose -f docker-compose-base.yml up -d 我的是这样解决的
田凤叶 @.***
…
好用,发现上次可以注册登录,但这次没法注册登录,一看返回502。用docker ps -a命令,发现ragflow-mysql 和ragflow-redis都是关闭状态 用这两个命令就ok了 docker start ragflow-mysql docker start ragflow-redis
2025-03-27 18:05:39,647 INFO 605 ragflow_server log path: /ragflow/logs/ragflow_server.log, log levels: {'peewee': 'WARNING', 'pdfminer': 'WARNING', 'root': 'INFO'}
2025-03-27 18:05:41,102 INFO 605 found 0 gpus
2025-03-27 18:05:44,387 INFO 605 init database on cluster mode successfully
2025-03-27 18:05:46,343 INFO 605 load_model /ragflow/rag/res/deepdoc/det.onnx uses CPU
2025-03-27 18:05:46,373 INFO 605 load_model /ragflow/rag/res/deepdoc/rec.onnx uses CPU
Traceback (most recent call last):
File "/ragflow/rag/svr/task_executor.py", line 55, in
File "/ragflow/rag/app/resume.py", line 27, in
同样也是注册502
我也是502。之后有别的事就啥也没动过了3个小时。然后在点就ok了。。。 单纯怀疑是机器性能太差。导致rag_server没有完全启动? 只是推断,没有细究原因。供大家参考
另外还遇到了 docker compose up之后 mysql8.0.39 不可用的问题。 也没有仔细分析原因。单纯看了一下log 貌似是认证模块mysql_native_password变成非推荐导致的。 索性就换成了8.4.4并且删除了 --default-authentication-plugin=mysql_native_password这个执行参数。就ok了。
上述两个问题都没深究。仅供参考。
Hello, are there those who managed to run ragflow from the source? I will be glad to talk, I have a couple of questions and I will be grateful! Contact for communication [email protected]
______ __ ______ __
/_ __/___ ______/ /__ / ____/ _____ _______ __/ /_____ _____
/ / / __ `/ ___/ //_/ / __/ | |/_/ _ \/ ___/ / / / __/ __ \/ ___/
/ / / /_/ (__ ) ,< / /____> </ __/ /__/ /_/ / /_/ /_/ / /
/_/ \__,_/____/_/|_| /_____/_/|_|\___/\___/\__,_/\__/\____/_/
2025-05-15 22:40:03,213 INFO 39 TaskExecutor: RAGFlow version: v0.18.0 full
2025-05-15 22:40:03,213 INFO 39 Use Elasticsearch http://es01:9200 as the doc engine.
2025-05-15 22:40:03,219 INFO 39 GET http://es01:9200/ [status:200 duration:0.004s]
2025-05-15 22:40:03,221 INFO 39 HEAD http://es01:9200/ [status:200 duration:0.001s]
2025-05-15 22:40:03,222 INFO 39 Elasticsearch http://es01:9200 is healthy.
2025-05-15 22:40:03,225 WARNING 39 Load term.freq FAIL!
2025-05-15 22:40:03,227 WARNING 39 Realtime synonym is disabled, since no redis connection.
2025-05-15 22:40:03,229 WARNING 39 Load term.freq FAIL!
2025-05-15 22:40:03,231 WARNING 39 Realtime synonym is disabled, since no redis connection.
2025-05-15 22:40:03,232 INFO 39 MAX_CONTENT_LENGTH: 134217728
2025-05-15 22:40:03,232 INFO 39 MAX_FILE_COUNT_PER_USER: 0
Traceback (most recent call last):
File "/ragflow/.venv/lib/python3.10/site-packages/pymysql/connections.py", line 649, in connect
sock = socket.create_connection(
File "/usr/lib/python3.10/socket.py", line 824, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
File "/usr/lib/python3.10/socket.py", line 955, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/ragflow/.venv/lib/python3.10/site-packages/peewee.py", line 3232, in connect
self._state.set_connection(self._connect())
File "/ragflow/.venv/lib/python3.10/site-packages/playhouse/pool.py", line 76, in inner
return fn(self, *args, **kwargs)
File "/ragflow/.venv/lib/python3.10/site-packages/playhouse/pool.py", line 169, in _connect
conn = super(PooledDatabase, self)._connect()
File "/ragflow/.venv/lib/python3.10/site-packages/peewee.py", line 4201, in _connect
conn = mysql.connect(db=self.database, autocommit=True,
File "/ragflow/.venv/lib/python3.10/site-packages/pymysql/connections.py", line 361, in __init__
self.connect()
File "/ragflow/.venv/lib/python3.10/site-packages/pymysql/connections.py", line 716, in connect
raise exc
pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on 'mysql' ([Errno -2] Name or service not known)")
During handling of the above exception, another exception occurred:
I encountered the same issue. I checked the logs and found that it was a MySQL connection error. I suspect that the ragflow server started before MySQL, so I restarted the ragflow server separately, and it worked. Hope this helps you as well.
______ __ ______ __ /_ __/___ ______/ /__ / ____/ _____ _______ __/ /_____ _____ / / / __ `/ ___/ //_/ / __/ | |/_/ _ \/ ___/ / / / __/ __ \/ ___/ / / / /_/ (__ ) ,< / /____> </ __/ /__/ /_/ / /_/ /_/ / / /_/ \__,_/____/_/|_| /_____/_/|_|\___/\___/\__,_/\__/\____/_/ 2025-05-15 22:40:03,213 INFO 39 TaskExecutor: RAGFlow version: v0.18.0 full 2025-05-15 22:40:03,213 INFO 39 Use Elasticsearch http://es01:9200 as the doc engine. 2025-05-15 22:40:03,219 INFO 39 GET http://es01:9200/ [status:200 duration:0.004s] 2025-05-15 22:40:03,221 INFO 39 HEAD http://es01:9200/ [status:200 duration:0.001s] 2025-05-15 22:40:03,222 INFO 39 Elasticsearch http://es01:9200 is healthy. 2025-05-15 22:40:03,225 WARNING 39 Load term.freq FAIL! 2025-05-15 22:40:03,227 WARNING 39 Realtime synonym is disabled, since no redis connection. 2025-05-15 22:40:03,229 WARNING 39 Load term.freq FAIL! 2025-05-15 22:40:03,231 WARNING 39 Realtime synonym is disabled, since no redis connection. 2025-05-15 22:40:03,232 INFO 39 MAX_CONTENT_LENGTH: 134217728 2025-05-15 22:40:03,232 INFO 39 MAX_FILE_COUNT_PER_USER: 0 Traceback (most recent call last): File "/ragflow/.venv/lib/python3.10/site-packages/pymysql/connections.py", line 649, in connect sock = socket.create_connection( File "/usr/lib/python3.10/socket.py", line 824, in create_connection for res in getaddrinfo(host, port, 0, SOCK_STREAM): File "/usr/lib/python3.10/socket.py", line 955, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -2] Name or service not known During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/ragflow/.venv/lib/python3.10/site-packages/peewee.py", line 3232, in connect self._state.set_connection(self._connect()) File "/ragflow/.venv/lib/python3.10/site-packages/playhouse/pool.py", line 76, in inner return fn(self, *args, **kwargs) File "/ragflow/.venv/lib/python3.10/site-packages/playhouse/pool.py", line 169, in _connect conn = super(PooledDatabase, self)._connect() File "/ragflow/.venv/lib/python3.10/site-packages/peewee.py", line 4201, in _connect conn = mysql.connect(db=self.database, autocommit=True, File "/ragflow/.venv/lib/python3.10/site-packages/pymysql/connections.py", line 361, in __init__ self.connect() File "/ragflow/.venv/lib/python3.10/site-packages/pymysql/connections.py", line 716, in connect raise exc pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on 'mysql' ([Errno -2] Name or service not known)") During handling of the above exception, another exception occurred:I encountered the same issue. I checked the logs and found that it was a MySQL connection error. I suspect that the ragflow server started before MySQL, so I restarted the ragflow server separately, and it worked. Hope this helps you as well.
thank you
我按照官网readme里面写的快速启动的方法启动,就没有502的问题了。
先输入 docker compose -f docker-compose.yml up -d
接下来服务器启动成功后再次确认服务器状态:docker logs -f ragflow-server
官网说了: 出现以下界面提示说明服务器启动成功:
____ ___ ______ ______ __
/ __ \ / | / ____// ____// /____ _ __
/ /_/ // /| | / / __ / /_ / // __ \| | /| / /
/ _, _// ___ |/ /_/ // __/ / // /_/ /| |/ |/ /
/_/ |_|/_/ |_|\____//_/ /_/ \____/ |__/|__/
* Running on all addresses (0.0.0.0)
如果您在没有看到上面的提示信息出来之前,就尝试登录 RAGFlow,你的浏览器有可能会提示 network anormal 或 网络异常。
My situation is as follows: Elasticsearch starts too slowly. After checking the status of es01 a certain number of times, Ragflow stops checking and performs no further actions (is this considered a bug?). As a result, all APIs return a 502 error.
Solution: After es01 has started successfully, manually restart Ragflow using the following command:
docker compose restart ragflow
Yup. This is a simple way to fix.
- Change the
MYSQL_PORT=3306in service_conf.yaml.template (Maybe Line: 65) - Change the
MYSQL_PORT=3306in .env (Maybe Line: 65) - Rebuild your Contaner.
- Done.
Starting nginx...
2025-09-09T11:33:38.306819845Z Starting ragflow_server...
2025-09-09T11:33:38.306995029Z Starting 1 task executor(s) on host '91c85cff4c8a'...
2025-09-09T11:33:39.386219796Z 2025-09-09 19:33:39,385 INFO 20 ragflow_server log path: /ragflow/logs/ragflow_server.log, log levels: {'peewee': 'WARNING', 'pdfminer': 'WARNING', 'root': 'INFO'}
2025-09-09T11:33:41.812400984Z 2025-09-09 19:33:41,812 INFO 20 found 0 gpus
2025-09-09T11:33:45.413440368Z 2025-09-09 19:33:45,413 INFO 20 init database on cluster mode successfully
2025-09-09T11:33:52.713686456Z 2025-09-09 19:33:52,713 INFO 20 load_model /ragflow/rag/res/deepdoc/det.onnx uses CPU
2025-09-09T11:33:52.782618573Z 2025-09-09 19:33:52,782 INFO 20 load_model /ragflow/rag/res/deepdoc/rec.onnx uses CPU
2025-09-09T11:33:58.023480983Z 2025-09-09 19:33:58,023 INFO 20
2025-09-09T11:33:58.023499965Z ____ ___ ______ ______ __
2025-09-09T11:33:58.023502064Z / __ \ / | / // // / _ __
2025-09-09T11:33:58.023503495Z / // // /| | / / __ / / / // __ | | /| / /
2025-09-09T11:33:58.023504926Z / , // ___ |/ // // __/ / // // /| |/ |/ /
2025-09-09T11:33:58.023506452Z // ||// ||_/// // _/ |/|/
2025-09-09T11:33:58.023507978Z
2025-09-09T11:33:58.023509218Z
2025-09-09T11:33:58.023615291Z 2025-09-09 19:33:58,023 INFO 20 RAGFlow version: v0.20.4 full
2025-09-09T11:33:58.023626356Z 2025-09-09 19:33:58,023 INFO 20 project base: /ragflow
2025-09-09T11:33:58.023777740Z 2025-09-09 19:33:58,023 INFO 20 Current configs, from /ragflow/conf/service_conf.yaml:
2025-09-09T11:33:58.023806547Z ragflow: {'host': '0.0.0.0', 'http_port': 9380}
2025-09-09T11:33:58.023812843Z mysql: {'name': 'rag_flow', 'user': 'root', 'password': '', 'host': 'mysql', 'port': 3306, 'max_connections': 900, 'stale_timeout': 300, 'max_allowed_packet': 1073741824}
2025-09-09T11:33:58.023815800Z minio: {'user': 'rag_flow', 'password': '', 'host': 'minio:9000'}
2025-09-09T11:33:58.023817708Z es: {'hosts': 'http://es01:9200', 'username': 'elastic', 'password': ''}
2025-09-09T11:33:58.023819711Z os: {'hosts': 'http://opensearch01:9201', 'username': 'admin', 'password': ''}
2025-09-09T11:33:58.023821619Z infinity: {'uri': 'infinity:23817', 'db_name': 'default_db'}
2025-09-09T11:33:58.023824194Z redis: {'db': 1, 'password': '********', 'host': 'redis:6379'}
2025-09-09T11:33:58.024404067Z 2025-09-09 19:33:58,024 WARNING 20 SECURITY WARNING: Using auto-generated SECRET_KEY. Generated key: e4ac8b0fde07102b873f47810ffb153a12f579da900c61fa7ce838eb71a8e311
2025-09-09T11:33:58.024460823Z 2025-09-09 19:33:58,024 INFO 20 Use Elasticsearch http://es01:9200 as the doc engine.
2025-09-09T11:33:58.090574587Z 2025-09-09 19:33:58,090 INFO 20 GET http://es01:9200/ [status:200 duration:0.065s]
2025-09-09T11:33:58.094180976Z 2025-09-09 19:33:58,093 INFO 20 HEAD http://es01:9200/ [status:200 duration:0.003s]
2025-09-09T11:33:58.094366604Z 2025-09-09 19:33:58,094 INFO 20 Elasticsearch http://es01:9200 is healthy.
2025-09-09T11:33:58.096462692Z 2025-09-09 19:33:58,096 WARNING 20 Load term.freq FAIL!
2025-09-09T11:33:58.098328223Z 2025-09-09 19:33:58,098 WARNING 20 Realtime synonym is disabled, since no redis connection.
2025-09-09T11:33:58.102566377Z 2025-09-09 19:33:58,102 WARNING 20 Load term.freq FAIL!
2025-09-09T11:33:58.104518426Z 2025-09-09 19:33:58,104 WARNING 20 Realtime synonym is disabled, since no redis connection.
2025-09-09T11:33:58.104576519Z 2025-09-09 19:33:58,104 INFO 20 MAX_CONTENT_LENGTH: 134217728
2025-09-09T11:33:58.104596836Z 2025-09-09 19:33:58,104 INFO 20 MAX_FILE_COUNT_PER_USER: 0
2025-09-09T11:34:07.721254731Z 2025-09-09 19:34:07,720 INFO 30 task_executor_91c85cff4c8a_0 log path: /ragflow/logs/task_executor_91c85cff4c8a_0.log, log levels: {'peewee': 'WARNING', 'pdfminer': 'WARNING', 'root': 'INFO'}
2025-09-09T11:34:07.722028566Z 2025-09-09 19:34:07,721 INFO 30
2025-09-09T11:34:07.722051760Z ______ __ ______ __
2025-09-09T11:34:07.722057415Z /_ / / / / / _____ _______ / / _____
2025-09-09T11:34:07.722059331Z / / / __ `/ / /// / __/ | |// _ / / / / / __/ __ / /
2025-09-09T11:34:07.722060865Z / / / // ( ) ,< / /> </ / // // / // // / /
2025-09-09T11:34:07.722062590Z // _,/_//|| ///||_/_/_,/_/__//
2025-09-09T11:34:07.722064124Z
2025-09-09T11:34:07.722065465Z 2025-09-09 19:34:07,721 INFO 30 TaskExecutor: RAGFlow version: v0.20.4 full
2025-09-09T11:34:07.722618862Z 2025-09-09 19:34:07,722 WARNING 30 SECURITY WARNING: Using auto-generated SECRET_KEY. Generated key: e06940081fb0010c2593a7be36d3407d674de70a67a5e07c932c9a2b11ac39cb
2025-09-09T11:34:07.722646752Z 2025-09-09 19:34:07,722 INFO 30 Use Elasticsearch http://es01:9200 as the doc engine.
2025-09-09T11:34:07.727789102Z 2025-09-09 19:34:07,727 INFO 30 GET http://es01:9200/ [status:200 duration:0.004s]
2025-09-09T11:34:07.730155557Z 2025-09-09 19:34:07,729 INFO 30 HEAD http://es01:9200/ [status:200 duration:0.002s]
2025-09-09T11:34:07.730294433Z 2025-09-09 19:34:07,730 INFO 30 Elasticsearch http://es01:9200 is healthy.
2025-09-09T11:34:07.732901933Z 2025-09-09 19:34:07,732 WARNING 30 Load term.freq FAIL!
2025-09-09T11:34:07.735036448Z 2025-09-09 19:34:07,734 WARNING 30 Realtime synonym is disabled, since no redis connection.
2025-09-09T11:34:07.739753927Z 2025-09-09 19:34:07,739 WARNING 30 Load term.freq FAIL!
2025-09-09T11:34:07.741846463Z 2025-09-09 19:34:07,741 WARNING 30 Realtime synonym is disabled, since no redis connection.
2025-09-09T11:34:07.741939622Z 2025-09-09 19:34:07,741 INFO 30 MAX_CONTENT_LENGTH: 134217728
2025-09-09T11:34:07.741966746Z 2025-09-09 19:34:07,741 INFO 30 MAX_FILE_COUNT_PER_USER: 0
2025-09-09T11:34:07.743700446Z 2025-09-09 19:34:07,743 INFO 30 task_executor_91c85cff4c8a_0 reported heartbeat: {"name": "task_executor_91c85cff4c8a_0", "now": "2025-09-09T19:34:07.743+08:00", "boot_at": "2025-09-09T19:34:07.720+08:00", "pending": 0, "lag": 0, "done": 0, "failed": 0, "current": {}}
2025-09-09T11:34:37.749415400Z 2025-09-09 19:34:37,749 INFO 30 task_executor_91c85cff4c8a_0 reported heartbeat: {"name": "task_executor_91c85cff4c8a_0", "now": "2025-09-09T19:34:37.748+08:00", "boot_at": "2025-09-09T19:34:07.720+08:00", "pending": 0, "lag": 0, "done": 0, "failed": 0, "current": {}}
2025-09-09T11:34:37.750292911Z 2025-09-09 19:34:37,750 INFO 30 task_executor_fff689514daf_0 expired, removed
我启动显示这个,但是接口全是 502
我通过先执行 docker compose -f docker-compose-base.yml up -d 后再执行docker compose -f docker-compose.yml up -d 可以成功登录了