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 does not start with overlay2 and overlay but starts with aufs #72

Open
aalexgabi opened this Issue Aug 1, 2017 · 8 comments

Comments

Projects
None yet
6 participants
@aalexgabi

aalexgabi commented Aug 1, 2017

  • This is a bug report
  • This is a feature request
  • I searched existing issues before opening this one

Expected behavior

MySQL should start

Actual behavior

MySQL does not start and returns an error:

root@bff6f2f06129:/# mysqld
170801 15:19:27 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
170801 15:19:27 [Note] mysqld (mysqld 5.5.57-0+deb7u1) starting as process 6 ...
170801 15:19:27 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
170801 15:19:27 [Note] Plugin 'FEDERATED' is disabled.
mysqld: Got error 140 from storage engine
170801 15:19:27 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
170801 15:19:27 InnoDB: The InnoDB memory heap is disabled
170801 15:19:27 InnoDB: Mutexes and rw_locks use GCC atomic builtins
170801 15:19:27 InnoDB: Compressed tables use zlib 1.2.7
170801 15:19:27 InnoDB: Using Linux native AIO
170801 15:19:27 InnoDB: Initializing buffer pool, size = 128.0M
170801 15:19:27 InnoDB: Completed initialization of buffer pool
170801 15:19:27 InnoDB: highest supported file format is Barracuda.
170801 15:19:27  InnoDB: Waiting for the background threads to start
170801 15:19:28 InnoDB: 5.5.57 started; log sequence number 1595685
170801 15:19:28 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
170801 15:19:28 [Note]   - '127.0.0.1' resolves to '127.0.0.1';
170801 15:19:28 [Note] Server socket created on IP: '127.0.0.1'.
170801 15:19:28 [ERROR] Fatal error: Can't open and lock privilege tables: Got error 140 from storage engine

Steps to reproduce the behavior

Using Dockerfile:

FROM debian:wheezy

RUN apt-get update && apt-get install -y mysql-server-5.5
RUN service mysql start

Output:

root@thor:~/mysql-basic-test# docker build .
Sending build context to Docker daemon  2.048kB
Step 1/3 : FROM debian:wheezy
 ---> c72c50c45f17
Step 2/3 : RUN apt-get update && apt-get install -y mysql-server-5.5
 ---> Using cache
 ---> 692cd7218986
Step 3/3 : RUN service mysql start
 ---> Running in fedd9ef25d69
Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
The command '/bin/sh -c service mysql start' returned a non-zero code: 1
root@thor:~/mysql-basic-test# docker build --no-cache .
Sending build context to Docker daemon  2.048kB
Step 1/3 : FROM debian:wheezy
 ---> c72c50c45f17
Step 2/3 : RUN apt-get update && apt-get install -y mysql-server-5.5
 ---> Running in 9accc804f9ac
