-
-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Docker 环境下无法启动,报 org.sqlite.SQLiteException: [SQLITE_BUSY] The database file is locked (database is locked) 错误 #725
Comments
请不要同时运行两个 PeerBanHelper,其中一个会锁定 SQLite 数据库,因此另一个将无法访问。 使用 .sh 安装时,您可能已经将其安装为了系统服务,使用 |
我并没有同时运行两个实例。查看服务状态,显示 Unit peerbanhelper.service could not be found。 |
数据目录挂SMB/NFS上了? |
请尝试去掉docker命令行中的-v参数再试试
…----------
该邮件从移动设备发送
--------------原始邮件--------------
发件人:"Luke-li-Chen ***@***.***>;
发送时间:2024年11月13日(星期三) 晚上9:57
收件人:"PBH-BTN/PeerBanHelper" ***@***.***>;
抄送:"Subscribed ***@***.***>;
主题:Re: [PBH-BTN/PeerBanHelper] [BUG] Docker 环境下无法启动,报 org.sqlite.SQLiteException: [SQLITE_BUSY] The database file is locked (database is locked) 错误 (Issue #725)
-----------------------------------
我并没有同时运行两个实例。查看服务状态,显示 Unit peerbanhelper.service could not be found。
我在另一台从未运行过 PeerBanHelper 的虚拟机上以 Docker 方式运行,结果出现了相同的错误。
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
那你试试 PeerBanHelper.service |
遇到过相同的问题,我尝试将smb/cifs挂载路径作为pbh的数据目录,出现同样的错误。通过搜索引擎了解到,这可能是一个sqlite的问题 |
版本号 - Version
v7.1.4
操作系统平台和系统架构 - OS and CPU Arch
AlmaLinux 9.4 x86_64 (基于 ESXi 的虚拟机)
Docker 27.3.1
部署方式 - Deploy methods
添加的下载器 - Added Downloaders
问题描述 - Issue Description
以 docker compose up 方式部署运行,无法启动,日志报错,随后无限重试。无法访问 web 页面
复现步骤 - Reproduce steps
docker-compose.yml 文件内容为:
version: "3.9"
services:
peerbanhelper:
image: "ghostchu/peerbanhelper:v7.1.4"
restart: unless-stopped
container_name: "peerbanhelper"
volumes:
- /home/luke/docker-data/peerbanhelper/data:/app/data
ports:
- "9898:9898"
environment:
- PUID=0
- PGID=0
- TZ=UTC
截图/日志文件 - Screenshot / Logs
peerbanhelper | [17:19:13] [main/INFO]: PeerBanHelper SQLite Connection Pool - Starting...
peerbanhelper | [17:19:14] [main/INFO]: PeerBanHelper SQLite Connection Pool - Added connection org.sqlite.jdbc4.JDBC4Connection@e700eba
peerbanhelper | [17:19:14] [main/INFO]: PeerBanHelper SQLite Connection Pool - Start completed.
peerbanhelper | [17:19:17] [main/WARN]: Failed to set optimized SQLite PRAGMA arguments
peerbanhelper | org.sqlite.SQLiteException: [SQLITE_BUSY] The database file is locked (database is locked)
peerbanhelper | at org.sqlite.core.DB.newSQLException(DB.java:1179)
(中间略)
peerbanhelper | [17:19:20] [main/WARN]: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'databaseHelper' defined in URL [jar:file:/app/PeerBanHelper.jar!/com/ghostchu/peerbanhelper/database/DatabaseHelper.class]: Failed to instantiate [com.ghostchu.peerbanhelper.database.DatabaseHelper]: Constructor threw exception
peerbanhelper | [17:19:20] [main/ERROR]: PeerBanHelper encountered fatal error during startup, unable to continue
peerbanhelper | org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'databaseHelper' defined in URL [jar:file:/app/PeerBanHelper.jar!/com/ghostchu/peerbanhelper/database/DatabaseHelper.class]: Failed to instantiate [com.ghostchu.peerbanhelper.database.DatabaseHelper]: Constructor threw exception
peerbanhelper | at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:318)
peerbanhelper | at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:306)
(中间略)
peerbanhelper exited with code 1
额外信息 - Addition Information
我尝试了 7.1.4、7.1.3、7.0.0 三个版本,均报此错误。在同一台机器上使用 .sh 方式安装,则能正常运行。
检查清单 - Check list
The text was updated successfully, but these errors were encountered: