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

Mysql container working on Docker v17.12.0 but not on v18.01.0 #1584

Closed
manonwbat opened this issue Jan 19, 2018 · 4 comments

Comments

@manonwbat
Copy link

commented Jan 19, 2018

I'm using Docker ToolBox on Windows10 and created 2 docker-machines :

  • 1 with boot2docker v17.12.0-ce
  • 1 with boot2docker v18.01.0-ce

On the same directory I execute docker-compose up and there is only an error on the machine with v18.01.0-ce.

The error appears on a mysql container using the image : mysql:5.6.

mysql | Initializing database
mysql | 2018-01-19 12:40:21 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
mysql | 2018-01-19 12:40:21 0 [Note] Ignoring --secure-file-priv value as server is running with --bootstrap.
mysql | 2018-01-19 12:40:21 0 [Note] /usr/sbin/mysqld (mysqld 5.6.39) starting as process 32 ...
mysql | 2018-01-19 12:40:21 32 [Note] InnoDB: Using atomics to ref count buffer pool pages
mysql | 2018-01-19 12:40:21 32 [Note] InnoDB: The InnoDB memory heap is disabled
mysql | 2018-01-19 12:40:21 32 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
mysql | 2018-01-19 12:40:21 32 [Note] InnoDB: Memory barrier is not used
mysql | 2018-01-19 12:40:21 32 [Note] InnoDB: Compressed tables use zlib 1.2.3
mysql | 2018-01-19 12:40:21 32 [Note] InnoDB: Using Linux native AIO
mysql | 2018-01-19 12:40:21 32 [Note] InnoDB: Using CPU crc32 instructions
mysql | 2018-01-19 12:40:21 32 [Note] InnoDB: Initializing buffer pool, size = 128.0M
mysql | 2018-01-19 12:40:21 32 [Note] InnoDB: Completed initialization of buffer pool
mysql | 2018-01-19 12:40:21 32 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
mysql | 2018-01-19 12:40:21 32 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
mysql | 2018-01-19 12:40:21 32 [Note] InnoDB: Database physically writes the file full: wait...
mysql | 2018-01-19 12:40:22 32 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
mysql | 2018-01-19 12:40:22 32 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
mysql | 2018-01-19 12:40:22 7fcd3b1dd740 InnoDB: Operating system error number 22 in a file operation.
mysql | InnoDB: Error number 22 means 'Invalid argument'.
mysql | InnoDB: Some operating system error numbers are described at
mysql | InnoDB: http://dev.mysql.com/doc/refman/5.6/en/operating-system-error-codes.html
mysql | 2018-01-19 12:40:22 32 [ERROR] InnoDB: File ./ib_logfile101: 'aio write' returned OS error 122. Cannot continue operation
mysql | 2018-01-19 12:40:23 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
mysql | 2018-01-19 12:40:23 0 [Note] mysqld (mysqld 5.6.39) starting as process 1 ...
mysql | 2018-01-19 12:40:23 1 [Warning] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
mysql | 2018-01-19 12:40:23 1 [Note] Plugin 'FEDERATED' is disabled.
mysql | mysqld: Table 'mysql.plugin' doesn't exist
mysql | 2018-01-19 12:40:23 1 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
mysql | 2018-01-19 12:40:23 1 [Note] InnoDB: Using atomics to ref count buffer pool pages
mysql | 2018-01-19 12:40:23 1 [Note] InnoDB: The InnoDB memory heap is disabled
mysql | 2018-01-19 12:40:23 1 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
mysql | 2018-01-19 12:40:23 1 [Note] InnoDB: Memory barrier is not used
mysql | 2018-01-19 12:40:23 1 [Note] InnoDB: Compressed tables use zlib 1.2.3
mysql | 2018-01-19 12:40:23 1 [Note] InnoDB: Using Linux native AIO
mysql | 2018-01-19 12:40:23 1 [Note] InnoDB: Using CPU crc32 instructions
mysql | 2018-01-19 12:40:23 1 [Note] InnoDB: Initializing buffer pool, size = 128.0M
mysql | 2018-01-19 12:40:23 1 [Note] InnoDB: Completed initialization of buffer pool
mysql | 2018-01-19 12:40:23 1 [Note] InnoDB: Restoring page 0 of tablespace 0
mysql | 2018-01-19 12:40:23 1 [Warning] InnoDB: Doublewrite does not have page_no=0 of space: 0
mysql | 2018-01-19 12:40:23 1 [ERROR] InnoDB: space header page consists of zero bytes in data file ./ibdata1
mysql | 2018-01-19 12:40:23 1 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!
mysql | 2018-01-19 12:40:23 1 [ERROR] Plugin 'InnoDB' init function returned error.
mysql | 2018-01-19 12:40:23 1 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
mysql | 2018-01-19 12:40:23 1 [ERROR] Unknown/unsupported storage engine: InnoDB
mysql | 2018-01-19 12:40:23 1 [ERROR] Aborting

Do you have any ideas why it's happening ?

@manonwbat manonwbat closed this Jan 19, 2018

@Forestsoft-de

This comment has been minimized.

Copy link

commented Jan 30, 2018

Same problem here. What was your solution @manonwbat ?

@neeniya

This comment has been minimized.

Copy link

commented Jan 31, 2018

Getting this issue now with Docker Toolbox. Never encountered this before with Docker for Windows. Had to switch to Toolbox, as Docker of Windows stopped working due to Windows Updates. I've tried v17.12.0, yields the same issues. Would be glad to know how you resolved this @manonwbat

@mikeyjk

This comment has been minimized.

Copy link

commented Feb 1, 2018

Hey all, I haven't gotten this working yet, so take with a grain of salt.
I've pushed it slightly further though, and am bumping into another issue.

I didn't realise that /etc/mysql/conf.d/*.cnf would override the default /etc/mysql/my.cnf.
So my incomplete solution was to specify another volume, with a preordained noaio.cnf that turns this off:

innodb_use_native_aio = 0

I'm now running into:

"[Warning] World-writable config file '/etc/mysql/conf.d/noaio.cnf' is ignored.

So, QQ, permissions are too broad.
The solution for this is to 'simply' chmod the file.
Pretty lame though as I was avoiding having my own Dockerfile for MySQL and leveraging docker-compose to do this work for me.

So I assume once I define my own MySQL dockerfile, I should get this working.

--

Can't get the chmod to work lol :[
'One does not simply chmod/chown using docker-toolbox and Windows'

Appending to /etc/mysql.cnf instead - hate everything about this solution though.

--

Okay appending to /etc/mysql.cnf worked.
My /next/ issue is:

"Can't start server : Bind on unix socket: Operation not permitted"

I'm probably going leave it there... sounds like I'm just going to be perpetually pulling teeth with the lack of permissions. Open to suggestions though.

@GiroudA

This comment has been minimized.

Copy link

commented Feb 2, 2018

Hi everyone, I'm the one who created this issue but I wasn't log with the right account.
I didn't find a solution and I closed it because I thought it was not at the right place so I recreated it there : boot2docker/boot2docker#1300

Chaoste added a commit to Chaoste/docker-nginx-php-mysql that referenced this issue May 7, 2019
Add a Windows Chapter to README
- Add config to fix aio error according to farmOS/farmOS#55 (comment) and docker/for-win#1584 (comment)
- Precent config to be "word-writable" according to: cytopia/devilbox#212
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.