简体   繁体   中英

InnoDB error on mariadb oficial docker image

I'm having a very strange error. I have been able to pin it down to a very simple case and I don't know if I have found a bug or if I'm missing some point.

The thing is I need a mariadb container and I can run it perfectly with the following command:

docker run -e MYSQL_ROOT_PASSWORD=my-secret-pw mariadb

But it fails with the following docker-compose.yml file:

wordpress_db:
  image: mariadb
  environment:
    - MYSQL_ROOT_PASSWORD=foo

It ouptuts, amongst other things:

wordpress_db_1 | 2016-01-11 14:33:25 140183257745344 [Note] InnoDB: The  InnoDB memory heap is disabled

The first message I can clearly recognise as an error is this:

wordpress_db_1 | InnoDB: No valid checkpoint found.

(You can see the full output at the end of the post)

This does not happen if I switch mariadb for mysql.

Can anyone help me?

Thanks!

Output:

Starting miqueladell_wordpress_db_1
Attaching to miqueladell_wordpress_db_1
wordpress_db_1 | 2016-01-11 14:33:25 140183257745344 [Note] mysqld (mysqld 10.1.10-MariaDB-1~jessie) starting as process 1 ...
wordpress_db_1 | 2016-01-11 14:33:25 140183257745344 [Note] InnoDB: Using mutexes to ref count buffer pool pages
wordpress_db_1 | 2016-01-11 14:33:25 140183257745344 [Note] InnoDB: The InnoDB memory heap is disabled
wordpress_db_1 | 2016-01-11 14:33:25 140183257745344 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
wordpress_db_1 | 2016-01-11 14:33:25 140183257745344 [Note] InnoDB: Memory barrier is not used
wordpress_db_1 | 2016-01-11 14:33:25 140183257745344 [Note] InnoDB: Compressed tables use zlib 1.2.8
wordpress_db_1 | 2016-01-11 14:33:25 140183257745344 [Note] InnoDB: Using Linux native AIO
wordpress_db_1 | 2016-01-11 14:33:25 140183257745344 [Note] InnoDB: Using SSE crc32 instructions
wordpress_db_1 | 2016-01-11 14:33:25 140183257745344 [Note] InnoDB: Initializing buffer pool, size = 256.0M
wordpress_db_1 | 2016-01-11 14:33:25 140183257745344 [Note] InnoDB: Completed initialization of buffer pool
wordpress_db_1 | 2016-01-11 14:33:25 140183257745344 [Note] InnoDB: Highest supported file format is Barracuda.
wordpress_db_1 | InnoDB: No valid checkpoint found.
wordpress_db_1 | InnoDB: If this error appears when you are creating an InnoDB database,
wordpress_db_1 | InnoDB: the problem may be that during an earlier attempt you managed
wordpress_db_1 | InnoDB: to create the InnoDB data files, but log file creation failed.
wordpress_db_1 | InnoDB: If that is the case, please refer to
wordpress_db_1 | InnoDB: http://dev.mysql.com/doc/refman/5.6/en/error-creating-innodb.html
wordpress_db_1 | 2016-01-11 14:33:25 140183257745344 [ERROR] Plugin 'InnoDB' init function returned error.
wordpress_db_1 | 2016-01-11 14:33:25 140183257745344 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
wordpress_db_1 | 2016-01-11 14:33:25 140183257745344 [Note] Plugin 'FEEDBACK' is disabled.
wordpress_db_1 | 2016-01-11 14:33:25 140183257745344 [ERROR] Unknown/unsupported storage engine: InnoDB
wordpress_db_1 | 2016-01-11 14:33:25 140183257745344 [ERROR] Aborting
wordpress_db_1 |
miqueladell_wordpress_db_1 exited with code 1

I had the same problem with Maria_DB official image from Docker Hub. It worked once with maria_DB version 10.5, but when i downgraded to 10.3, i had the same error.

The error is caused by the volume of the previous container, you have to delete it.

Firstly, stop the container (you can get the docker cotnainer id with docker ps) :

docker stop xxxxx

Then remove it :

docker rm xxxxx

Finally, delete the associated container :

docker volume ls
docker volume rm my_volume_name

Your container should now restart without issue.

This works for me,

docker-compose up -d 

then

docker-compose down -v

You may need to kill the volume and recreate it. More on,

https://linuxize.com/post/how-to-remove-docker-images-containers-volumes-and-networks/#removing-docker-volumes .

I'm not sure if this should be a comment or an answer but I don't want to hit the character limit so…

Mainly to answer @tjheslin1 and I doubt it would be of any use to anoyone else.

I haven't used docker for quite some months now but, at some point I did manage to make this work with this code:

https://github.com/MiquelAdell/mariadb-utf8mb4/blob/master/Dockerfile

I'm not sure what was and my environment at the moment had a lot of moving pieces.

I don't have time to re-create said environment now to provide more assistance but I don't want to keep people that stumble there waiting forever.

I guess I should close the question as unanswered as I will not be able to follow up on it any time soon.

Sorry :-\

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM