Skip to content
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

MariaDB instance not starting after update #138

Closed
dmp1ce opened this issue Nov 12, 2017 · 9 comments
Closed

MariaDB instance not starting after update #138

dmp1ce opened this issue Nov 12, 2017 · 9 comments
Labels

Comments

@dmp1ce
Copy link

dmp1ce commented Nov 12, 2017

I am getting the following errors from my log. I only updated the image and restarted. Could a recent change in the image have caused these errors? My host has plenty of space, so I’m not sure why I’m getting the out of space error for ./ibtmp1

The issue occurs when updating from mariadb 10.2.9 to 10.2.10.

db_1           | 2017-11-07 21:11:32 140191958161280 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
db_1           | 2017-11-07 21:11:32 140191958161280 [Note] InnoDB: Uses event mutexes
db_1           | 2017-11-07 21:11:32 140191958161280 [Note] InnoDB: Compressed tables use zlib 1.2.8
db_1           | 2017-11-07 21:11:32 140191958161280 [Note] InnoDB: Using Linux native AIO
db_1           | 2017-11-07 21:11:32 140191958161280 [Note] InnoDB: Number of pools: 1
db_1           | 2017-11-07 21:11:32 140191958161280 [Note] InnoDB: Using SSE2 crc32 instructions
db_1           | 2017-11-07 21:11:32 140191958161280 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
db_1           | 2017-11-07 21:11:32 140191958161280 [Note] InnoDB: Completed initialization of buffer pool
db_1           | 2017-11-07 21:11:32 140191215482624 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
db_1           | 2017-11-07 21:11:32 140191958161280 [Note] InnoDB: Highest supported file format is Barracuda.
db_1           | 2017-11-07 21:11:33 140191958161280 [Note] InnoDB: 128 out of 128 rollback segments are active.
db_1           | 2017-11-07 21:11:33 140191958161280 [Note] InnoDB: Creating shared tablespace for temporary tables
db_1           | 2017-11-07 21:11:33 140191958161280 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
db_1           | 2017-11-07 21:11:33 140191958161280 [ERROR] InnoDB: preallocating 12582912 bytes for file ./ibtmp1 failed with error 22
db_1           | 2017-11-07 21:11:33 140191958161280 [ERROR] InnoDB: Could not set the file size of './ibtmp1'. Probably out of disk space
db_1           | 2017-11-07 21:11:33 140191958161280 [ERROR] InnoDB: Unable to create the shared innodb_temporary
db_1           | 2017-11-07 21:11:33 140191958161280 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
db_1           | 2017-11-07 21:11:38 140191958161280 [Note] InnoDB: Starting shutdown...
db_1           | 2017-11-07 21:11:38 140191958161280 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
db_1           | 2017-11-07 21:11:38 140191958161280 [ERROR] Plugin 'InnoDB' init function returned error.
db_1           | 2017-11-07 21:11:38 140191958161280 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
db_1           | 2017-11-07 21:11:38 140191958161280 [Note] Plugin 'FEEDBACK' is disabled.
db_1           | 2017-11-07 21:11:38 140191958161280 [ERROR] Unknown/unsupported storage engine: InnoDB
db_1           | 2017-11-07 21:11:38 140191958161280 [ERROR] Aborting
@yosifkit
Copy link
Contributor

Perhaps similar to https://forums.docker.com/t/official-mysql-image-wont-run/1351? The only difference between the versions is the version: f50d0a8.

@dmp1ce
Copy link
Author

dmp1ce commented Nov 14, 2017

Error messages are different. The error occurs with ibtmp1 for me.

Someone on IRC commented that this might be due to a InnoDB version change from MySQL 5.7. I'm not sure if that is helpful information.

@t3kme
Copy link

t3kme commented Apr 2, 2018

Just confirming I have this same issue with mariadb:latest and mariadb:10.2.9 the suggested fix from @dmp1ce post here: https://superuser.com/questions/1267663/docker-mariadb-instance-not-starting-after-update. I am going to keep poking around the interwebz.