Get:1 http://security.debian.org wheezy/updates Release.gpg [1554 B]
Get:2 http://security.debian.org wheezy/updates Release [39.0 kB]
Get:3 http://security.debian.org wheezy/updates/main amd64 Packages [697 kB]
Get:4 http://deb.debian.org wheezy Release.gpg [2373 B]
Get:5 http://deb.debian.org wheezy-updates Release.gpg [1554 B]
Get:6 http://deb.debian.org wheezy Release [191 kB]
Get:7 http://deb.debian.org wheezy-updates Release [155 kB]
Get:8 http://deb.debian.org wheezy/main amd64 Packages [7634 kB]
Get:9 http://deb.debian.org wheezy-updates/main amd64 Packages [7481 B]
Fetched 8729 kB in 2s (3979 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  adduser heirloom-mailx krb5-locales libaio1 libclass-isa-perl
  libdbd-mysql-perl libdbi-perl libgdbm3 libgssapi-krb5-2
  libhtml-template-perl libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0
  libmysqlclient18 libssl1.0.0 libswitch-perl libwrap0 mysql-client-5.5
  mysql-common mysql-server-core-5.5 perl perl-modules psmisc tcpd
Suggested packages:
  exim4 mail-transport-agent krb5-doc krb5-user libipc-sharedcache-perl
  libterm-readkey-perl tinyca perl-doc libterm-readline-gnu-perl
  libterm-readline-perl-perl make libpod-plainer-perl
Recommended packages:
  mailx
The following NEW packages will be installed:
  adduser heirloom-mailx krb5-locales libaio1 libclass-isa-perl
  libdbd-mysql-perl libdbi-perl libgdbm3 libgssapi-krb5-2
  libhtml-template-perl libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0
  libmysqlclient18 libssl1.0.0 libswitch-perl libwrap0 mysql-client-5.5
  mysql-common mysql-server-5.5 mysql-server-core-5.5 perl perl-modules psmisc
  tcpd
0 upgraded, 26 newly installed, 0 to remove and 0 not upgraded.
Need to get 21.8 MB of archives.
After this operation, 139 MB of additional disk space will be used.
Get:1 http://security.debian.org/ wheezy/updates/main libssl1.0.0 amd64 1.0.1t-1+deb7u2 [1278 kB]
Get:2 http://security.debian.org/ wheezy/updates/main mysql-common all 5.5.57-0+deb7u1 [83.9 kB]
Get:3 http://security.debian.org/ wheezy/updates/main libmysqlclient18 amd64 5.5.57-0+deb7u1 [691 kB]
Get:4 http://deb.debian.org/debian/ wheezy/main libgdbm3 amd64 1.8.3-11 [46.9 kB]
Get:5 http://deb.debian.org/debian/ wheezy/main libkeyutils1 amd64 1.5.5-3+deb7u1 [8664 B]
Get:6 http://security.debian.org/ wheezy/updates/main perl-modules all 5.14.2-21+deb7u5 [3441 kB]
Get:7 http://deb.debian.org/debian/ wheezy/main libkrb5support0 amd64 1.10.1+dfsg-5+deb7u7 [50.5 kB]
Get:8 http://deb.debian.org/debian/ wheezy/main libk5crypto3 amd64 1.10.1+dfsg-5+deb7u7 [113 kB]
Get:9 http://deb.debian.org/debian/ wheezy/main libkrb5-3 amd64 1.10.1+dfsg-5+deb7u7 [394 kB]
Get:10 http://security.debian.org/ wheezy/updates/main perl amd64 5.14.2-21+deb7u5 [4434 kB]
Get:11 http://deb.debian.org/debian/ wheezy/main libgssapi-krb5-2 amd64 1.10.1+dfsg-5+deb7u7 [150 kB]
Get:12 http://deb.debian.org/debian/ wheezy/main libwrap0 amd64 7.6.q-24 [62.4 kB]
Get:13 http://deb.debian.org/debian/ wheezy/main libaio1 amd64 0.3.109-3 [9150 B]
Get:14 http://deb.debian.org/debian/ wheezy/main adduser all 3.113+nmu3 [264 kB]
Get:15 http://deb.debian.org/debian/ wheezy/main libswitch-perl all 2.16-2 [21.0 kB]
Get:16 http://deb.debian.org/debian/ wheezy/main libclass-isa-perl all 0.36-3 [12.3 kB]
Get:17 http://security.debian.org/ wheezy/updates/main libdbd-mysql-perl amd64 4.021-1+deb7u2 [126 kB]
Get:18 http://deb.debian.org/debian/ wheezy/main libdbi-perl amd64 1.622-1+deb7u1 [892 kB]
Get:19 http://security.debian.org/ wheezy/updates/main mysql-client-5.5 amd64 5.5.57-0+deb7u1 [1778 kB]
Get:20 http://deb.debian.org/debian/ wheezy/main psmisc amd64 22.19-1+deb7u1 [135 kB]
Get:21 http://deb.debian.org/debian/ wheezy/main krb5-locales all 1.10.1+dfsg-5+deb7u7 [1504 kB]
Get:22 http://deb.debian.org/debian/ wheezy/main heirloom-mailx amd64 12.5-2+deb7u1 [274 kB]
Get:23 http://deb.debian.org/debian/ wheezy/main libhtml-template-perl all 2.91-1 [72.0 kB]
Get:24 http://deb.debian.org/debian/ wheezy/main tcpd amd64 7.6.q-24 [28.2 kB]
Get:25 http://security.debian.org/ wheezy/updates/main mysql-server-core-5.5 amd64 5.5.57-0+deb7u1 [3980 kB]
Get:26 http://security.debian.org/ wheezy/updates/main mysql-server-5.5 amd64 5.5.57-0+deb7u1 [1967 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 21.8 MB in 6s (3518 kB/s)
Selecting previously unselected package libgdbm3:amd64.
(Reading database ... 6747 files and directories currently installed.)
Unpacking libgdbm3:amd64 (from .../libgdbm3_1.8.3-11_amd64.deb) ...
Selecting previously unselected package libssl1.0.0:amd64.
Unpacking libssl1.0.0:amd64 (from .../libssl1.0.0_1.0.1t-1+deb7u2_amd64.deb) ...
Selecting previously unselected package libkeyutils1:amd64.
Unpacking libkeyutils1:amd64 (from .../libkeyutils1_1.5.5-3+deb7u1_amd64.deb) ...
Selecting previously unselected package libkrb5support0:amd64.
Unpacking libkrb5support0:amd64 (from .../libkrb5support0_1.10.1+dfsg-5+deb7u7_amd64.deb) ...
Selecting previously unselected package libk5crypto3:amd64.
Unpacking libk5crypto3:amd64 (from .../libk5crypto3_1.10.1+dfsg-5+deb7u7_amd64.deb) ...
Selecting previously unselected package libkrb5-3:amd64.
Unpacking libkrb5-3:amd64 (from .../libkrb5-3_1.10.1+dfsg-5+deb7u7_amd64.deb) ...
Selecting previously unselected package libgssapi-krb5-2:amd64.
Unpacking libgssapi-krb5-2:amd64 (from .../libgssapi-krb5-2_1.10.1+dfsg-5+deb7u7_amd64.deb) ...
Selecting previously unselected package libwrap0:amd64.
Unpacking libwrap0:amd64 (from .../libwrap0_7.6.q-24_amd64.deb) ...
Selecting previously unselected package libaio1:amd64.
Unpacking libaio1:amd64 (from .../libaio1_0.3.109-3_amd64.deb) ...
Selecting previously unselected package mysql-common.
Unpacking mysql-common (from .../mysql-common_5.5.57-0+deb7u1_all.deb) ...
Selecting previously unselected package libmysqlclient18:amd64.
Unpacking libmysqlclient18:amd64 (from .../libmysqlclient18_5.5.57-0+deb7u1_amd64.deb) ...
Selecting previously unselected package adduser.
Unpacking adduser (from .../adduser_3.113+nmu3_all.deb) ...
Selecting previously unselected package libswitch-perl.
Unpacking libswitch-perl (from .../libswitch-perl_2.16-2_all.deb) ...
Selecting previously unselected package libclass-isa-perl.
Unpacking libclass-isa-perl (from .../libclass-isa-perl_0.36-3_all.deb) ...
Selecting previously unselected package perl-modules.
Unpacking perl-modules (from .../perl-modules_5.14.2-21+deb7u5_all.deb) ...
Selecting previously unselected package perl.
Unpacking perl (from .../perl_5.14.2-21+deb7u5_amd64.deb) ...
Selecting previously unselected package libdbi-perl.
Unpacking libdbi-perl (from .../libdbi-perl_1.622-1+deb7u1_amd64.deb) ...
Selecting previously unselected package libdbd-mysql-perl.
Unpacking libdbd-mysql-perl (from .../libdbd-mysql-perl_4.021-1+deb7u2_amd64.deb) ...
Selecting previously unselected package mysql-client-5.5.
Unpacking mysql-client-5.5 (from .../mysql-client-5.5_5.5.57-0+deb7u1_amd64.deb) ...
Selecting previously unselected package psmisc.
Unpacking psmisc (from .../psmisc_22.19-1+deb7u1_amd64.deb) ...
Selecting previously unselected package mysql-server-core-5.5.
Unpacking mysql-server-core-5.5 (from .../mysql-server-core-5.5_5.5.57-0+deb7u1_amd64.deb) ...
Setting up mysql-common (5.5.57-0+deb7u1) ...
Setting up adduser (3.113+nmu3) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
Selecting previously unselected package mysql-server-5.5.
(Reading database ... 8756 files and directories currently installed.)
Unpacking mysql-server-5.5 (from .../mysql-server-5.5_5.5.57-0+deb7u1_amd64.deb) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
Configuring mysql-server-5.5
----------------------------

While not mandatory, it is highly recommended that you set a password for the 
MySQL administrative "root" user.

If this field is left blank, the password will not be changed.

New password for the MySQL "root" user: 
Use of uninitialized value $_[1] in join or string at /usr/share/perl5/Debconf/DbDriver/Stack.pm line 111.
Use of uninitialized value $val in substitution (s///) at /usr/share/perl5/Debconf/Format/822.pm line 83, <GEN6> line 1.
Use of uninitialized value $val in concatenation (.) or string at /usr/share/perl5/Debconf/Format/822.pm line 84, <GEN6> line 1.
Selecting previously unselected package krb5-locales.
Unpacking krb5-locales (from .../krb5-locales_1.10.1+dfsg-5+deb7u7_all.deb) ...
Selecting previously unselected package heirloom-mailx.
Unpacking heirloom-mailx (from .../heirloom-mailx_12.5-2+deb7u1_amd64.deb) ...
Selecting previously unselected package libhtml-template-perl.
Unpacking libhtml-template-perl (from .../libhtml-template-perl_2.91-1_all.deb) ...
Selecting previously unselected package tcpd.
Unpacking tcpd (from .../tcpd_7.6.q-24_amd64.deb) ...
Setting up libgdbm3:amd64 (1.8.3-11) ...
Setting up libssl1.0.0:amd64 (1.0.1t-1+deb7u2) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
Setting up libkeyutils1:amd64 (1.5.5-3+deb7u1) ...
Setting up libkrb5support0:amd64 (1.10.1+dfsg-5+deb7u7) ...
Setting up libk5crypto3:amd64 (1.10.1+dfsg-5+deb7u7) ...
Setting up libkrb5-3:amd64 (1.10.1+dfsg-5+deb7u7) ...
Setting up libgssapi-krb5-2:amd64 (1.10.1+dfsg-5+deb7u7) ...
Setting up libwrap0:amd64 (7.6.q-24) ...
Setting up libaio1:amd64 (0.3.109-3) ...
Setting up libmysqlclient18:amd64 (5.5.57-0+deb7u1) ...
Setting up libclass-isa-perl (0.36-3) ...
Setting up psmisc (22.19-1+deb7u1) ...
Setting up mysql-server-core-5.5 (5.5.57-0+deb7u1) ...
Setting up krb5-locales (1.10.1+dfsg-5+deb7u7) ...
Setting up heirloom-mailx (12.5-2+deb7u1) ...
update-alternatives: using /usr/bin/heirloom-mailx to provide /usr/bin/mailx (mailx) in auto mode
Setting up tcpd (7.6.q-24) ...
Setting up libswitch-perl (2.16-2) ...
Setting up perl-modules (5.14.2-21+deb7u5) ...
Setting up perl (5.14.2-21+deb7u5) ...
update-alternatives: using /usr/bin/prename to provide /usr/bin/rename (rename) in auto mode
Setting up libdbi-perl (1.622-1+deb7u1) ...
Setting up libdbd-mysql-perl (4.021-1+deb7u2) ...
Setting up mysql-client-5.5 (5.5.57-0+deb7u1) ...
Setting up mysql-server-5.5 (5.5.57-0+deb7u1) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
Configuring mysql-server-5.5
----------------------------

While not mandatory, it is highly recommended that you set a password for the 
MySQL administrative "root" user.

If this field is left blank, the password will not be changed.

New password for the MySQL "root" user: 
Use of uninitialized value $_[1] in join or string at /usr/share/perl5/Debconf/DbDriver/Stack.pm line 111.
invoke-rc.d: policy-rc.d denied execution of stop.
invoke-rc.d: policy-rc.d denied execution of start.
Setting up libhtml-template-perl (2.91-1) ...
 ---> 4001a489928f
Removing intermediate container 9accc804f9ac
Step 3/3 : RUN service mysql start
 ---> Running in 7c5832ab6216
Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
The command '/bin/sh -c service mysql start' returned a non-zero code: 1
root@thor:~/mysql-basic-test# 

Interestingly MySQL starts when is started in the same intermediate container:
Using Dockerfile:

FROM debian:wheezy

RUN apt-get update && apt-get install -y mysql-server-5.5 && service mysql start && sleep 5 && service mysql stop && sleep 5
RUN service mysql start

Output:

root@thor:~/mysql-basic-test# docker build --no-cache .
Sending build context to Docker daemon  2.048kB
Step 1/3 : FROM debian:wheezy
 ---> c72c50c45f17
Step 2/3 : RUN apt-get update && apt-get install -y mysql-server-5.5 && service mysql start && sleep 5 && service mysql stop && sleep 5
 ---> Running in 95b404fa13f0
Get:1 http://security.debian.org wheezy/updates Release.gpg [1554 B]
Get:2 http://security.debian.org wheezy/updates Release [39.0 kB]
Get:3 http://security.debian.org wheezy/updates/main amd64 Packages [697 kB]
Get:4 http://deb.debian.org wheezy Release.gpg [2373 B]
Get:5 http://deb.debian.org wheezy-updates Release.gpg [1554 B]
Get:6 http://deb.debian.org wheezy Release [191 kB]
Get:7 http://deb.debian.org wheezy-updates Release [155 kB]
Get:8 http://deb.debian.org wheezy/main amd64 Packages [7634 kB]
Get:9 http://deb.debian.org wheezy-updates/main amd64 Packages [7481 B]
Fetched 8729 kB in 2s (4035 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
  adduser heirloom-mailx krb5-locales libaio1 libclass-isa-perl
  libdbd-mysql-perl libdbi-perl libgdbm3 libgssapi-krb5-2
  libhtml-template-perl libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0
  libmysqlclient18 libssl1.0.0 libswitch-perl libwrap0 mysql-client-5.5
  mysql-common mysql-server-core-5.5 perl perl-modules psmisc tcpd
Suggested packages:
  exim4 mail-transport-agent krb5-doc krb5-user libipc-sharedcache-perl
  libterm-readkey-perl tinyca perl-doc libterm-readline-gnu-perl
  libterm-readline-perl-perl make libpod-plainer-perl
Recommended packages:
  mailx
The following NEW packages will be installed:
  adduser heirloom-mailx krb5-locales libaio1 libclass-isa-perl
  libdbd-mysql-perl libdbi-perl libgdbm3 libgssapi-krb5-2
  libhtml-template-perl libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0
  libmysqlclient18 libssl1.0.0 libswitch-perl libwrap0 mysql-client-5.5
  mysql-common mysql-server-5.5 mysql-server-core-5.5 perl perl-modules psmisc
  tcpd
0 upgraded, 26 newly installed, 0 to remove and 0 not upgraded.
Need to get 21.8 MB of archives.
After this operation, 139 MB of additional disk space will be used.
Get:1 http://security.debian.org/ wheezy/updates/main libssl1.0.0 amd64 1.0.1t-1+deb7u2 [1278 kB]
Get:2 http://deb.debian.org/debian/ wheezy/main libgdbm3 amd64 1.8.3-11 [46.9 kB]
Get:3 http://security.debian.org/ wheezy/updates/main mysql-common all 5.5.57-0+deb7u1 [83.9 kB]
Get:4 http://deb.debian.org/debian/ wheezy/main libkeyutils1 amd64 1.5.5-3+deb7u1 [8664 B]
Get:5 http://security.debian.org/ wheezy/updates/main libmysqlclient18 amd64 5.5.57-0+deb7u1 [691 kB]
Get:6 http://deb.debian.org/debian/ wheezy/main libkrb5support0 amd64 1.10.1+dfsg-5+deb7u7 [50.5 kB]
Get:7 http://security.debian.org/ wheezy/updates/main perl-modules all 5.14.2-21+deb7u5 [3441 kB]
Get:8 http://deb.debian.org/debian/ wheezy/main libk5crypto3 amd64 1.10.1+dfsg-5+deb7u7 [113 kB]
Get:9 http://deb.debian.org/debian/ wheezy/main libkrb5-3 amd64 1.10.1+dfsg-5+deb7u7 [394 kB]
Get:10 http://deb.debian.org/debian/ wheezy/main libgssapi-krb5-2 amd64 1.10.1+dfsg-5+deb7u7 [150 kB]
Get:11 http://deb.debian.org/debian/ wheezy/main libwrap0 amd64 7.6.q-24 [62.4 kB]
Get:12 http://deb.debian.org/debian/ wheezy/main libaio1 amd64 0.3.109-3 [9150 B]
Get:13 http://deb.debian.org/debian/ wheezy/main adduser all 3.113+nmu3 [264 kB]
Get:14 http://deb.debian.org/debian/ wheezy/main libswitch-perl all 2.16-2 [21.0 kB]
Get:15 http://deb.debian.org/debian/ wheezy/main libclass-isa-perl all 0.36-3 [12.3 kB]
Get:16 http://security.debian.org/ wheezy/updates/main perl amd64 5.14.2-21+deb7u5 [4434 kB]
Get:17 http://deb.debian.org/debian/ wheezy/main libdbi-perl amd64 1.622-1+deb7u1 [892 kB]
Get:18 http://deb.debian.org/debian/ wheezy/main psmisc amd64 22.19-1+deb7u1 [135 kB]
Get:19 http://deb.debian.org/debian/ wheezy/main krb5-locales all 1.10.1+dfsg-5+deb7u7 [1504 kB]
Get:20 http://deb.debian.org/debian/ wheezy/main heirloom-mailx amd64 12.5-2+deb7u1 [274 kB]
Get:21 http://deb.debian.org/debian/ wheezy/main libhtml-template-perl all 2.91-1 [72.0 kB]
Get:22 http://deb.debian.org/debian/ wheezy/main tcpd amd64 7.6.q-24 [28.2 kB]
Get:23 http://security.debian.org/ wheezy/updates/main libdbd-mysql-perl amd64 4.021-1+deb7u2 [126 kB]
Get:24 http://security.debian.org/ wheezy/updates/main mysql-client-5.5 amd64 5.5.57-0+deb7u1 [1778 kB]
Get:25 http://security.debian.org/ wheezy/updates/main mysql-server-core-5.5 amd64 5.5.57-0+deb7u1 [3980 kB]
Get:26 http://security.debian.org/ wheezy/updates/main mysql-server-5.5 amd64 5.5.57-0+deb7u1 [1967 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 21.8 MB in 3s (5851 kB/s)
Selecting previously unselected package libgdbm3:amd64.
(Reading database ... 6747 files and directories currently installed.)
Unpacking libgdbm3:amd64 (from .../libgdbm3_1.8.3-11_amd64.deb) ...
Selecting previously unselected package libssl1.0.0:amd64.
Unpacking libssl1.0.0:amd64 (from .../libssl1.0.0_1.0.1t-1+deb7u2_amd64.deb) ...
Selecting previously unselected package libkeyutils1:amd64.
Unpacking libkeyutils1:amd64 (from .../libkeyutils1_1.5.5-3+deb7u1_amd64.deb) ...
Selecting previously unselected package libkrb5support0:amd64.
Unpacking libkrb5support0:amd64 (from .../libkrb5support0_1.10.1+dfsg-5+deb7u7_amd64.deb) ...
Selecting previously unselected package libk5crypto3:amd64.
Unpacking libk5crypto3:amd64 (from .../libk5crypto3_1.10.1+dfsg-5+deb7u7_amd64.deb) ...
Selecting previously unselected package libkrb5-3:amd64.
Unpacking libkrb5-3:amd64 (from .../libkrb5-3_1.10.1+dfsg-5+deb7u7_amd64.deb) ...
Selecting previously unselected package libgssapi-krb5-2:amd64.
Unpacking libgssapi-krb5-2:amd64 (from .../libgssapi-krb5-2_1.10.1+dfsg-5+deb7u7_amd64.deb) ...
Selecting previously unselected package libwrap0:amd64.
Unpacking libwrap0:amd64 (from .../libwrap0_7.6.q-24_amd64.deb) ...
Selecting previously unselected package libaio1:amd64.
Unpacking libaio1:amd64 (from .../libaio1_0.3.109-3_amd64.deb) ...
Selecting previously unselected package mysql-common.
Unpacking mysql-common (from .../mysql-common_5.5.57-0+deb7u1_all.deb) ...
Selecting previously unselected package libmysqlclient18:amd64.
Unpacking libmysqlclient18:amd64 (from .../libmysqlclient18_5.5.57-0+deb7u1_amd64.deb) ...
Selecting previously unselected package adduser.
Unpacking adduser (from .../adduser_3.113+nmu3_all.deb) ...
Selecting previously unselected package libswitch-perl.
Unpacking libswitch-perl (from .../libswitch-perl_2.16-2_all.deb) ...
Selecting previously unselected package libclass-isa-perl.
Unpacking libclass-isa-perl (from .../libclass-isa-perl_0.36-3_all.deb) ...
Selecting previously unselected package perl-modules.
Unpacking perl-modules (from .../perl-modules_5.14.2-21+deb7u5_all.deb) ...
Selecting previously unselected package perl.
Unpacking perl (from .../perl_5.14.2-21+deb7u5_amd64.deb) ...
Selecting previously unselected package libdbi-perl.
Unpacking libdbi-perl (from .../libdbi-perl_1.622-1+deb7u1_amd64.deb) ...
Selecting previously unselected package libdbd-mysql-perl.
Unpacking libdbd-mysql-perl (from .../libdbd-mysql-perl_4.021-1+deb7u2_amd64.deb) ...
Selecting previously unselected package mysql-client-5.5.
Unpacking mysql-client-5.5 (from .../mysql-client-5.5_5.5.57-0+deb7u1_amd64.deb) ...
Selecting previously unselected package psmisc.
Unpacking psmisc (from .../psmisc_22.19-1+deb7u1_amd64.deb) ...
Selecting previously unselected package mysql-server-core-5.5.
Unpacking mysql-server-core-5.5 (from .../mysql-server-core-5.5_5.5.57-0+deb7u1_amd64.deb) ...
Setting up mysql-common (5.5.57-0+deb7u1) ...
Setting up adduser (3.113+nmu3) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
Selecting previously unselected package mysql-server-5.5.
(Reading database ... 8756 files and directories currently installed.)
Unpacking mysql-server-5.5 (from .../mysql-server-5.5_5.5.57-0+deb7u1_amd64.deb) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
Configuring mysql-server-5.5
----------------------------

While not mandatory, it is highly recommended that you set a password for the 
MySQL administrative "root" user.

If this field is left blank, the password will not be changed.

New password for the MySQL "root" user: 
Use of uninitialized value $_[1] in join or string at /usr/share/perl5/Debconf/DbDriver/Stack.pm line 111.
Use of uninitialized value $val in substitution (s///) at /usr/share/perl5/Debconf/Format/822.pm line 83, <GEN6> line 1.
Use of uninitialized value $val in concatenation (.) or string at /usr/share/perl5/Debconf/Format/822.pm line 84, <GEN6> line 1.
Selecting previously unselected package krb5-locales.
Unpacking krb5-locales (from .../krb5-locales_1.10.1+dfsg-5+deb7u7_all.deb) ...
Selecting previously unselected package heirloom-mailx.
Unpacking heirloom-mailx (from .../heirloom-mailx_12.5-2+deb7u1_amd64.deb) ...
Selecting previously unselected package libhtml-template-perl.
Unpacking libhtml-template-perl (from .../libhtml-template-perl_2.91-1_all.deb) ...
Selecting previously unselected package tcpd.
Unpacking tcpd (from .../tcpd_7.6.q-24_amd64.deb) ...
Setting up libgdbm3:amd64 (1.8.3-11) ...
Setting up libssl1.0.0:amd64 (1.0.1t-1+deb7u2) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
Setting up libkeyutils1:amd64 (1.5.5-3+deb7u1) ...
Setting up libkrb5support0:amd64 (1.10.1+dfsg-5+deb7u7) ...
Setting up libk5crypto3:amd64 (1.10.1+dfsg-5+deb7u7) ...
Setting up libkrb5-3:amd64 (1.10.1+dfsg-5+deb7u7) ...
Setting up libgssapi-krb5-2:amd64 (1.10.1+dfsg-5+deb7u7) ...
Setting up libwrap0:amd64 (7.6.q-24) ...
Setting up libaio1:amd64 (0.3.109-3) ...
Setting up libmysqlclient18:amd64 (5.5.57-0+deb7u1) ...
Setting up libclass-isa-perl (0.36-3) ...
Setting up psmisc (22.19-1+deb7u1) ...
Setting up mysql-server-core-5.5 (5.5.57-0+deb7u1) ...
Setting up krb5-locales (1.10.1+dfsg-5+deb7u7) ...
Setting up heirloom-mailx (12.5-2+deb7u1) ...
update-alternatives: using /usr/bin/heirloom-mailx to provide /usr/bin/mailx (mailx) in auto mode
Setting up tcpd (7.6.q-24) ...
Setting up libswitch-perl (2.16-2) ...
Setting up perl-modules (5.14.2-21+deb7u5) ...
Setting up perl (5.14.2-21+deb7u5) ...
update-alternatives: using /usr/bin/prename to provide /usr/bin/rename (rename) in auto mode
Setting up libdbi-perl (1.622-1+deb7u1) ...
Setting up libdbd-mysql-perl (4.021-1+deb7u2) ...
Setting up mysql-client-5.5 (5.5.57-0+deb7u1) ...
Setting up mysql-server-5.5 (5.5.57-0+deb7u1) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
Configuring mysql-server-5.5
----------------------------

While not mandatory, it is highly recommended that you set a password for the 
MySQL administrative "root" user.

If this field is left blank, the password will not be changed.

New password for the MySQL "root" user: 
Use of uninitialized value $_[1] in join or string at /usr/share/perl5/Debconf/DbDriver/Stack.pm line 111.
invoke-rc.d: policy-rc.d denied execution of stop.
invoke-rc.d: policy-rc.d denied execution of start.
Setting up libhtml-template-perl (2.91-1) ...
Starting MySQL database server: mysqld ..
Checking for tables which need an upgrade, are corrupt or were 
not closed cleanly..
Stopping MySQL database server: mysqld.
 ---> 46a5157fd569
Removing intermediate container 95b404fa13f0
Step 3/3 : RUN service mysql start
 ---> Running in 064e2b4dd2e3
Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
The command '/bin/sh -c service mysql start' returned a non-zero code: 1
root@thor:~/mysql-basic-test# 

Output of docker version:

root@thor:~/mysql-basic-test# docker version
Client:
 Version:      17.05.0-ce
 API version:  1.29
 Go version:   go1.7.5
 Git commit:   89658be
 Built:        Thu May  4 22:04:27 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.05.0-ce
 API version:  1.29 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   89658be
 Built:        Thu May  4 22:04:27 2017
 OS/Arch:      linux/amd64
 Experimental: false

Output of docker info:

root@thor:~/mysql-basic-test# docker info
Containers: 21
 Running: 1
 Paused: 0
 Stopped: 20
Images: 1109
Server Version: 17.05.0-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins: 
 Volume: local
 Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 9048e5e50717ea4497b757314bad98ea3763c145
runc version: 9c2d8d184e5da67c95d601382adf14862e4f2228
init version: 949e6fa
Kernel Version: 4.9.0-0.bpo.3-amd64
Operating System: Debian GNU/Linux 8 (jessie)
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 7.763GiB
Name: thor
ID: IZTB:XN5O:KVZK:LOTA:NPTQ:L2EP:QGBJ:BW3Q:U3U6:6IMY:63WS:U3OF
Docker Root Dir: /home/tc/.docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 10.144.112.139:5139
 127.0.0.0/8
Live Restore Enabled: false

WARNING: No swap limit support

Additional environment details (AWS, VirtualBox, physical, etc.)

I tried with the Linux 4.9 Kernel from Jessie backports and Linux 4.11 from Liquorix and the problem exists for both.

The problem arises when using overlay2 and overlay.
The problem does not arise when using aufs.

@aalexgabi

This comment has been minimized.

Show comment
Hide comment
@aalexgabi

aalexgabi Aug 1, 2017

I could also reproduce on a Ubuntu 14.04 with a 4.4 kernel:

% docker info
Containers: 1
 Running: 0
 Paused: 0
 Stopped: 1
Images: 2
Server Version: 17.05.0-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins: 
 Volume: local
 Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 9048e5e50717ea4497b757314bad98ea3763c145
runc version: 9c2d8d184e5da67c95d601382adf14862e4f2228
init version: 949e6fa
Security Options:
 apparmor
Kernel Version: 4.4.0-83-generic
Operating System: Ubuntu 14.04.5 LTS
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 15.56GiB
Name: loki
ID: FQW3:U4O6:S5I7:JT35:YAPI:OE5P:FT2J:226W:DAVQ:DWUH:MIFE:ETFK
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

WARNING: No swap limit support

aalexgabi commented Aug 1, 2017

I could also reproduce on a Ubuntu 14.04 with a 4.4 kernel:

% docker info
Containers: 1
 Running: 0
 Paused: 0
 Stopped: 1
Images: 2
Server Version: 17.05.0-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins: 
 Volume: local
 Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 9048e5e50717ea4497b757314bad98ea3763c145
runc version: 9c2d8d184e5da67c95d601382adf14862e4f2228
init version: 949e6fa
Security Options:
 apparmor
Kernel Version: 4.4.0-83-generic
Operating System: Ubuntu 14.04.5 LTS
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 15.56GiB
Name: loki
ID: FQW3:U4O6:S5I7:JT35:YAPI:OE5P:FT2J:226W:DAVQ:DWUH:MIFE:ETFK
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

WARNING: No swap limit support

@aalexgabi aalexgabi changed the title from Corrupted MySQL files between intermediate containers during build with overlayfs2 on Debian to Corrupted files between intermediate containers during build with overlay and overlay2 Aug 2, 2017

@tonistiigi

This comment has been minimized.

Show comment
Hide comment
@tonistiigi

tonistiigi Aug 2, 2017

Member

@dmcgowan I don't think this is builder specific. If I move the image built in aufs to overlay it has the same problem. Starting container with docker run -v /var/lib/mysql also works fine(what should be recommended in a case like this).

Member

tonistiigi commented Aug 2, 2017

@dmcgowan I don't think this is builder specific. If I move the image built in aufs to overlay it has the same problem. Starting container with docker run -v /var/lib/mysql also works fine(what should be recommended in a case like this).

@geerlingguy

This comment has been minimized.

Show comment
Hide comment
@geerlingguy

geerlingguy Aug 3, 2017

@tonistiigi - In a downstream issue where I was finding this same behavior on Docker for Mac, I added a /var/lib/mysql volume and the error went away. (See geerlingguy/drupal-vm#1497).

That's an acceptable fix for me, and it's actually how I set up most projects' MySQL container in a Docker Compose... but until sometime in the past few weeks, I was able to not add that volume and still get MySQL to start up correctly.

geerlingguy commented Aug 3, 2017

@tonistiigi - In a downstream issue where I was finding this same behavior on Docker for Mac, I added a /var/lib/mysql volume and the error went away. (See geerlingguy/drupal-vm#1497).

That's an acceptable fix for me, and it's actually how I set up most projects' MySQL container in a Docker Compose... but until sometime in the past few weeks, I was able to not add that volume and still get MySQL to start up correctly.

@aalexgabi

This comment has been minimized.

Show comment
Hide comment
@aalexgabi

aalexgabi Aug 3, 2017

@tonistiigi I cannot use a volume because I use Docker for integration tests so I need the data snapshot inside the docker image so that the boot is fast and isolated from other containers. The alternative would be to manually manage MySQL volumes and copy the volume before each run but that would generate a lot of IO and lowering IO usage was the primary reason for using overlay2 in the first place.

The question for me is why this works with aufs and does not work with overlay2 and overlay? Is there any known limitation?

aalexgabi commented Aug 3, 2017

@tonistiigi I cannot use a volume because I use Docker for integration tests so I need the data snapshot inside the docker image so that the boot is fast and isolated from other containers. The alternative would be to manually manage MySQL volumes and copy the volume before each run but that would generate a lot of IO and lowering IO usage was the primary reason for using overlay2 in the first place.

The question for me is why this works with aufs and does not work with overlay2 and overlay? Is there any known limitation?

@aalexgabi aalexgabi changed the title from Corrupted files between intermediate containers during build with overlay and overlay2 to MySQL does not start with overlay2 and overlay but starts with aufs Aug 3, 2017

@aalexgabi

This comment has been minimized.

Show comment
Hide comment
@aalexgabi

aalexgabi Aug 3, 2017

I found the problem.

From the Docker documentation on overlay2:

open(2): OverlayFS only implements a subset of the POSIX standards. This can result in certain
OverlayFS operations breaking POSIX standards. One such operation is the copy-up operation. Suppose that your application calls fd1=open("foo", O_RDONLY) and then fd2=open("foo", O_RDWR). In this case, your application expects fd1 and fd2 to refer to the same file. However, due to a copy-up operation that occurs after the second calling to open(2), the descriptors refer to different files. The fd1 continues to reference the file in the image (lowerdir) and the fd2 references the file in the container (upperdir). A workaround for this is to touch the files which causes the copy-up operation to happen. All subsequent open(2) operations regardless of read-only or read-write access mode will be referencing the file in the container (upperdir).

yum is known to be affected unless the yum-plugin-ovl package is installed. If the yum-plugin-ovl package is not available in your distribution such as RHEL/CentOS prior to 6.8 or 7.2, you may need to run touch /var/lib/rpm/* before running yum install. This package implements the touch workaround referenced above for yum.

As pointed in the docs the workaround is to touch the files used by MySQL:

FROM debian:wheezy

RUN apt-get update && apt-get install -y mysql-server-5.5
RUN find /var/lib/mysql -type f -exec touch {} \; && service mysql start

Can somebody add a note in the docs (next to the yum one) that mentions that MySQL is also affected?

aalexgabi commented Aug 3, 2017

I found the problem.

From the Docker documentation on overlay2:

open(2): OverlayFS only implements a subset of the POSIX standards. This can result in certain
OverlayFS operations breaking POSIX standards. One such operation is the copy-up operation. Suppose that your application calls fd1=open("foo", O_RDONLY) and then fd2=open("foo", O_RDWR). In this case, your application expects fd1 and fd2 to refer to the same file. However, due to a copy-up operation that occurs after the second calling to open(2), the descriptors refer to different files. The fd1 continues to reference the file in the image (lowerdir) and the fd2 references the file in the container (upperdir). A workaround for this is to touch the files which causes the copy-up operation to happen. All subsequent open(2) operations regardless of read-only or read-write access mode will be referencing the file in the container (upperdir).

yum is known to be affected unless the yum-plugin-ovl package is installed. If the yum-plugin-ovl package is not available in your distribution such as RHEL/CentOS prior to 6.8 or 7.2, you may need to run touch /var/lib/rpm/* before running yum install. This package implements the touch workaround referenced above for yum.

As pointed in the docs the workaround is to touch the files used by MySQL:

FROM debian:wheezy

RUN apt-get update && apt-get install -y mysql-server-5.5
RUN find /var/lib/mysql -type f -exec touch {} \; && service mysql start

Can somebody add a note in the docs (next to the yum one) that mentions that MySQL is also affected?

sjp38 added a commit to sjp38/cloudsuite that referenced this issue Aug 8, 2017

web-serving: Apply workaround for mysql on overlayfs
Database container under web-serving benchmark fails to start mysqld on
startup with below error message when it uses overlayfs.
```
[ERROR] Fatal error: Can't open and lock privilege tables: Got error 140
from storage engine
```

The problem comes from POSIX break of overlayfs[1].  There is well known
two workarounds[2] for this problem.  1) add /var/lib/mysql volume, 2) touch
files under /var/lib/mysql once.  Because first workaround makes
unnecessary volume and second workaround is documented in Docker
official document, second workaround would be better.  This commit
applies the workaround.

[1] docker/for-linux#72
[2] docker/for-linux#72 (comment)
[3]
https://docs.docker.com/engine/userguide/storagedriver/overlayfs-driver/#limitations-on-overlayfs-compatibility

Signed-off-by: SeongJae Park <sj38.park@gmail.com>
@AkihiroSuda

This comment has been minimized.

Show comment
Hide comment
@AkihiroSuda

AkihiroSuda Sep 6, 2017

Member

Anyone has straced this?
Is this an open(2) issue or rename(2) one?

Member

AkihiroSuda commented Sep 6, 2017

Anyone has straced this?
Is this an open(2) issue or rename(2) one?

@AkihiroSuda AkihiroSuda referenced this issue Sep 6, 2017

Closed

TODO: update #5

AkihiroSuda added a commit to AkihiroSuda/issues-docker that referenced this issue Sep 6, 2017

xd007 added a commit to xd007/compass-docker-compose that referenced this issue Nov 10, 2017

torounit added a commit to torounit/wp-theme-test-env that referenced this issue Nov 17, 2017

GeorgeBotsev added a commit to GeorgeBotsev/dockerfile that referenced this issue Nov 18, 2017

chinthakagodawita added a commit to dockerdepot/web-containers that referenced this issue Dec 4, 2017

@arku31

This comment has been minimized.

Show comment
Hide comment
@arku31

arku31 Dec 6, 2017

For me it works only this way:
cat init.sh
#!/bin/bash
find /var/lib/mysql -type f -exec touch {} \; && service mysql start
tail Dockerfile -n 2
COPY init.sh /tmp/
ENTRYPOINT "/tmp/init.sh" && /bin/bash

arku31 commented Dec 6, 2017

For me it works only this way:
cat init.sh
#!/bin/bash
find /var/lib/mysql -type f -exec touch {} \; && service mysql start
tail Dockerfile -n 2
COPY init.sh /tmp/
ENTRYPOINT "/tmp/init.sh" && /bin/bash

ywatase added a commit to ywatase/docker-Test-Docker-MySQL that referenced this issue Mar 23, 2018

RomanGrytsay added a commit to awin/docker-mysql that referenced this issue May 16, 2018

Fix build for Debian 9
Build on Debian 9 is failing with the message:
ERROR 2002 (HY000):
Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)

The reason for this message is that Debian 9
does not support aufs FS driver anymore and is using overlay2.

MySQL has issues with overlay2,
because it implements only some of POSIX standards.

The workaround is to 'touch' the files used by MySQL.

Explanation here:
docker/for-linux#72 (comment)
and here:
https://docs.docker.com/storage/storagedriver/overlayfs-driver/

RomanGrytsay added a commit to awin/docker-mysql that referenced this issue May 17, 2018

Fix build for Debian 9
Build on Debian 9 is failing with the message:
ERROR 2002 (HY000):
Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)

The reason for this message is that Debian 9
does not support aufs FS driver anymore and is using overlay2.

MySQL has issues with overlay2,
because it implements only some of POSIX standards.

The workaround is to 'touch' the files used by MySQL.

Explanation here:
docker/for-linux#72 (comment)
and here:
https://docs.docker.com/storage/storagedriver/overlayfs-driver/

RomanGrytsay added a commit to awin/docker-mysql that referenced this issue May 17, 2018

Fix build for Debian 9
Build on Debian 9 is failing with the message:
ERROR 2002 (HY000):
Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)

The reason for this message is that Debian 9
does not support aufs FS driver anymore and is using overlay2.

MySQL has issues with overlay2,
because it implements only some of POSIX standards.

The workaround is to 'touch' the files used by MySQL.

Explanation here:
docker/for-linux#72 (comment)
and here:
https://docs.docker.com/storage/storagedriver/overlayfs-driver/

scuy added a commit to dainst/cilantro that referenced this issue Aug 13, 2018

Use latest tag for ojs2 image
This should fix an issue with running mysql in the ojs2 docker
container under certain docker instances.

See docker/for-linux#72 (comment)

scuy added a commit to dainst/cilantro-images that referenced this issue Aug 31, 2018

Add workaround for mysql startup error
There seems to be a problem with starting mysql when using overlay2
as docker storage adapter. Touching the files in /var/lib/mysql
every time the service is started seems to fix the issue.

See: docker/for-linux#72
@Azeirah

This comment has been minimized.

Show comment
Hide comment
@Azeirah

Azeirah Sep 25, 2018

The workaround works for me, but it takes quite a while to run on my Windows pc (~4-5 seconds). I'm using a mysql image that is specifically tailored to having super-fast start-up times, and without the touch workaround, it starts up in under a second, but with the fix, it takes over 5!

Is there anything else I can try as an alternative workaround on Windows?

Azeirah commented Sep 25, 2018

The workaround works for me, but it takes quite a while to run on my Windows pc (~4-5 seconds). I'm using a mysql image that is specifically tailored to having super-fast start-up times, and without the touch workaround, it starts up in under a second, but with the fix, it takes over 5!

Is there anything else I can try as an alternative workaround on Windows?

MascoSkray added a commit to UniversalOJ/UOJ-System that referenced this issue Oct 10, 2018

fix(install/bundle): mysqld cannot start due to overlayfs of docker
This is an old enough bug while using MySQL version 5.5 with Ubuntu 14.04.
According to these issues form docker or moby repository:
docker/for-linux#72
moby/moby#35503
overlayfs only supports a subset of the POSIX standard.
But the problem does not arise when using aufs.
We do a little trick to make it GREAT AGAIN.

NOTICE: Only people who are using docker may face this problem.
If you are using a bare-metal system or just running a virtual machine, executing the installation script without using container works fine.

MascoSkray added a commit to UniversalOJ/UOJ-System that referenced this issue Oct 10, 2018

fix(install/bundle): mysqld cannot start due to overlayfs of docker
This is an old enough bug while using MySQL version 5.5 with Ubuntu 14.04.
According to these issues form docker or moby repository:
docker/for-linux#72
moby/moby#35503
overlayfs only supports a subset of the POSIX standard.
But the problem does not arise when using aufs.
We do a little trick to MAKE MYSQL GREAT AGAIN.

NOTICE: Only people who are using docker may face this problem.
If you are using a bare-metal system or just running a virtual machine,
executing the installation script without using container works fine.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment