yobasystems / alpine-mariadb

MariaDB running on Alpine Linux [Docker]
https://hub.docker.com/r/yobasystems/alpine-mariadb/
242 stars 72 forks source link

Persistence Not working #46

Closed 11jwolfe2 closed 3 years ago

11jwolfe2 commented 3 years ago

I am trying to use this with a persistence file. so when I add the Volumes tag and a file allocation it errors out and shuts down. Any ideas why this would be happening?

I do not get this error when not specifying a volume.

Docker compose file:

mysql: image: 'yobasystems/alpine-mariadb:latest' environment: MYSQL_ROOT_PASSWORD: 'npm' MYSQL_DATABASE: 'npm' MYSQL_USER: 'npm' MYSQL_PASSWORD: 'npm' volumes:

Error log:

[i] mysqld not found, creating....,
[i] MySQL data directory not found, creating initial DBs,
2021-03-31 19:06:33 0 [ERROR] InnoDB: The Auto-extending innodb_system data file './ibdata1' is of a different size 0 pages than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!,
2021-03-31 19:06:33 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error,
2021-03-31 19:06:35 0 [ERROR] Plugin 'InnoDB' init function returned error.,
2021-03-31 19:06:35 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.,
2021-03-31 19:06:35 0 [ERROR] Unknown/unsupported storage engine: InnoDB,
2021-03-31 19:06:35 0 [ERROR] Aborting,
 Creating database: npm,
[i] with character set: 'utf8' and collation: 'utf8_general_ci',
[i] Creating user: npm with password npm,
2021-03-31 19:06:35 0 [Note] /usr/bin/mysqld (mysqld 10.4.15-MariaDB) starting as process 56 ...,
2021-03-31 19:06:35 0 [Note] InnoDB: Using Linux native AIO,
2021-03-31 19:06:35 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins,
2021-03-31 19:06:35 0 [Note] InnoDB: Uses event mutexes,
2021-03-31 19:06:35 0 [Note] InnoDB: Compressed tables use zlib 1.2.11,
2021-03-31 19:06:35 0 [Note] InnoDB: Number of pools: 1,
2021-03-31 19:06:35 0 [Note] InnoDB: Using generic crc32 instructions,
2021-03-31 19:06:35 0 [Note] mysqld: O_TMPFILE is not supported on /var/tmp (disabling future attempts),
2021-03-31 19:06:35 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M,
2021-03-31 19:06:36 0 [Note] InnoDB: Completed initialization of buffer pool,
2021-03-31 19:06:36 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().,
2021-03-31 19:06:36 0 [ERROR] InnoDB: The Auto-extending innodb_system data file './ibdata1' is of a different size 0 pages than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!,
2021-03-31 19:06:36 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error,
2021-03-31 19:06:36 0 [Note] InnoDB: Starting shutdown...,
2021-03-31 19:06:37 0 [ERROR] Plugin 'InnoDB' init function returned error.,
2021-03-31 19:06:37 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.,
2021-03-31 19:06:37 0 [Note] Plugin 'FEEDBACK' is disabled.,
2021-03-31 19:06:37 0 [ERROR] Unknown/unsupported storage engine: InnoDB,
2021-03-31 19:06:37 0 [ERROR] Aborting,
/scripts/run.sh: ignoring or entrypoint initdb empty /docker-entrypoint-initdb.d/*,
,
,
MySQL init process done. Ready for start up.,
,
exec /usr/bin/mysqld --user=mysql --console --skip-name-resolve --skip-networking=0,
2021-03-31 19:06:37 0 [Note] /usr/bin/mysqld (mysqld 10.4.15-MariaDB) starting as process 1 ...,
2021-03-31 19:06:37 0 [Note] InnoDB: Using Linux native AIO,
2021-03-31 19:06:37 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins,
2021-03-31 19:06:37 0 [Note] InnoDB: Uses event mutexes,
2021-03-31 19:06:37 0 [Note] InnoDB: Compressed tables use zlib 1.2.11,
2021-03-31 19:06:37 0 [Note] InnoDB: Number of pools: 1,
2021-03-31 19:06:37 0 [Note] InnoDB: Using generic crc32 instructions,
2021-03-31 19:06:37 0 [Note] mysqld: O_TMPFILE is not supported on /var/tmp (disabling future attempts),
2021-03-31 19:06:38 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M,
2021-03-31 19:06:38 0 [Note] InnoDB: Completed initialization of buffer pool,
2021-03-31 19:06:38 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().,
2021-03-31 19:06:38 0 [ERROR] InnoDB: The Auto-extending innodb_system data file './ibdata1' is of a different size 0 pages than specified in the .cnf file: initial 768 pages, max 0 (relevant if non-zero) pages!,
2021-03-31 19:06:38 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error,
2021-03-31 19:06:38 0 [Note] InnoDB: Starting shutdown...,
2021-03-31 19:06:39 0 [ERROR] Plugin 'InnoDB' init function returned error.,
2021-03-31 19:06:39 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.,
2021-03-31 19:06:39 0 [Note] Plugin 'FEEDBACK' is disabled.,
2021-03-31 19:06:39 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded,
2021-03-31 19:06:39 0 [ERROR] Unknown/unsupported storage engine: InnoDB,
2021-03-31 19:06:39 0 [ERROR] Aborting,
dominictayloruk commented 3 years ago

Looking at it i think you data volume

volumes:
- ./data/mysql:/var/lib/mysql

Should be

volumes:
- /data/mysql:/var/lib/mysql
11jwolfe2 commented 3 years ago

I have made this change with no resolve.

dominictayloruk commented 3 years ago

Not sure, its maybe your storage engine. What are you using?? NFS, iSCSI, BTRFS??

11jwolfe2 commented 3 years ago

NFS, which works with all other docker containers I run. I am trying to use the NGINX-PROXY Manager for Raspberry pi with this as the DB. I never had it set to use persistence, but had an SD card fail and would like to use persistence to save with setup time in the future. For reference this is the docker container I am using and the video I used for setup.

Container: https://github.com/jlesage/docker-nginx-proxy-manager

Video: https://www.youtube.com/watch?v=2oi4IQF7VnE&t=554s

dominictayloruk commented 3 years ago

I use NFS also.

What are you using for orchestration? K8S?

11jwolfe2 commented 3 years ago

I have docker running on my rpi, and it can be managed with portainer as I have a client running on the pi. I am not using kubernetes. The NFS share is on an Open Media Vault NAS.

dominictayloruk commented 3 years ago

I would probably check your permissions;

I use Read/Write privileges No Squash Mapping Asynchronous Yes Non-Privileged port Allowed Cross-Mount Allowed

11jwolfe2 commented 3 years ago

These are the permissions I have set up rw,no_root_squash,insecure,async,no_subtree_check,anonuid=1000,anongid=1000

dominictayloruk commented 3 years ago

Try the new 10.5.8 image and see if this resolves your problem.