ragflow icon indicating copy to clipboard operation
ragflow copied to clipboard

[Bug]: ragflow/api/db/db_models.py", line 355, in lock raise Exception(f'failed to acquire lock {self.lock_name}')

Open moshilangzi opened this issue 9 months ago • 1 comments

Self Checks

  • [x] I have searched for existing issues search for existing issues, including closed ones.
  • [x] I confirm that I am using English to submit this report (Language Policy).
  • [x] Non-english title submitions will be closed directly ( 非英文标题的提交将会被直接关闭 ) (Language Policy).
  • [x] Please do not modify this template :) and fill in all the required fields.

RAGFlow workspace code commit ID

d447392

RAGFlow image version

nightly-slim 86c124a3a51b

Other environment information


Actual behavior

ragflow/api/db/db_models.py", line 355, in lock raise Exception(f'failed to acquire lock {self.lock_name}')

Expected behavior

No response

Steps to reproduce

ragflow/api/db/db_models.py", line 355, in lock
    raise Exception(f'failed to acquire lock {self.lock_name}')

Additional information

ragflow/api/db/db_models.py", line 355, in lock raise Exception(f'failed to acquire lock {self.lock_name}')

moshilangzi avatar Mar 11 '25 17:03 moshilangzi

Is that on Mac? set MACOS=1 in docker/.env. Or, switch to mariaDB instead of MySQL.

KevinHuSh avatar Mar 12 '25 03:03 KevinHuSh

Is that on Mac? set MACOS=1 in docker/.env. Or, switch to mariaDB instead of MySQL.

遇到相同的问题,操作系统是:Ubuntu,数据库为mariaDB。

leoterry-ulrica avatar Mar 25 '25 02:03 leoterry-ulrica

Is that on Mac? set MACOS=1 in docker/.env. Or, switch to mariaDB instead of MySQL.

遇到相同的问题,操作系统是:Ubuntu,数据库为mariaDB。

你好 请问解决了么

sammichenVV avatar Mar 25 '25 08:03 sammichenVV

Is that on Mac? set MACOS=1 in docker/.env. Or, switch to mariaDB instead of MySQL.

遇到相同的问题,操作系统是:Ubuntu,数据库为mariaDB。

你好 请问解决了么

解决了,我换成了mysql镜像,没使用mariadb了,然后启动的时候mysql启动失败,会提示:

[System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.39) initializing of server in progress as process 81
ragflow-mysql     | 2025-03-25T14:49:14.532988Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting.
ragflow-mysql     | 2025-03-25T14:49:14.532993Z 0 [ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it.
ragflow-mysql     | 2025-03-25T14:49:14.533028Z 0 [ERROR] [MY-010119] [Server] Aborting
ragflow-mysql     | 2025-03-25T14:49:14.533125Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.39)  MySQL Community Server - GPL.

手动删除docker启动时自动创建的目录./volumes/mysql_data,再次执行相同启动命令启动。 如果遇到以下错误:

[ERROR] [MY-012584] [InnoDB] io_setup() failed with EAGAIN after 5 attempts.
2025-03-25T15:01:00.117427Z 1 [ERROR] [MY-012954] [InnoDB] Cannot initialize AIO sub-system
2025-03-25T15:01:00.117448Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error.
2025-03-25T15:01:00.117496Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2025-03-25T15:01:00.117729Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2025-03-25T15:01:00.117783Z 0 [ERROR] [MY-010119] [Server] Aborting

则需要在docker-compose-base.yml下mysql容器command中添加以下命令: --innodb_use_native_aio=0

leoterry-ulrica avatar Mar 26 '25 01:03 leoterry-ulrica

按照

Is that on Mac? set MACOS=1 in docker/.env. Or, switch to mariaDB instead of MySQL.

遇到相同的问题,操作系统是:Ubuntu,数据库为mariaDB。

你好 请问解决了么

解决了,我换成了mysql镜像,没使用mariadb了,然后启动的时候mysql启动失败,会提示:

[System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.39) initializing of server in progress as process 81
ragflow-mysql     | 2025-03-25T14:49:14.532988Z 0 [ERROR] [MY-010457] [Server] --initialize specified but the data directory has files in it. Aborting.
ragflow-mysql     | 2025-03-25T14:49:14.532993Z 0 [ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it.
ragflow-mysql     | 2025-03-25T14:49:14.533028Z 0 [ERROR] [MY-010119] [Server] Aborting
ragflow-mysql     | 2025-03-25T14:49:14.533125Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.39)  MySQL Community Server - GPL.

手动删除docker启动时自动创建的目录./volumes/mysql_data,再次执行相同启动命令启动。 如果遇到以下错误:

[ERROR] [MY-012584] [InnoDB] io_setup() failed with EAGAIN after 5 attempts.
2025-03-25T15:01:00.117427Z 1 [ERROR] [MY-012954] [InnoDB] Cannot initialize AIO sub-system
2025-03-25T15:01:00.117448Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error.
2025-03-25T15:01:00.117496Z 1 [ERROR] [MY-010334] [Server] Failed to initialize DD Storage Engine
2025-03-25T15:01:00.117729Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2025-03-25T15:01:00.117783Z 0 [ERROR] [MY-010119] [Server] Aborting

则需要在docker-compose-base.yml下mysql容器command中添加以下命令: --innodb_use_native_aio=0

按照您的方法,使用mysql添加--innodb_use_native_aio=0,ragflow-mysql不出现任何Error,但还是出现:

dependency failed to start: container ragflow-mysql is unhealthy

请问如何解决?

@dosubot

DreamPrism avatar Jul 29 '25 06:07 DreamPrism