wodby / mariadb

MariaDB docker container image
https://wodby.com/stacks/mariadb
GNU General Public License v2.0
49 stars 31 forks source link

[ERROR] InnoDB: logfile0 can't be opened in read-write mode. Plugin 'InnoDB' registration as a STORAGE ENGINE failed. Unknown/unsupported storage engine: InnoDB. #8

Closed Paulmicha closed 5 years ago

Paulmicha commented 6 years ago

This error occured on a previously working local instance. When trying to start the stack, I get from docker-compose logs mariadb :

[ERROR] InnoDB: ./ib_logfile0 can't be opened in read-write mode
[ERROR] Plugin 'InnoDB' init function returned error.
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
[Note] Plugin 'FEEDBACK' is disabled.
[ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
[ERROR] Unknown/unsupported storage engine: InnoDB
[ERROR] Aborting

Extract from my docker-compose.yml file :

version: "2"

services:
  mariadb:
    image: wodby/mariadb:$MARIADB_TAG
    environment:
      MYSQL_ROOT_PASSWORD: password
      MYSQL_DATABASE: drupal
      MYSQL_USER: drupal
      MYSQL_PASSWORD: drupal
    volumes:
      - mysql-data:/var/lib/mysql
      - ./dumps/drupal:/container-dumps

# (snip)

volumes:
  mysql-data:
    driver: local

Extract from my .env file :

MARIADB_TAG=10.1-3.3.0
PHP_TAG=7.2-4.6.0
NGINX_TAG=1.15-5.0.0
SOLR_TAG=8-7.4-2.5.0
REDIS_TAG=4.0-2.1.6
ADMINER_TAG=4.6-2.0.0

Host details :

What I've tried (all attempts failed) :

/var/lib/mysql $ ls -lah
total 174264
drwxr-xr-x    5 mysql    mysql       4.0K Oct 16 18:14 .
drwxr-xr-x    1 root     root        4.0K Aug  8 06:03 ..
-rw-rw----    1 999      mysql      16.0K Oct 16 18:14 aria_log.00000001
-rw-rw----    1 999      mysql         52 Oct 16 18:14 aria_log_control
drwx------    2 999      mysql     108.0K Oct 12 13:49 drupal
-rw-rw----    1 999      ping       32.2K Oct 15 23:54 ib_buffer_pool
-rw-rw----    1 999      ping       48.0M Oct 15 23:54 ib_logfile0
-rw-rw----    1 999      ping       48.0M Oct 15 23:32 ib_logfile1
-rw-rw----    1 999      mysql      74.0M Oct 15 23:54 ibdata1
-rw-rw----    1 999      mysql          0 Oct  8 18:39 multi-master.info
drwx------    2 999      mysql       4.0K Oct  8 18:39 mysql
drwx------    2 999      mysql       4.0K Oct  8 18:39 performance_schema

This issue seems to be related : https://github.com/wodby/mariadb/issues/2

Any ideas what I could try ?

Paulmicha commented 6 years ago

Also tried MARIADB_TAG=10.3-3.3.8 : still fails.

Paulmicha commented 6 years ago

Found workaround : renamed the folder containing the stack. I changed nothing else and it worked.

So something is persisting despite docker-compose down --remove-orphans.

Unless this could be caused by another project on the same host inside a folder having the same name somewhere else in the filesystem - e.g. /path/to/project-1/dev-stack and /path/to/project-2/dev-stack ?

It seems possible by looking at the contents of /var/lib/docker/volumes. The solution would then be never to use identical folder names across different projects on the same host when using named local data volumes for databases.

flynet commented 4 years ago

Resolved by chmod to source dir