You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Frappe Docker部署ERPNext时MariaDB容器启动失败求助

MariaDB容器启动失败(InnoDB存储引擎初始化错误)解决方案

错误日志

2023-05-01 00:07:15+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.6.12+maria~ubu2004 started.
2023-05-01 00:07:15+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2023-05-01 00:07:15+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.6.12+maria~ubu2004 started.
2023-05-01 00:07:16+00:00 [Note] [Entrypoint]: MariaDB upgrade not required
2023-05-01  0:07:16 0 [Note] Starting MariaDB 10.6.12-MariaDB-1:10.6.12+maria~ubu2004 source revision 4c79e15cc3716f69c044d4287ad2160da8101cdc as process 1
2023-05-01  0:07:16 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2023-05-01  0:07:16 0 [Note] InnoDB: Number of pools: 1
2023-05-01  0:07:16 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2023-05-01  0:07:16 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
2023-05-01  0:07:16 0 [Note] InnoDB: Using Linux native AIO
2023-05-01  0:07:16 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
2023-05-01  0:07:16 0 [Note] InnoDB: Completed initialization of buffer pool
2023-05-01  0:07:16 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=89965477,89965477
2023-05-01  0:07:16 0 [ERROR] InnoDB: Missing FILE_CHECKPOINT at 89965477 between the checkpoint 89965477 and the end 89965489.
2023-05-01  0:07:16 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2023-05-01  0:07:16 0 [Note] InnoDB: Starting shutdown...
2023-05-01  0:07:16 0 [ERROR] Plugin 'InnoDB' init function returned error.
2023-05-01  0:07:16 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2023-05-01  0:07:16 0 [Note] Plugin 'FEEDBACK' is disabled.
2023-05-01  0:07:16 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2023-05-01  0:07:16 0 [ERROR] Aborting

问题原因

该错误由InnoDB数据文件损坏导致,通常是容器异常关闭、存储卷IO故障或权限配置错误引发的InnoDB日志/数据文件完整性丢失。

解决步骤

1. 停止并清理损坏的MariaDB容器与数据卷

执行以下命令停止容器并删除关联的损坏数据卷:

# 停止并移除MariaDB容器及关联卷(使用Frappe_Docker的compose文件)
docker-compose -f compose.yaml down -v mariadb

# 若上述命令未完全清理,手动查找并删除残留的MariaDB卷
docker volume ls | grep mariadb
docker volume rm <找到的MariaDB卷名称>

2. 重新启动MariaDB容器

通过Frappe_Docker的compose配置重新初始化容器:

docker-compose -f compose.yaml up -d mariadb

3. 验证启动状态

查看容器日志确认InnoDB正常初始化:

docker logs -f mariadb

若日志中无InnoDB相关错误,且出现ready for connections字样,则启动成功。

注意事项

  • 生产环境数据恢复:若为生产环境,请勿直接删除数据卷,优先尝试从备份恢复数据到新卷。
  • 权限检查:确保宿主机挂载的MariaDB数据目录权限正确,执行命令赋予容器读写权限:
    chown -R 999:999 /path/to/your/mariadb/data
    
  • 避免异常关闭:停止容器时使用docker-compose stop mariadb或docker stop <容器名>,禁止强制kill进程。

内容的提问来源于stack exchange,提问作者Yashwashni Rathore

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.23 03:27:03