Skip to content

Docker error mariadb after update to 2..3.0.2 #6658

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tiagoheineck opened this issue May 12, 2020 · 14 comments
Closed

Docker error mariadb after update to 2..3.0.2 #6658

tiagoheineck opened this issue May 12, 2020 · 14 comments

Comments

@tiagoheineck
Copy link

After update to 2.3.0.2 docker container cannot working correctly

Expected behavior

  • create folder db em run mariadb container with docker-compose up

Actual behavior

  • database container exited with code 1

Information

My docker-compose file

db:
    image: mariadb:10.3.22
    ports: 
    - "3306:3306"
    environment: 
        MYSQL_ROOT_PASSWORD: root
        MYSQL_DATABASE: root
        MYSQL_USER: root
        MYSQL_PASSWORD: root
    volumes:
    - ./db:/var/lib/mysql  

I tried other ways to find it here, but none works correctly, before the update was working like this perfectly, tested on another windows 10 machine, with docker and the same problem occurs

without specifying the volume works correctly

LOG ERROR:
2020-05-12 14:41:31 0 [ERROR] InnoDB: preallocating 12582912 bytes for file ./ibdata1 failed with error 38
db_1 | 2020-05-12 14:41:31 0 [ERROR] InnoDB: Could not set the file size of './ibdata1'. Probably out of disk space
db_1 | 2020-05-12 14:41:31 0 [ERROR] InnoDB: Database creation was aborted with error Generic error. You may need to delete the ibdata1 file before trying to start up again.
db_1 | 2020-05-12 14:41:32 0 [ERROR] Plugin 'InnoDB' init function returned error.
db_1 | 2020-05-12 14:41:32 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

  • Windows Version: 10
  • Docker Desktop Version: 2.3.0.2

Steps to reproduce the behavior

  1. Open Powershell and Create a directory "mkdir teste"
  2. Create docker-compose.yml
  3. Paste
version: '3.3'
services:
  db:
    image: mariadb:10.3.22
    ports: 
    - "3306:3306"
    environment: 
        MYSQL_ROOT_PASSWORD: covid
        MYSQL_DATABASE: plataformasaude
        MYSQL_USER: plataformasaude
        MYSQL_PASSWORD: covid     
    volumes:
    - ./db:/var/lib/mysql  
  1. Run docker-compose up
@simonferquel
Copy link

Is it using the WSL2 backend or the hyper-v one ?

@stephen-turner
Copy link
Contributor

The error message says that you're out of disk space. Is that in fact the case? You could try docker image prune or docker system prune to clean up your disk space.

@svacher
Copy link

svacher commented May 12, 2020

Hi,

I'have the same problem after update too (using Hyper-V).
Not a real free disk space.

Someone can explain me how to downgrade to previous version ?

Thanks

@tiagoheineck
Copy link
Author

Is it using the WSL2 backend or the hyper-v one ?

i'm using hyper-v

@tiagoheineck
Copy link
Author

The error message says that you're out of disk space. Is that in fact the case? You could try docker image prune or docker system prune to clean up your disk space.

I ran the commands, cleaned everything, but it still doesn't work ...

the same happens on another machine

@mvegter
Copy link

mvegter commented May 12, 2020

Same here, had to uninstall 2.3.0.2 (45183) and install 2.2.0.5 (43884) to get everything up and running again.

@tiagoheineck
Copy link
Author

Hi,

I'have the same problem after update too (using Hyper-V).
Not a real free disk space.

Someone can explain me how to downgrade to previous version ?

Thanks

Uninstall docker

Download previous version 2.2.0.5 here:
https://download.docker.com/win/stable/43884/Docker%20Desktop%20Installer.exe

After downgrade run ok!

@zikhan
Copy link

zikhan commented May 13, 2020

I was having the same issue that I thought I fixed, but my fix didn't actually mount the FUSE volume.
Underneath, it looks like innodb was blowing on posix_fallocate (https://github.com/MariaDB/server/blob/0a64689baed951fd1ebf47ba222c187b43e79b08/storage/innobase/os/os0file.cc#L3608) (Highly possible I read the code wrong) with Error Code 38. errno returns that as ENOSYS 38 Function not implemented
If you try to run fallocate -x -l 12M ibtmp1 in the mount directory, you'll get a file with 0bytes in size, instead of the 12M file size. In the WSL2 version, it's not a problem cause it's not using FUSE.

@djs55
Copy link

djs55 commented May 13, 2020

While we're investigating this, you might be able to work around the problem and increase performance at the same time. Storing the database files on the host will always be slow, but if the main requirement is to guarantee persistence between runs then a docker volume will achieve that and be much faster (because the database files will be stored on the Linux filesystem rather on Windows where they have to be accessed remotely).

For example:

version: '3.3'
volumes:
  database:
services:
  db:
    image: mariadb:10.3.22
    ports: 
    - "3306:3306"
    environment: 
        MYSQL_ROOT_PASSWORD: covid
        MYSQL_DATABASE: plataformasaude
        MYSQL_USER: plataformasaude
        MYSQL_PASSWORD: covid     
    volumes:
    - database:/var/lib/mysql  

@Gael101
Copy link

Gael101 commented May 14, 2020

I am having the same issue, therefore the issue only occurs on windows systems. On OSX systems everything runs smoothly.
I tried juggling with the entire set of options available with bind mounts, and nothing works on windows :/
Here are the logs related to the error.

[Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.4.13+maria~bionic started.
[Note] [Entrypoint]: Switching to dedicated user 'mysql'
[Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.4.13+maria~bionic started.
Note] [Entrypoint]: Initializing database files
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!
ERROR] InnoDB: Plugin initialization aborted with error Generic error
ERROR] Plugin 'InnoDB' init function returned error.
ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
ERROR] Unknown/unsupported storage engine: InnoDB
ERROR] Aborting
 
[0m Installation of system tables failed!  Examine the logs in

@mat007
Copy link
Member

mat007 commented May 19, 2020

Thank you for your patience, we now have a fix for this issue in a private build for anyone who wants to try it: https://download-stage.docker.com/win/stable/45351/Docker%20Desktop%20Installer.exe

@zikhan
Copy link

zikhan commented May 19, 2020

just tried it. fallocate -x -l 12M ibtmp1 works in the FUSE mount and Mariadb starts up!

@mat007
Copy link
Member

mat007 commented May 27, 2020

The fix has now just been released in Docker Desktop Stable 2.3.0.3, I’ll go ahead and close this issue.

@mat007 mat007 closed this as completed May 27, 2020
@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows.
/lifecycle locked

@docker docker locked and limited conversation to collaborators Jul 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

10 participants