【发布时间】:2022-07-18 19:48:33
【问题描述】:
我对使用 Docker 还不是很熟悉。我在 Debian 服务器上使用 Docker。我尝试在 Docker 容器上运行 MariaDB,到目前为止效果很好。但是,最近我总是遇到错误。
这是我的 docker-compose 文件:
version: '3.9'
services:
repository:
container_name: repository
image: sonatype/nexus3
restart: always
networks:
main:
ports:
- "8081:8081"
mariadb:
container_name: mariadb
image: mariadb
restart: always
ports:
- "3306:3306"
healthcheck:
test: "/usr/bin/mysql --user=root --password=root_password --execute \"SHOW DATABASES;\""
interval: 2s
timeout: 30s
retries: 15
networks:
main:
environment:
MARIADB_ROOT_PASSWORD: root_password
MARIADB_AUTO_UPGRADE: "yes"
MARIADB_USER: user
MARIADB_DATABASE: database
MARIADB_PASSWORD: password
volumes:
- "mariadb-data:/var/lib/mysql"
networks:
main:
volumes:
mariadb-data:
当我查看容器的日志时,出现以下内容:
2022-04-24 13:47:54+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.7.3+maria~focal started.
2022-04-24 13:47:54+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2022-04-24 13:47:54+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.7.3+maria~focal started.
2022-04-24 13:47:54+00:00 [Note] [Entrypoint]: MariaDB upgrade information missing, assuming required
2022-04-24 13:47:54+00:00 [Note] [Entrypoint]: Starting temporary server
2022-04-24 13:47:54+00:00 [Note] [Entrypoint]: Waiting for server startup
2022-04-24 13:47:54 0 [Note] mariadbd (server 10.7.3-MariaDB-1:10.7.3+maria~focal) starting as process 49 ...
2022-04-24 13:47:54 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2022-04-24 13:47:54 0 [Note] InnoDB: Number of transaction pools: 1
2022-04-24 13:47:54 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2022-04-24 13:47:54 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
2022-04-24 13:47:54 0 [Note] InnoDB: Using Linux native AIO
2022-04-24 13:47:54 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
2022-04-24 13:47:54 0 [Note] InnoDB: Completed initialization of buffer pool
2022-04-24 13:47:54 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=3821844,3821844
2022-04-24 13:47:54 0 [ERROR] InnoDB: Missing FILE_CHECKPOINT at 3821844 between the checkpoint 3821844 and the end 3821868.
2022-04-24 13:47:54 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2022-04-24 13:47:54 0 [Note] InnoDB: Starting shutdown...
2022-04-24 13:47:55 0 [ERROR] Plugin 'InnoDB' init function returned error.
2022-04-24 13:47:55 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2022-04-24 13:47:55 0 [Note] Plugin 'FEEDBACK' is disabled.
2022-04-24 13:47:55 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2022-04-24 13:47:55 0 [ERROR] Aborting
这个错误的原因是什么,我该如何解决这个问题?
【问题讨论】:
-
您从哪个版本升级?您可以尝试使用innodb-fast-shutdown=1 运行您以前的版本,然后尝试新的 10.7.3 版本。如果失败,请尝试将
quay.io/mariadb-foundation/mariadb-devel:10.7作为即将发布的最新开发版本(未来两周内的某个时间)。 bug reports欢迎。
标签: docker docker-compose mariadb innodb docker-container