Updated: if I don't do a -v bindmount, then mariadb starts up (latest and 10.2.9), add the bindmount and it errors trying to update modified date of the ibdata1 file in those same versions. pull mysql/mysql-server and the same -v command works (which for me was -v //d/data/wordpress/database3:/var/lib/mysql - I am only posting that because finding the right syntax for the d drive on Windows 10 Pro host was an adventure).

Also, regarding different error messages... with an empty file folder, I will see the Error code 22 error trying to update the file; but after that, when there are files present in the host folders, there error becomes something like plug-in failed with generic error, and then the unknown/unsupported storage engine message. So, depending on host state, there are different errors in the docker log.

Here is the first scenario (empty folder on host):

2018-04-04  2:32:56 140482565486464 [Warning] InnoDB: Retry attempts for writing partial data failed.
2018-04-04  2:32:56 140482565486464 [ERROR] InnoDB: Write to file ./ibdata1failed at offset 0, 1048576 bytes should have been written, only 0 were written. Operating system error number 22. Check that your OS and file system support files of this size. Check also that the disk is not full or a disk quota exceeded.
2018-04-04  2:32:56 140482565486464 [ERROR] InnoDB: Error number 22 means 'Invalid argument'
2018-04-04  2:32:56 140482565486464 [ERROR] InnoDB: Could not set the file size of './ibdata1'. Probably out of disk space
2018-04-04  2:32:56 140482565486464 [ERROR] InnoDB: Database creation was aborted with error Generic error. You may need to delete the ibdata1 file before trying to start up again.
2018-04-04  2:32:57 140482565486464 [ERROR] Plugin 'InnoDB' init function returned error.
2018-04-04  2:32:57 140482565486464 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2018-04-04  2:32:57 140482565486464 [ERROR] Unknown/unsupported storage engine: InnoDB
2018-04-04  2:32:57 140482565486464 [ERROR] Aborting

Here is second flavor ("rocky road" or files already on host):

2018-04-03 17:14:01 139888524109696 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2018-04-03 17:14:01 139888524109696 [Note] InnoDB: Starting shutdown...
2018-04-03 17:14:01 139888524109696 [ERROR] Plugin 'InnoDB' init function returned error.
2018-04-03 17:14:01 139888524109696 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2018-04-03 17:14:02 139888524109696 [Note] Plugin 'FEEDBACK' is disabled.
2018-04-03 17:14:02 139888524109696 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
2018-04-03 17:14:02 139888524109696 [ERROR] Unknown/unsupported storage engine: InnoDB
2018-04-03 17:14:02 139888524109696 [ERROR] Aborting

Hope this helps.

@stuckj
Copy link

stuckj commented Apr 20, 2018

FYI, I'm seeing the same error. For now I've just downgraded the mariadb container. But...definitely something seems odd with this update.

@alexhaydock
Copy link

For what it's worth, I'm experiencing this issue too, but only on mariadb:10.3.

Downgrading to mariadb:10.2 solves the issue.

@vctls
Copy link

vctls commented Jul 27, 2018

I tried downgrading to 10.2, but I still get the error.
Using Docker for Windows and docker-compose.
Tried restarting Docker, removing container and volumes and rebuilding.
The only thing that seems to work is not using a volume bind mount for the data.

  db:
    container_name: db
    image: mariadb:latest
    ports:
      - "3306:3306"
    environment:
      - MYSQL_ROOT_PASSWORD=root
      - MYSQL_DATABASE=ganesh
    volumes:
#      - "./db:/var/lib/mysql" <--- this guy here
      - dbsock:/var/run/mysqld/

@alexhaydock
Copy link

@vctls From your compose file it looks like you are using a volume, but have switched away from using a bind mount. Is that what you mean fixes the issue?

@vctls
Copy link

vctls commented Jul 28, 2018

Sorry, you're right, it's the bind mount that's causing the issue. I wanted to use that for persistence.
The dbsock volume for the unix socket works fine.
Just tried again on another Windows computer after downgrading to 10.1 (for other compatibility reasons), and it didn't work either.

@tianon
Copy link
Contributor

tianon commented Sep 12, 2018

This was fixed by #168. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

8 participants